Skip to content
Back to formatted view

Raw Message

Message-ID: <3D9EA53CDE9BBF40ADB2096F4784910F22687EEB40@CBMCC-X7-MBX02.ad.cibc.com>
Date: 2013-02-15T18:52:13Z
From: Bond, Stephen
Subject: unbalanced design

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