|Date: ||Wed, 24 May 2006 13:24:31 -0700|
|Reply-To: ||David L Cassell <davidlcassell@MSN.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||David L Cassell <davidlcassell@MSN.COM>|
|Subject: ||Re: Problems using PROC GLM to fit a covariate model|
|Content-Type: ||text/plain; format=flowed|
>SAS is having some computational problems when fitting a covariate model
>and I'm a little unsure as to wether it's a algorthmic problem or a
>It's a simple covariate model with 1 covariate and 1 factor with 7
>levels (2 reps in each level).
>The covariate varies between levels but NOT within levels...and this
>appears to be the problem. SAS cannot fit this model. However if I
>introduce within level variation of the covariate then SAS can fit the
>This confuses me since I can think of no theoretical reason why a
>covariate needs to have within level variation for the model to be
>valid....hence I'm concluding its an algorithimic problem with SAS.
>Any suggestions as to the cause of this error would be greatly
>My data set follows (ignore the non-consecutive obs numbers, these
>weren't used in the model)
> Obs Factor Covariate
> 1 111 4.4
> 3 111 4.4
> 7 197 6.0
> 8 197 6.0
> 9 356 4.7
> 10 356 4.7
> 11 435 7.4
> 12 435 7.4
> 13 542 5.7
> 14 542 5.7
> 15 761 4.7
> 16 761 4.7
> 17 843 4.9
> 18 843 4.9
What is happening is simple. You are giving SAS two categorical
variables as regressors. If you think about SAS building dummy variables
for each level of FACTOR, then you'll see the problem. Those 0/1
dummy variables are *identical* to the ones that would be built for your
covariate if you turned it into dummy variables too. In other words,
the dummy variables for FACTOR provide a perfect multicollinearity with
your covariate variable. Your design matrix is now singular.
If your covariate does not vary at all within levels of FACTOR, then you
don't have a covariate model. You still have a one-way ANOVA.
David L. Cassell
3115 NW Norwood Pl.
Corvallis OR 97330
Donít just search. Find. Check out the new MSN Search!