[R] coding for categorical variables with unequal observations

From: Tanya Yatsunenko <yata25_at_gmail.com>
Date: Thu, 03 Apr 2008 15:54:37 -0500

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.

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. Received on Thu 03 Apr 2008 - 21:00:25 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 04 Apr 2008 - 01:30:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive