[R] what does order() stand for in an lme formula?

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Nov 24 19:35:45 CET 2004


"Harry Athanassiou" <hathanassiou at automatedcell.com> writes:

> I'm a beginner in R, and trying to fit linear models with different
> intercepts per group, of the type y ~ A*x1 + B, where x1 is a numerical
> variable. I cannot understand whether I should use
>             y1 ~ x1 +1
> or
>             y1 ~ order(x1) + 1
> Although in the toy example included it makes a small difference, in models
> with many groups the models without order() converge slower if at all!

Er?

What gave you the idea of using order in the first place? To the best
of my knowledge, order(x) is also in this context just a function,
which for the nth observation returns the position of the nth largest
observation in x. This is not likely to make sense as a predictor in a
model. 


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list