[R] unbalanced design
Bond, Stephen
Stephen.Bond at cibc.com
Fri Feb 15 19:52:13 CET 2013
Please, help with a formula for dealing with unbalanced design:
To see the counts:
aggregate(dfa$CertId,by=list(type=dfa$ComType,stat=dfa$StatusCodeId),length)
type stat x
1 C 1 6571
2 C 3 28957
3 C 8 12390
4 C 11 12415
5 E 13 9
6 R 13 51
7 E 15 2079
8 R 15 6692
I would like to have a slope for statuses 1,3,8,11,13 and two slopes for status 15 one for type E and one for type R.
I tried nesting, but it assumes that all levels exist for each factor and complains about singular model matrix. Is there a theoretically proper way to deal with this or I should just relabel status 15 and make it 16 for type R and regress on status alone??
Thanks everybody
Stephen B
More information about the R-help
mailing list