this helps,
>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.s...@imail.org
> 801.408.8111
>
>
> > -Original Message-
> > From: TGS [mailto:cran.questi...@gmail.com]
> > Sent: Friday, August 13, 201
, August 13, 2010 1:52 PM
> To: Greg Snow
> Subject: Re: [R] Dealing with data
>
> P.S. The degrees of freedom for sprays would be 5 and not 1.
>
> On Aug 13, 2010, at 12:27 PM, Greg Snow wrote:
>
> So you want 1 degree of freedom for InsectSprays? You believe that the
Snow
> Cc: r-help@r-project.org
> Subject: Re: [R] Dealing with data
>
> # Greg, if R automatically does that then I don't know why it's
> treating each indicator
> # as a different regressor. In other words, I am interested in treating
> 'spray' as one
> #
1 AM
> To: Greg Snow
> Cc: r-help@r-project.org
> Subject: Re: [R] Dealing with data
>
> # Greg, if R automatically does that then I don't know why it's
> treating each indicator
> # as a different regressor. In other words, I am interested in treating
> 'spra
hcare
greg.s...@imail.org
801.408.8111
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of TGS
> Sent: Friday, August 13, 2010 11:22 AM
> To: David Winsemius
> Cc: r-help@r-project.org
> Subject: Re: [R] Dea
On Aug 13, 2010, at 1:22 PM, TGS wrote:
To clarify, I'd like to create a column of indicators for the
respective letters so that I could maybe do regression on
indicators, etc.
You can just enter that column name in a regression formula. No need
to create a separate variable. Try:
lm(c
TGS wrote:
To clarify, I'd like to create a column of indicators for the
respective letters so that I could maybe do regression on indicators,
etc.
For instance, "A" gets "1", "B" gets "2", and so on.
That's precisely how factors are handled by modeling functions in R!
No need to reinvent th
lp-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of TGS
> Sent: Friday, August 13, 2010 11:22 AM
> To: David Winsemius
> Cc: r-help@r-project.org
> Subject: Re: [R] Dealing with data
>
> To clarify, I'd like to create a column of indicators for
To clarify, I'd like to create a column of indicators for the respective
letters so that I could maybe do regression on indicators, etc.
For instance, "A" gets "1", "B" gets "2", and so on.
On Aug 13, 2010, at 10:19 AM, David Winsemius wrote:
On Aug 13, 2010, at 1:03 PM, TGS wrote:
> # how wo
On Aug 13, 2010, at 1:03 PM, TGS wrote:
# how would I code in R to look at the letter of the alphabet
# in the second column and create a indicator column for the
# corresponding letter?
data(InsectSprays)
InsectSprays$spray
It's already what most people mean when they say "indicator column"
10 matches
Mail list logo