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
- /
- How to do an Inverse regression in SAS?

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
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-15-2014 11:40 AM

Would someone help me on How to do an Inverse regression in SAS?

I actually need to generate Confidence interval of the response variable to a quadratic polynomial model,

Thanks,

Marcio

Accepted Solutions

Solution

10-17-2014
11:00 AM

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

Posted in reply to marcioadg

10-17-2014 11:00 AM

A simpler approach would be to reparameterize your quadratic equation so that the position of the maximum is one of the parameters. That way you would get your confidence interval as a result of the regression.

So, for example, replace your equation Y = a + b*X + c*X**2 by Y = a - 2*c*Xm*X + c*X**2 where Xm is the position of the maximum that will be estimated by the regression procedure.

PG

PG

All Replies

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

Posted in reply to marcioadg

10-15-2014 02:48 PM

Hi Marcio,

Haven't done an inverse regression in years, but here goes on what I would do:

1. Regress y on x and x*x

2. Get confidence bounds on predicted value of interest.

3. Plug in upper bound as Y, and solve for x (IML would be a big help here).

4. Repeat for lower bound, thus giving inverted confidence bounds.

Maybe somebody has a macro, or knows the right PROC, to do this.

Steve Denham

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

Posted in reply to SteveDenham

10-16-2014 11:17 AM

Hi Steve, I appreciate your prompt response.

Could you elaborate on Step 3?

I only used IML for creating contrast coefficients for unequal spaced levels of treatments.

Thank you,

Marcio

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

Posted in reply to marcioadg

10-16-2014 03:35 PM

For a general regression model, you need to find the value of x that is mapped to a particular Y. For the general case you need to solve an inverse problem by using the FROOT function or the bisection method. For a quadratic polynomial model I don't see the need for IML: just use the quadratic formula.

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

Posted in reply to Rick_SAS

10-16-2014 03:39 PM

Rick,

Thanks for your response.

Could you expand on the "just use the quadratic formula", Do I use that on the FROOT function?

Thanks,

Marcio

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

Posted in reply to marcioadg

10-16-2014 04:20 PM

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

Posted in reply to PaigeMiller

10-16-2014 04:26 PM

Paige, Thanks!

I know the formula for a quadratic equation.

My question is : How do I generate a Confidence interval of the response variable to a quadratic polynomial model?

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

Posted in reply to marcioadg

10-17-2014 08:37 AM

Upon re-reading your question, I see that you want confidence intervals, not just the x value that corresponds to the specified Y value. Although the mean model is quadratic, the unpper and lower prediction limits are not quadratic, so I retract my statement about using the quadratic equation.

Let's use an example to see if I understand what I think you want to do. Please correct me if I am wrong. Suppose that you want to model WEIGHT in the sashelp.class data set by a quadratic function of HEIGHT. You could run the following regression:

ods graphics on;

proc glm data=sashelp.class;

model weight = height height*height;

run;

My understanding is that you have a particular response value such as Weight=100. You want to find the top of the prediction limits and the bottom of the prediciton limits and use those values to find x_min and x_max. In the following image, x_min=55.5 and x_max=69. Is that correct? Or do you want to use the mean prediction (the light blue band) to find x_min and x_max, which will result in a narrower interval?

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

Posted in reply to Rick_SAS

10-17-2014 09:33 AM

Rick,

I appreciate your answer. I think we are getting to understand each other. See, in the image below, I am predicting the animal's requirement for a given nutrient. There requirement is at the level in which the nutrient maximizes growth. So say it the level of the nutrient is 0.20% (x axis). I would like to know the CI for that value, say 0.17-0.22%. Does that makes sense?

Thanks,

Marcio

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

Posted in reply to marcioadg

10-17-2014 10:25 AM

Oh. That is different. One of the statisticians ought to be able to describe how to do this. I think it uses the standard error of the estimate for the quadratic coefficient.

Solution

10-17-2014
11:00 AM

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

Posted in reply to marcioadg

10-17-2014 11:00 AM

A simpler approach would be to reparameterize your quadratic equation so that the position of the maximum is one of the parameters. That way you would get your confidence interval as a result of the regression.

So, for example, replace your equation Y = a + b*X + c*X**2 by Y = a - 2*c*Xm*X + c*X**2 where Xm is the position of the maximum that will be estimated by the regression procedure.

PG

PG

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

Posted in reply to PGStats

10-17-2014 11:09 AM

PGStat,

Thanks ! It worked great. Now, do you know where I can find a reference for this information that you provided?

Thanks,

Marcio

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

Posted in reply to marcioadg

10-17-2014 11:21 AM

Basic calculus. Very old stuff.

PG

PG

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

Posted in reply to PGStats

10-17-2014 11:23 AM

hahaha Now I saw what you did. Just replace b1 by the maximum value of X.

Thanks a lot! Saving lives!