[R] strange error : isS4(x) in gamm function (mgcv package). Variable in data-frame not recognized???
Joris Meys
jorismeys at gmail.com
Wed Jul 28 13:16:22 CEST 2010
Dear all,
I run a gamm with following call :
result <- try(gamm(values~ s( VM )+s( RH )+s( TT )+s( PP
)+RF+weekend+s(day)+s(julday) ,correlation=corCAR1(form=~ day|month
),data=tmp) )"
with mgcv version 1.6.2
No stress about the data, the error is not data-related. I get :
Error in isS4(x) : object 'VM' not found
What so? I did define the dataframe to be used, and the dataframe
contains a variable VM :
> str(tmp)
'data.frame': 4014 obs. of 12 variables:
$ values : num 73.45 105.45 74.45 41.45 -4.55 ...
$ dates :Class 'Date' num [1:4014] 9862 9863 9864 9865 9866 ...
$ year : num -5.65 -5.65 -5.65 -5.65 -5.65 ...
$ day : num -178 -177 -176 -175 -174 ...
$ month : Factor w/ 156 levels "1996-April","1996-August",..: 17 17
17 17 17 17 17 17 17 17 ...
$ julday : num -2241 -2240 -2239 -2238 -2237 ...
$ weekend: num -0.289 -0.289 -0.289 0.711 0.711 ...
$ VM : num 0.139 -1.451 0.349 0.839 -0.611 ...
$ RH : num 55.2 61.4 59.8 64.1 60.7 ...
$ TT : num -23.4 -23.6 -19.5 -16.1 -15.3 ...
$ PP : num 6.17 4.27 -4.93 -9.23 -2.63 ...
$ RF : Ord.factor w/ 3 levels "None"<"<2.5mm"<..: 1 1 1 1 1 1 1 1 1 1 ...
- attr(*, "means")= num
Any idea what I'm missing here?
Cheers
Joris
--
Joris Meys
Statistical consultant
Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control
tel : +32 9 264 59 87
Joris.Meys at Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
More information about the R-help
mailing list