Only the TYPE I SS will partition the model R-square. If you use PROC GLM then you may run the model in steps to obtain the amount of variation explained by each variable. In the case where you have both categorical and continuous variable, you should submit your GLM with the categorical first. In order to determine the amount of variation explained by the covariate, you may use subtraction. The other alternative would be to use PROC REG as shown in the program below. In the PROC REG program the SCORR1 results, show the amount variation explained by each variable in the model.
I hope the following program is helpful to you.
/* ANCOVA example from GLM documentation */ / * from snedecor and cochran (1967), statistical methods, p. 422.;*/
data drugtest; input drug $ x y @@; cards; a 11 6 a 8 0 a 5 2 a 14 8 a 19 11 a 6 4 a 10 13 a 6 1 a 11 8 a 3 0 d 6 0 d 6 2 d 7 3 d 8 1 d 18 18 d 8 4 d 19 14 d 8 9 d 5 1 d 15 9 f 16 13 f 13 10 f 11 18 f 9 5 f 21 23 f 16 12 f 12 5 f 12 16 f 7 1 f 12 20 ; /* RSQUARE for model is .676261 */ proc glm data=drugtest; class drug; model y=drug x/solution; run;
/* RSQUARE for model with only DRUG is .227826 */ proc glm data=drugtest; class drug; model y=drug; run;
/* output design matrix for GLM model to use in PROC REG */ proc glmmod data=drugtest outdesign=desr; class drug; model y=drug x; run; /* RSQUARE for model is .6763 */ /* SCORR1 results follow */ /* DRUGa semi partial correlation is .07868 */ /* DRUGd semi partial correlation is .14914 */ /* DRUGd semi partial correlation is . */ /* sum of DRUGA, DRUG D is .22782, matches GLM RSQUARE for only DRUG */ /* X semi partial correlation is .44843 */
/* You may obtain partial correlation for X in GLM by */ /* subtraction--- .676261 - .227826 = .44844, which is */ /* similar to semi partial correlation value reported in REG */
proc reg data=desr; model y=col2--col5/scorr1; run;
... View more