day, March 03, 2011 3:43 PM
> To: Greg Snow
> Cc: r-help@r-project.org
> Subject: Re: [R] Regression with many independent variables
>
> Thanks for getting back to me so quickly greg. Im not quite sure how
> to do what you just said, is there an example that you can show?
>
&
t.dougla...@gmail.com]
>> Sent: Thursday, March 03, 2011 2:09 PM
>> To: Greg Snow
>> Cc: r-help@r-project.org
>> Subject: Re: [R] Regression with many independent variables
>>
>> Thanks greg,
>>
>> that formula was exactly what I was looking for. Exc
essage-
>> From: Matthew Douglas [mailto:matt.dougla...@gmail.com]
>> Sent: Tuesday, March 01, 2011 1:09 PM
>> To: Greg Snow
>> Cc: r-help@r-project.org
>> Subject: Re: [R] Regression with many independent variables
>>
>> Hi Greg,
>>
>> Thank
...@imail.org
801.408.8111
> -Original Message-
> From: Matthew Douglas [mailto:matt.dougla...@gmail.com]
> Sent: Thursday, March 03, 2011 2:09 PM
> To: Greg Snow
> Cc: r-help@r-project.org
> Subject: Re: [R] Regression with many independent variables
>
> Thanks greg
Hi Greg,
Thanks for the help, it works perfectly. To answer your question,
there are 339 independent variables but only 10 will be used at one
time . So at any given line of the data set there will be 10 non zero
entries for the independent variables and the rest will be zeros.
One more question:
> Subject: Re: [R] Regression with many independent variables
>
> Hi Greg,
>
> Thanks for the help, it works perfectly. To answer your question,
> there are 339 independent variables but only 10 will be used at one
> time . So at any given line of the data set there will be
Don't put the name of the dataset in the formula, use the data argument to lm
to provide that. A single period (".") on the right hand side of the formula
will represent all the columns in the data set that are not on the left hand
side (you can then use "-" to remove any other columns that you
7 matches
Mail list logo