Skip to content

Data extraction problem after importation using RODBC

2 messages · Axel Leroix, Dieter Menne

#
Axel Leroix wrote:
Use 

reg1 <-lm(prod~pri+cli, data=data) 

instead. It is not necessary to call the data frame you read your stuff into
"data", any more useful name, such as "ecg" or "delivery" will do.
?
Then I try to perform a gls regression because I have a correlation problem.
For this I use the following code:
reg1gls <- gls(data$prod ~ data$pri + data$cli + 
correlation=corAR1(form= ~data$Year), method='ML')
?
The problem is that after this gls regression, I have the fellowing error
message :
?
Error in?eval(expr, envir, enclos) :? 'Year' object is not find 
?


If you have problems, print

str(data) << or whatever you want to call this

Use the same form as above; check the documentation example. This has
nothing to do with ODBC import, because your first example worked (I
presume).

Dieter