Re: [R] lm() notation question

2009-11-29 Thread Gabor Grothendieck
See the Details section of ?lm where its all discussed. On Sun, Nov 29, 2009 at 11:46 AM, Carl Witthoft wrote: > Hi, > A recent thread provided a (working) construct for lm: > > lm(as.matrix(freeny[ix]) ~., freeny[-ix]) > > > Can someone explain what is meant by the formula in that expression, >

Re: [R] lm() notation question

2009-11-29 Thread Gabor Grothendieck
Sorry. Since . is commonly used but a matrix LHS less so I assumed you were asking about the matrix part. Dot means everything not on the LHS of the formula. On Sun, Nov 29, 2009 at 12:18 PM, Carl Witthoft wrote: > As others helpfully pointed out, the meaning of "." in a formula is > provided i

Re: [R] lm() notation question

2009-11-29 Thread Ista Zahn
The help page for lm says: "If ‘response’ is a matrix a linear model is fitted separately by least-squares to each column of the matrix." -Ista On Sun, Nov 29, 2009 at 11:46 AM, Carl Witthoft wrote: > Hi, > A recent thread provided a (working) construct for lm: > > lm(as.matrix(freeny[ix])

Re: [R] lm() notation question

2009-11-29 Thread Carl Witthoft
As others helpfully pointed out, the meaning of "." in a formula is provided in the Details section of ?formula. (But NOT in ?lm) Ista Zahn wrote: The help page for lm says: "If ‘response’ is a matrix a linear model is fitted separately by least-squares to each column of the matrix." -I

Re: [R] lm() notation question

2009-11-29 Thread David Winsemius
On Nov 29, 2009, at 11:46 AM, Carl Witthoft wrote: Hi, A recent thread provided a (working) construct for lm: lm(as.matrix(freeny[ix]) ~., freeny[-ix]) Can someone explain what is meant by the formula in that expression, that is, what does "mymatrix~." do? It doesn't say my matrix, it sa

[R] lm() notation question

2009-11-29 Thread Carl Witthoft
Hi, A recent thread provided a (working) construct for lm: lm(as.matrix(freeny[ix]) ~., freeny[-ix]) Can someone explain what is meant by the formula in that expression, that is, what does "mymatrix~." do? I couldn't find any such example in the lm() or formula() help pages. thanks Carl