BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
emaneman
Pyrite | Level 9

Dear all,

I am required to provide semi-partial correlations between all predictors in a PROC GLM (I use PROC GLM instead of PROC REG because I also have a CLASS variable that needs to be included as covariate). Does PROC GLM output semi-partial correlations?

Thanks in advance.

Eman

 

1 ACCEPTED SOLUTION

Accepted Solutions
STAT_Kathleen
SAS Employee
The approach in the sample program matches the value for TYPE I SS specifically the Semi-partial Eta Square provided when using the EFFECTSIZE option in the MODEL statement. The EFFECTSIZE is better solution in that it provides both the for Semi-partial Eta Square for TYPE I and TYPE III SS.
If the design is unbalanced I would not use TYPE 1. The example provided was balanced.
There are, however, a number of models for which the Type I hypotheses are considered appropriate. These are as follows:

* balanced ANOVA models specified in proper sequence (that is, interactions do not precede main effects in the MODEL statement and so forth)
* purely nested models (specified in the proper sequence)
* polynomial regression models (in the proper sequence)

View solution in original post

5 REPLIES 5
PaigeMiller
Diamond | Level 26

I don't think PROC GLM does this. You could create dummy variables to use in place of the CLASS variable in PROC REG, although I don't really know if this gives valid semi-partial correlations.

--
Paige Miller
STAT_Kathleen
SAS Employee

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;

PaigeMiller
Diamond | Level 26

@STAT_Kathleen 

Doesn't this imply that Type I must be appropriate for the model in order to partition the sum-of-squares and obtain the semi-partial correlations? Type I is not appropriate in many modeling situations, which to me means that the semi-partial correlations computed this way also are not appropriate in those modeling situations.

--
Paige Miller
emaneman
Pyrite | Level 9

Dear all,

I found out that the EFFECTSIZE option in the MODEL of PROC GLM outputs, for each predictor, Semi-partial eta-square, which are the same as squared semi-partial correlations (sr2). If that's the case, I can simply compute the root-square of those to obtain semi-partial correlations. Am I missing something?

Eman 

STAT_Kathleen
SAS Employee
The approach in the sample program matches the value for TYPE I SS specifically the Semi-partial Eta Square provided when using the EFFECTSIZE option in the MODEL statement. The EFFECTSIZE is better solution in that it provides both the for Semi-partial Eta Square for TYPE I and TYPE III SS.
If the design is unbalanced I would not use TYPE 1. The example provided was balanced.
There are, however, a number of models for which the Type I hypotheses are considered appropriate. These are as follows:

* balanced ANOVA models specified in proper sequence (that is, interactions do not precede main effects in the MODEL statement and so forth)
* purely nested models (specified in the proper sequence)
* polynomial regression models (in the proper sequence)

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 966 views
  • 1 like
  • 3 in conversation