[R] what does order() stand for in an lme formula?
Martin Maechler
maechler at stat.math.ethz.ch
Thu Nov 25 09:47:29 CET 2004
>>>>> "PD" == Peter Dalgaard <p.dalgaard at biostat.ku.dk>
>>>>> on 24 Nov 2004 19:35:45 +0100 writes:
PD> "Harry Athanassiou" <hathanassiou at automatedcell.com>
PD> 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!
PD> Er?
PD> What gave you the idea of using order in the first
PD> place? To the best of my knowledge, order(x) is also in
PD> this context just a function, which for the nth
PD> observation returns the position of the nth largest
PD> observation in x. This is not likely to make sense as a
PD> predictor in a model.
where on the other hand,
rank(x1)
may make sense and what Harry really intended to use.
Martin Maechler, ETH Zurich
More information about the R-help
mailing list