[R] coding for categorical variables with unequal observations

Rolf Turner r.turner at auckland.ac.nz
Fri Apr 4 00:01:36 CEST 2008


On 4/04/2008, at 10:45 AM, Nordlund, Dan (DSHS/RDA) wrote:

>> -----Original Message-----
>> From: r-help-bounces at r-project.org
>> [mailto:r-help-bounces at r-project.org] On Behalf Of Tanya Yatsunenko
>> Sent: Thursday, April 03, 2008 1:55 PM
>> To: r-help at r-project.org
>> Subject: [R] coding for categorical variables with unequal
>> observations
>>
>> Hi,
>> I am doing multiple regression, and have several X variables that are
>> categorical.
>> I read that I can use dummy or contrast codes for that, but are there
>> any special rules when there're unequal #observations in each
>> groups (4
>> females vs 7 males in a "gender" variable)?
>> Also, can R generate these codes for me?
>> THanks.
>>
>
> You don't need to do anything special, and yes you can just let SAS  
> do it for you.

	<snip>

	Huh??? SAS???

	(Don't let SAS do *anything* for you!) :-)

		cheers,

			Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}



More information about the R-help mailing list