Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quadratic Regression ©2005 Dr. B. C. Paul. Fitting Second Order Effects Can also use least square error formulation to fit an equation of the form Math.

Similar presentations


Presentation on theme: "Quadratic Regression ©2005 Dr. B. C. Paul. Fitting Second Order Effects Can also use least square error formulation to fit an equation of the form Math."— Presentation transcript:

1 Quadratic Regression ©2005 Dr. B. C. Paul

2 Fitting Second Order Effects Can also use least square error formulation to fit an equation of the form Math is more difficult – but since you don’t have to do it – you may not care.

3 Fitting the Model With SPSS We will re-use our data set Where we saw a clear Quadratic effect in the trend Click on Analyze to pull down The menu Highlight Regression to bring Up the side menu Highlight and Click for Curve Estimation.

4 Setting for a Quadratic Model Set your Dependent and Independent Variables as Before. Check Off that you want A Quadratic Model Note that you have options to fit Logarithmic, Inverse, cubic, Power of your choice, exponential And a number of other models. The computer will fit any of the models By least squares.

5 Other Options to Check I can have the model include a Constant or not. I want it to plot my model. I also want to see an ANOVA on my model the The constants in the regression equation. Click Ok when all is set.

6 Here Come Results Tells me it fit a quadratic Model for Dependent Using independent as the Controlling variable and That I had 29 data cases.

7 Analyzing the Fit of the Quadratic Equation. R squared value is 1 – pretty much Means that quadratic model is a Perfect fit. Their regression mean square is 6 orders of magnitude greater than The mean square error and the F test blows the null hypothesis off The map.

8 Checking the Significance and Value of the Coefficients B 0 =1.163 + B 1 =4.061 ie 4.061*X + B 2 =0.068 ie 0.068*X 2

9 How Significant are the Values T tests are used to measure the certainty that our Coefficient values are not 0. As can be seen None of them have any noteworthy chance of Being a fluke.

10 Here is the Fit of the Model to the Data As can be seen the Model fits the points Including the slight Curvature that reflects The quadratic effect.

11 Lets see if there is a Quadratic Effect of Distance on our MPG We remember that there is Some definite scatter in our MPG data. The linear Regression on distance only Explained about 37% of the Total variability. Of course unlike our last data Set where we could see the Curve effect in the residuals – The residuals were fairly Scattered for our MPG plot

12 Looking at Results The R^2 value is up to 40% of variability From about 37% - that’s improvement, but Not a lot. The Regression itself is significant At the 99.9% level We have something going on Down here.

13 Significance of Coefficients The constant is Significant. Significance of our distance and distance squared terms are somewhat lacking At an alpha level of 9.9% some may not be sure the distance coefficient is not Zero. At an alpha level of 48.7% most people would have a lot of doubt about the quadratic Term distance squared.

14 What Happened? We already ran a linear regression and know we have a significant linear effect. Now we run a quadratic regression and its telling us its not sure about the linear effect Significance is measured by how much variation is explained by a term relative to the mean square error As new terms enter the equation the amount of variability explained by a single term normally drops The prediction accuracy is now being shared It does make a difference what else is in the model

15 Checking Out the Plot The curved regression line Does not appear to be a bad Fit to the data. In fact the data Seems to have a bend. But the significance of the Square term is just over 50% Which is not mathematically Convincing.

16 Why are We Being Told Something that Looks Wrong? Whether a term is significant depends on What else is in the equation In this case the linear effect would seem stronger than the quadratic effect so we might expect more weight to go to the other variable. What else is not explained 60% of the variability in this data is not explained by the regression of distance only Some times the clarity with which we can see a trend depends on the amount of confusion coming from other sources Everything else other than distance that might influence gas mileage is being called random

17 We Know More Than We Are Telling We would logically guess that gas mileage is influenced by more than distance driven When we leave other sources of prediction unaccounted for we expand what we are saying is random Not using what we know can cause us to loose a lot of power in our models Problem is our model can only handle one independent variable Maybe we need a “Bigger Box”


Download ppt "Quadratic Regression ©2005 Dr. B. C. Paul. Fitting Second Order Effects Can also use least square error formulation to fit an equation of the form Math."

Similar presentations


Ads by Google