[R-sig-ME] nlmer "Error: object of type 'symbol' is not subsettable"

Amanda Henry amanda_henry at eva.mpg.de
Fri Jul 20 17:08:18 CEST 2012


Hi all,

I want to test the effect of "species", "tech", and "area" on "types",
controlling for "microfossil", and "sampletype", with "site" as a random effect,
which should have random slope wrt "microfossil", as well as weighting the
response by "microfossil".
Microfossil and type are quantitative, the rest are factors. I have transformed
"microfossil" to approximate a uniform distribution, it appears as "z.micro" in
the formula. 

My data is structured as follows

'data.frame':	210 obs. of  9 variables:
 $ sample     : Factor w/ 207 levels "Abri Pataud left M2",..: 116 117 118 119
120 121 122 123 124 125 ...
 $ site       : Factor w/ 20 levels "Arcy","Blombos",..: 18 18 18 18 18 18 18 18
18 18 ...
 $ sampletype : Factor w/ 2 levels "calculus","tool": 2 2 2 2 2 2 2 2 2 2 ...
 $ species    : Factor w/ 2 levels "MH","N": 1 1 1 1 1 1 1 1 1 1 ...
 $ tech       : Factor w/ 3 levels "MP/MSA","N","UP/LSA": 3 3 3 3 3 3 3 3 3 3 ...
 $ area       : Factor w/ 3 levels "A","E","NE": 3 3 3 3 3 3 3 3 3 3 ...
 $ microfossil: int  7 16 0 4 5 10 6 1 25 1 ...
 $ type       : int  7 8 0 4 2 7 5 1 16 1 ...
 $ z.micro    : num  1.26 1.881 -1.061 0.853 1.013 ...


I have used the following function

res=nlmer(type~species+tech+area+sampletype+z.micro+
  (1|site)+(0+z.micro|site), weights=(microfossil+1),
         family=poisson, data=tdata)

None of the categorical predictors or control factors (species, tech, area,
sampletype) are perfectly nested or crossed with each other or with site.  

I have included "microfossil+1" as the weight because there are zero counts in
microfossil and that gives an error.

I receive the error: 
Error: object of type 'symbol' is not subsettable

I have seen only one other instance of this problem mentioned on this mailing
list, but it was not answered. 

Any suggestions?

Thanks for your help,
Amanda



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