Vous êtes sur la page 1sur 5

Nonlinear Regression in SPSS In this example, we are going to look at a hypothetical example of medical cost offsets associated with

psychotherapy. A medical cost offset is a reduction in medical costs that results from someone getting psychological treatment. In this example, the Month variable tells you how many months before the start of treatment or after the start of treatment an observation was made. (For example, -1 on this variable means that the observation was made one month before the person started psychotherapy, and 0 means that it was made in the same month the person started therapy). Medical cost tells you how much that persons medical treatment cost during that particular month. Lets try a standard linear regression model to see if we can predict medical cost from month. Heres how well do it: Use the Regression : Curve Estimation command. (There are other ways to do standard regression in SPSS, but this is the method well use this week).

The following dialog box will appear. Put the variables in the appropriate places:

Medical Cost is the criterion variable

Month is the predictor

and we want to test a standard linear regression model (y = 1x + 0)

Make sure that the Plot Models box is also checked, so that you get a graph on your printout.

Then hit OK to see the results:

Curve Fit
MODEL: MOD_1._ MONTH Rsq .012 d.f. 20 F .25 Sigf b0 b1

Independent:

Dependent Mth MED_COST LIN

.622 169.864 -1.8045

This printout shows you (a) the beta coefficients (beta zero and beta one) for the regression equation, and also (b) the F-test value to show whether the model is a good fit or not. The signif column gives you a p-value. This one (.622) is greater than .05, so the model is a poor fit for the data.

Another way to see if the model is a good fit for the data is to look at the graph in the printout. In this case, the straight line (in red) is the hypothetical model that youre trying to fit to the data. The green jagged line is the actual pattern of the data. As you can see, they dont look much alike.

$ Spent on Medical Expenses This Month


300

200

100

Observed 0 -6 -4 -2 0 2 4 6 Linear

Month Before (-) or After (+) Start of Psychotherapy

Now go back to the original dialog box. Un-check the linear model, and select the quadratic and cubic models instead. Hit OK to see the new output:

Curve Fit
MODEL: MOD_2._ MONTH Rsq .664 .666 d.f. 19 18 F 18.74 11.94 Sigf b0 b1 b2 b3

Independent:

Dependent Mth MED_COST QUA MED_COST CUB

.000 216.781 -1.8045 -4.6917 .000 216.781 -.1155 -4.6917

-.0949

This printout shows you two different models (based on the two boxes that you checked). You can see that the p-values for both the quadratic and cubic models are significant. In general, I recommend that you choose the simpler model (in this case, the quadratic one). Plug in the values of the beta coefficients to get this equation to describe the model: y = 216.781 1.8045x 4.6917x2

Heres the graph:

$ Spent on Medical Expenses This Month


300

200

100 Observed Quadratic 0 -6 -4 -2 0 2 4 6 Cubic

Month Before (-) or After (+) Start of Psychotherapy

Looking at this graph gives you another reason for choosing the quadratic model (as opposed to the cubic one). Both the quadratic and the cubic models look like a parabolaso the equation that actually describes a parabola (the quadratic equation) is probably the best explanation for the patterns observed in the data.

Vous aimerez peut-être aussi