turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- compare regression slopes

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-21-2016 04:50 PM - edited 07-21-2016 04:50 PM

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.

Accepted Solutions

Solution

07-24-2016
02:45 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-22-2016 01:58 PM

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

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-21-2016 06:01 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-21-2016 06:09 PM - edited 07-21-2016 06:10 PM

X2 and DD are additional included as main effects.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-21-2016 08:47 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-22-2016 04:28 AM

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?

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?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-22-2016 04:56 AM

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.

Solution

07-24-2016
02:45 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-22-2016 01:58 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-24-2016 02:45 PM

Ok, thank you!