Diego Pavon
2015-Dec-11 09:25 UTC
[R] Error message when running gam (mgcv). object not found
Dear all I am trying to fit gam to my data but it keeps giving me errors. It does not find the covariate ArrivalTime even though it is clearly defined in the data frame. It happens with any covariate that I put in the s() term... And not only for this data set, but for any dataset that I try to analyse. Do you have any idea why I can't run gam? I can run perfectly any other type of models (GLM, GLMM, ZIP...).. Any help would be appreciated. Thank you very much. Best Diego -- *Diego Pav?n Jord?n* *Finnish Museum of Natural History* *PO BOX 17 * *Helsinki. Finland* *0445061210https://tuhat.halvi.helsinki.fi/portal/en/persons/diego-pavon-jordan%288d5db37c-eddd-4fca-92cd-9c9956a42b4a%29.html <https://tuhat.halvi.helsinki.fi/portal/en/persons/diego-pavon-jordan%288d5db37c-eddd-4fca-92cd-9c9956a42b4a%29.html>http://www.linkedin.com/profile/view?id=170617924&trk=nav_responsive_tab_profile <http://www.linkedin.com/profile/view?id=170617924&trk=nav_responsive_tab_profile>https://helsinki.academia.edu/DiegoPavon <https://helsinki.academia.edu/DiegoPavon>*> T1 <- gam(E1 ~ s(ArrivalTime), data = Owls)Error in as.matrix(x) : object 'ArrivalTime' not found> ls(Owls) [1] "ArrivalTime" "BroodSize" "FoodTreatment" "LogNeg"[5] "NegPerChick" "Nest" "SexParent" "SiblingNegotiation" [9] "Xcoord" "Ycoord" [[alternative HTML version deleted]]
Simon Wood
2015-Dec-11 13:08 UTC
[R] Error message when running gam (mgcv). object not found
Hi Diego, I suggest you send me an example offline, along with the result of sessionInfo(), best, Simon On 11/12/15 09:25, Diego Pavon wrote:> Dear all > > I am trying to fit gam to my data but it keeps giving me errors. > > > It does not find the covariate ArrivalTime even though it is clearly > defined in the data frame. It happens with any covariate that I put in the > s() term... And not only for this data set, but for any dataset that I try > to analyse. > > Do you have any idea why I can't run gam? I can run perfectly any other > type of models (GLM, GLMM, ZIP...).. > > Any help would be appreciated. Thank you very much. > > Best > > Diego > > > >-- Simon Wood, School of Mathematics, University of Bristol BS8 1TW UK +44 (0)117 33 18273 http://www.maths.bris.ac.uk/~sw15190