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

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

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

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

View solution in original post

13 REPLIES 13
SteveDenham
Jade | Level 19

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

marcioadg
Calcite | Level 5

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

Rick_SAS
SAS Super FREQ

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.

marcioadg
Calcite | Level 5

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

PaigeMiller
Diamond | Level 26

Wikipedia provides the formula

Quadratic equation - Wikipedia, the free encyclopedia

--
Paige Miller
marcioadg
Calcite | Level 5

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?

Rick_SAS
SAS Super FREQ

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?

FitPlot.png

marcioadg
Calcite | Level 5

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

chart.jpg

Rick_SAS
SAS Super FREQ

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.

PGStats
Opal | Level 21

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
marcioadg
Calcite | Level 5

PGStat,

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

Thanks,

Marcio

PGStats
Opal | Level 21

Basic calculus. Very old stuff. Smiley Happy

PG

PG
marcioadg
Calcite | Level 5

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

Thanks a lot! Saving lives!

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
  • 13 replies
  • 3858 views
  • 6 likes
  • 5 in conversation