[R-sig-ME] gamm4 "no terms component nor attribute"

Steve Bellan steve.bellan at gmail.com
Wed May 6 00:18:14 CEST 2015


Hi all,

I can't even get gamm4 to run it's own example due to this error:

Error in terms.default(object, data = data) : 
  no terms component nor attribute

, let alone to work on my own data. Haven't been able to find much online. Help much appreciated! Session info & details below. Thanks,

Steve

Steven Bellan, PhD, MPH
Post-doctoral Researcher
Lauren Ancel Meyers Research Group
Center for Computational Biology and Bioinformatics
University of Texas at Austin
steve.bellan at gmail.com
http://www.bio.utexas.edu/research/meyers/steve_bellan/

> sessionInfo()
sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
> library(gamm4)
library(gamm4)
Loading required package: Matrix
Loading required package: lme4
Loading required package: Rcpp
Loading required package: mgcv
Loading required package: nlme

Attaching package: ‘nlme’

The following object is masked from ‘package:lme4’:

    lmList

This is mgcv 1.7-26. For overview type 'help("mgcv-package")'.
This is gamm4 0.2-3
> example(gamm4)
example(gamm4)

gamm4> ## NOTE: most examples are flagged as 'do not run' simply to
gamm4> ## save time in package checking on CRAN.
gamm4> 
gamm4> ###################################
gamm4> ## A simple additive mixed model...
gamm4> ###################################
gamm4> library(gamm4)

gamm4> set.seed(0) 

gamm4> dat <- gamSim(1,n=400,scale=2) ## simulate 4 term additive truth
Gu & Wahba 4 term additive model

gamm4> ## Now add 20 level random effect `fac'...
gamm4> dat$fac <- fac <- as.factor(sample(1:20,400,replace=TRUE))

gamm4> dat$y <- dat$y + model.matrix(~fac-1)%*%rnorm(20)*.5

gamm4> br <- gamm4(y~s(x0)+x1+s(x2),data=dat,random=~(1|fac))
Error in terms.default(object, data = data) : 
  no terms component nor attribute
> 







	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list