[R-sig-ME] Structural zeros in lme4

Lydia Belton lbelton at zoology.up.ac.za
Tue Oct 5 08:06:15 CEST 2010


Dear R users,
I am working with a binary data set of categorical variables with repeated
measurements on 100 individuals over 24 trials with follwing variables

success =0 or 1
age = j, s, y or a
ra = l, m, h
sex= m or f

With the data layed out as below

success   age    ra    sex   ind trial
1         a      l     m     1     1
1         s      m     f     2     1
0         y      h     f     3     1
....................................
....................................
....................................
0         a      l     m     1     24
0         s      m     f     2     24
1         y      h     f     3     24
When I try to run the following model lme4

success~(age + ra + sex)^2 + (1|ind), binomial, verbose=T)
I get the following error message

0:           nan: 0.411061 -2.99573 -0.587787  14.0386  14.3205 -12.5703
-11.9282  11.3544  12.2767  1.07485  1.33312  13.4198      nan      nan
-11.0981 -14.4590 -13.2578  1.18634      nan
Error in asMethod(object) : matrix is not symmetric [1,2]
In addition: Warning message:
In mer_finalize(ans) : gr cannot be computed at initial par (65)

>From reading previous posts I'm assuming this is caused by empty cells
that are produced by the interactions in the data set.

However these empty cells are inherent in the data. Whilst all
combinations of sex and age are possible not all combinations or ra and
age, or ra and sex, can exist.

Specifically ra = l and sex = f
             ra = l and age = s
             ra = l and age = j cannot occur.

If the interactions with ra are removed the model runs. However
interactions between ra, age and sex are theoretically possible. From
looking at the raw data and running a glm without individual as a random
effect it seems like there might be a significant interaction between ra
and age.

Does anyone know if there is a way to test this without collapsing my data?


------------------------------------------------------------------
This message and attachments are subject to a disclaimer. Please refer to http://www.it.up.ac.za/documentation/governance/disclaimer/ for full details. / Hierdie boodskap en aanhangsels is aan 'n vrywaringsklousule onderhewig. Volledige besonderhede is by http://www.it.up.ac.za/documentation/governance/disclaimer/ beskikbaar.




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