Thanks!

Do you think if the correctness of the such results could be generalized to
other future cases?




On Sun, May 13, 2012 at 7:10 PM, S Ellison <S.Ellison@lgcgroup.com> wrote:

> > But the line you cited was about "response" being a matrix, which is not
> our case.
> Yes, you're right; I picked the wrong thing to cite.
> The only documentation I found about lm accepting a matrix in the
> predictors is a one-line statement in "Introduction to R" which says "term_i
>    is either
>
>        a vector or matrix expression, or 1,
>        a factor, or
>        a formula expression consisting of factors, vectors or matrices
> connected by formula operators. "
>
> Not the most informative documentation. But Peter Dalgaard is a most
> authoritative source!
>
> >And also I have checked:
> >
> >Any more thoughts?
>
> Data frames are odd things; a column need not contain only a vector if the
> number of rows is OK. I am half surprised that including a matrix in one
> works. But the gods of R are powerful and their magic is strong. Here,
> names(tmp) is showing that the data frame has one element called X (in
> effect, the whole matrix is regarded as one element of the data frame), but
> on display the magic has expanded X to show all the columns of X.
>
> This is the main reason I generally keep to simple things in data frames;
> complicated things make it less easy to predict behaviour.
>
>
>
> *******************************************************************
> This email and any attachments are confidential. Any u...{{dropped:13}}

