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

Hi, 

 

I am running a regression with proc surveyreg which looks like this: Y= x0 + X1 + X1*DD + X1*X2 + X1*X2*DD. 

DD is a dummy variable and all the other ones are continuous variables. 

 

How can I compare the effect (!) of the regression slopes between X1*DD and X1*X2*DD and test if the difference is significant? I do not want to include the intercept. 

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

While this doesn't do a formal hypothesis test of the difference, it should tell you everything you want to know.  Add CLPARM and SOLUTION to your MODEL statement.  You could then match up the appropriate terms and look for overlap in the confidence intervals.

 

I think the only way to get a formal test will involve getting the inverse of the X'X (or X'WX) matrix and construct the proper quadratic form, because as you have identified, CONTRAST, ESTIMATE and LSMESTIMATE statements don't really lend themselves to testing between continuous covariate estimates.  I suppose that you could construct an ESTIMATE statement that had everything in there, in the right place, and used the proper values, but I suspect that it would be more likely to give an estimate at the particular values of the continuous covariate than of the difference in the slope estimates.

 

Steve Denham

View solution in original post

7 REPLIES 7
ballardw
Super User

Is there some reason that X2 is not included in main effects??

nuitamment
Calcite | Level 5

X2 and DD are additional included as main effects. 

Ksharp
Super User

I think both CONTRAST Statement and ESTIMATE Statement can do that .

nuitamment
Calcite | Level 5
Thanks!
For clarification: If I use the contrast statement I can only compare the values of the dummy variable with each other under specified values of the continuous variable? Or can I use the contrast statement to something like an F-Test for groups of continuous regression slopes?
And if I use the estimate statement, I can estimate the effect for all specified variables. However I do not have the difference between effects. Am I wrong here?
Ksharp
Super User
Sorry. I am not expert about it. I want leave it to @Steve .... CONTRAST can compare these two coefficience/parameter of variables are equal or not.
SteveDenham
Jade | Level 19

While this doesn't do a formal hypothesis test of the difference, it should tell you everything you want to know.  Add CLPARM and SOLUTION to your MODEL statement.  You could then match up the appropriate terms and look for overlap in the confidence intervals.

 

I think the only way to get a formal test will involve getting the inverse of the X'X (or X'WX) matrix and construct the proper quadratic form, because as you have identified, CONTRAST, ESTIMATE and LSMESTIMATE statements don't really lend themselves to testing between continuous covariate estimates.  I suppose that you could construct an ESTIMATE statement that had everything in there, in the right place, and used the proper values, but I suspect that it would be more likely to give an estimate at the particular values of the continuous covariate than of the difference in the slope estimates.

 

Steve Denham

nuitamment
Calcite | Level 5
Ok, thank you!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 1902 views
  • 0 likes
  • 4 in conversation