Message-ID: <4B12ACE3.3010808@witthoft.com>
Date: 2009-11-29T17:18:27Z
From: Carl Witthoft
Subject: lm() notation question
In-Reply-To: <f55e7cf50911290913k2b533c73nce2ce69cb406c159@mail.gmail.com>
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."
>
> -Ista
>
> On Sun, Nov 29, 2009 at 11:46 AM, Carl Witthoft <carl at witthoft.com> 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? I couldn't find any such example in
>> the lm() or formula() help pages.
>>
>> thanks
>> Carl
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>