BookmarkSubscribeRSS Feed
lezgin
Obsidian | Level 7

I am running two separate regressions using proc surveyreg as follows.

 

proc surveyreg data=have1; cluster date; model y= x1 x2 x1*x2 x3 x4 x5/ adjrsq;run;quit;

proc surveyreg data=have2; cluster date; model y= x1 x2 x1*x2 x3 x4 x6 x7/ adjrsq;run;quit;

 

I need to do an F-test to determine whether the interaction term x1*x2 from the first model equals x1*x2 from the second model. Please, see that the two models do not share the same set of independent variables. I appreciate any help.

7 REPLIES 7
PaigeMiller
Diamond | Level 26

What is the difference between HAVE1 and HAVE2? Is it just two different sub-populations (such as males and females) of a larger population? Are the date clusters the same?

--
Paige Miller
lezgin
Obsidian | Level 7

Have1 and have 2 have different date clusters. Year and month
dummies and the sample sizes are different.

PaigeMiller
Diamond | Level 26

Repeating my question:

 

What is the difference between HAVE1 and HAVE2? Is it just two different sub-populations (such as males and females) of a larger population?

--
Paige Miller
lezgin
Obsidian | Level 7
Sorry if it wasn't clear. Have1 and have2 are subsamples based on the cluster variable.
PaigeMiller
Diamond | Level 26

@lezgin wrote:
Sorry if it wasn't clear. Have1 and have2 are subsamples based on the cluster variable.

The problem I am trying to understand is if the two data sets, HAVE1 and HAVE2, can be combined in some reasonable fashion, for example if they are two sub-populations. If the cluster dates are different, it's not clear to me how to proceed. Its also not clear to me how to proceed if one model has a different set of predictor variables than the other model. So I think I will leave it there.

--
Paige Miller
lezgin
Obsidian | Level 7
Yes, the cluster dates are different and this causes differences in independent variables only for time dummies. Otherwise, I could concatenate the two samples and create a binary variable to distinguish one sample from the other and expand the model by interacting all variables with this dummy, the triple interaction between this new binary variable and the x1*x2 interaction would give me the difference and the t-stat but this results in an error since, I believe, some of the dummy variables are missing in one subsample.
SteveDenham
Jade | Level 19

This is convoluted and perhaps unnecessarily complicated, but what would happen if:

You create a 'shell' for have1 and have2 so that all of the observations in have1 have a corresponding record in have2 and vice versa. There will be missing values for both the independent and dependent variables.

Use PROC MI to impute the missing values.  This is likely the most complicated part - selecting the best method for imputation.

Run SURVEYREG on several imputed data sets, with the interaction you are considering in the model.

Use PROC MIANALYZE to get a combined analysis for the imputed datasets.

 

SteveDenham

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 7 replies
  • 1609 views
  • 0 likes
  • 3 in conversation