[R] about lme

angel hellraiser darkjacknife at hotmail.com
Sat Apr 17 13:20:57 CEST 2004


Dear R users:

I've a problem with lme function, when I want
to model an unbalanced two-way anova, with 2 random factors say t and b.

My two models are:

model1- y(ijk) = beta+b(i)+t(j)+epsilon(ijk)
model2- y(ijk)= beta+b(i)+t(j)+b:t(ij)+epsilon(ijk)

beta overall mean effect

The data.frame is X

t   b   med   celda

1  1    10      1
1  1    12      1
1  1    11      1
1  2    13      2
1  2    15      2
1  3    21      3
1  3    19      3
2  1    16      4
2  1    18      4
2  2    13      5
2  2    19      5
2  2    14      5
2  3    11      6
2  3    13      6

I try with lme to obtain the variance estimates like with varcomp, for 
model1
model-2, sum and interaction effects.
varcomp gives me:

variance estimates:
t                 0
b                0
t:b              7.407
residuals    3.8429

I try with lme:

x <- lme(med~ 1, data = X;random = ~ 1 | t+b
or   random = ~t+b | celda
      random = ~t*b | celda
      random = ~ 1 | t*b  ,  method = "ML")

I get "bad groupping" or "singular convergence".

Please, Can anyone tell me how to model, model-1 and model-2 in lme.

Do you know any library for S-PLUS, R  in order to get like in SPSS expected 
mean
squares if no library, how obtain in S-PLUS, R?

My e-mail is darkjacknife at hotmail.com

_________________________________________________________________
Protege tu correo del spam y los virus con MSN 8. Prueba gratis dos meses 
MSN 8. http://join.msn.com/?pgmarket=es-es&XAPID=199&DI=1055




More information about the R-help mailing list