dimanche 15 avril 2018

Using a factor as both fixed and random in lme models

I would like to know if it is acceptable to use a factor as both fixed and random. My understanding is that it is not a general practice.

https://ac-els-cdn-com.prox.lib.ncsu.edu/S0169534709000196/1-s2.0-S0169534709000196-main.pdf?_tid=c55eaad7-d06f-4c43-a53e-eff2e186aa06&acdnat=1523820522_01ab4598f4e1c58f0ac120f0bd8d01b3

https://ac-els-cdn-com.prox.lib.ncsu.edu/S0749596X07001398/1-s2.0-S0749596X07001398-main.pdf?_tid=49e9e656-e3fd-45b0-9d12-522a3d51c45c&acdnat=1523820296_e013c91ab23f5df456cf6879f2dda860

In the following model, I am using Sp as a fixed as well as random factor, and my model does not converge.

Model1 <- lmer (C1 ~ Place*Voicing*Length*Sp + 
(1+Place+Voicing+Length|Sp),data = 
C1,control=lmerControl(optCtrl=list(maxfun=50000)))
anova (Model1)

str(LME_Model1)

$ Sp      : Factor w/ 5 levels
$ Place   : Factor w/ 3 levels
$ Voicing : Factor w/ 2 levels
$ Length  : Factor w/ 2 levels

Warning messages:
1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
unable to evaluate scaled gradient
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
Model failed to converge: degenerate  Hessian with 4 negative eigenvalues

If I exclude Sp from the fixed factors, then the model converges. Could someone explain whether it is ok to use Sp as a fixed factor?

Thanks




Aucun commentaire:

Enregistrer un commentaire