cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
lloyd_tripp
Level II

Quadratic Models with Inputs that change X-Position of Vertex

Hi JMP Community,

 

I have a response variable that goes from 0 to 100% and following a quadratic function in response to a continuous variable. The vertex of which can only go up to 100%. The problem I'm having is that there's a nominal factor that can shift this function to the left and to the right. So far, I've filtered for responses to less than 80% to make the regression mostly linear (2nd order coefficients not having an effect) such that the nominal factor can be added to the fit model. I get estimates of the nominal factor that shift the quadratic function up and down but really the quadratic function is shifting to the left and to the right due to the nominal factor. How can I model this relationship in JMP?

 

I'm assuming my model looks something like this y_hat = (x-b_0)^2*b_1+(x-b_2)*b_3+b_4+error where b are regression estimates.

 

lloyd_tripp_1-1611430278574.png

 

Figure 1: Toy example of the situation. Where the blue line is the response to one level of the nominal factor. The red line is another response to a different level of the nominal factor. 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Quadratic Models with Inputs that change X-Position of Vertex

Interactions with the Nominal factor are the way to handle this, along with a more "traditional" quadratic polynomial. 

 

I thought it might be easiest to show how to do this with an example, which I have attached. Your factors are X and NomX. The Y1 column has a simple quadratic. The "Y1 + 2" column is the same simple quadratic, but shifted two units along the X-axis. The Y column is a response that uses the Y1 quadratic if NomX is A and uses the "Y1 + 2" quadratic if NomX is B. This column mimics your situation.

 

Using Fit Model, your model would have these terms:

X

NomX

X*NomX

X*X

 

I have saved this model as a script. Notice that if the quadratic effect could change with the nominal X, then you would need the term X*X*NomX.

 

The NomX term will indicate how the intercept of the model changes when your nominal factor changes.

The X*NomX term shows how the slope changes when your nominal factor changes.

 

So, if you look at the models, you can see that the models are essentially:

Y1-hat = 10 - 1*X*X

(Y1+2)-hat = 6 + 4*X - 1*X*X. This is how a shifted quadratic form would look.

 

Finally, for the Y-hat model,

if NomX = A

Y-hat = 8 + 2 + 2*X - 2*X - 1*X*X = 10 - 1*X*X (which matches the Y1-hat model)

 

If NomX = B

Y=hat = 8 - 2 + 2*X + 2*X - 1*X*X = 6 + 4*X - 1*X*X (which matches the (Y1+2)-hat model)

 

Notice how the shift affects the parameters. The shift of two units is captured by the parameter estimates for the terms involving NomX.

 

Dan Obermiller

View solution in original post

3 REPLIES 3

Re: Quadratic Models with Inputs that change X-Position of Vertex

Interactions with the Nominal factor are the way to handle this, along with a more "traditional" quadratic polynomial. 

 

I thought it might be easiest to show how to do this with an example, which I have attached. Your factors are X and NomX. The Y1 column has a simple quadratic. The "Y1 + 2" column is the same simple quadratic, but shifted two units along the X-axis. The Y column is a response that uses the Y1 quadratic if NomX is A and uses the "Y1 + 2" quadratic if NomX is B. This column mimics your situation.

 

Using Fit Model, your model would have these terms:

X

NomX

X*NomX

X*X

 

I have saved this model as a script. Notice that if the quadratic effect could change with the nominal X, then you would need the term X*X*NomX.

 

The NomX term will indicate how the intercept of the model changes when your nominal factor changes.

The X*NomX term shows how the slope changes when your nominal factor changes.

 

So, if you look at the models, you can see that the models are essentially:

Y1-hat = 10 - 1*X*X

(Y1+2)-hat = 6 + 4*X - 1*X*X. This is how a shifted quadratic form would look.

 

Finally, for the Y-hat model,

if NomX = A

Y-hat = 8 + 2 + 2*X - 2*X - 1*X*X = 10 - 1*X*X (which matches the Y1-hat model)

 

If NomX = B

Y=hat = 8 - 2 + 2*X + 2*X - 1*X*X = 6 + 4*X - 1*X*X (which matches the (Y1+2)-hat model)

 

Notice how the shift affects the parameters. The shift of two units is captured by the parameter estimates for the terms involving NomX.

 

Dan Obermiller
lloyd_tripp
Level II

Re: Quadratic Models with Inputs that change X-Position of Vertex

Thanks Dan, I would have realized that the X*NomX interaction effect source would be required had I expanded out the polynomial model to standard form. 

 

 

statman
Super User

Re: Quadratic Models with Inputs that change X-Position of Vertex

@Dan_Obermiller is completely correct.  The quadratic effect is dependent on the nominal factor.  This, by definition, is an interaction.  Interesting because when you use JMP's built in macro (Response Surface) in the Fit Model platform, the quadratic-by-factor interactions are pooled into the error term.  This is why I always saturate the model to analyze first, if at all possible.

"All models are wrong, some are useful" G.E.P. Box