[R] Multilevel in R
Douglas Bates
bates at stat.wisc.edu
Thu Feb 5 18:14:54 CET 2004
"Fabrizio Consentino" <consentino at infinito.it> writes:
> Hello,
>
> I have difficulties to deal with multilevel model. My dataset is composed
> of 10910 observations, 1237 plants nested within 17 stations. The data set is not
> balanced. Response variable is binary and repeated.
>
> I tried to fit this model
>
> model<- glmmPQL( y ~ z1.lon*lun + z2.lat*lun + z1.lon*lar + z2.lat*lar + z1.lon*sca + z2.lat*sca +z1.lon*eta + z2.lat*eta,
> random = ~ lun + lar + sca + eta | sta/piante, family=binomial, data=variabili)
>
> where y is presence (1) or absence (0) of a flowering
>
> lun, lar, sca, eta are level 1 variables
>
> z1.lon, z2.lat are level 2 variables.
>
> but during third iteration it stop because there is a singular matrix in solve.
>
> I stopped it after two iterations, however the results are not correct.
>
> How can I fit this data? Are there other functions that I can use?
>
> I would be thankfull for all the insights.
Start with a simpler model. Try random = ~ 1 | sta/piante and see if
that converges.
You could also try function GLMM from the lme4 package.
--
Douglas Bates bates at stat.wisc.edu
Statistics Department 608/262-2598
University of Wisconsin - Madison http://www.stat.wisc.edu/~bates/
More information about the R-help
mailing list