Download Nonlinear Regression in SPSS In this example, we are going to look

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
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 person’s medical treatment cost during that particular month.
Let’s try a standard linear regression model to see if we can predict “medical cost” from
“month.” Here’s how we’ll do it: Use the “Regression” : “Curve Estimation” command. (There
are other ways to do standard regression in SPSS, but this is the method we’ll 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._
Independent:
MONTH
Dependent Mth
Rsq
d.f.
F
MED_COST LIN
.012
20
.25
Sigf
b0
b1
.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 you’re trying to fit to the data.
The green jagged line is the actual pattern of the data. As you can see, they don’t look much
alike.
$ Spent on Medical Expenses This Month
300
200
100
Observed
0
Linear
-6
-4
-2
0
2
4
Month Before (-) or After (+) Start of Psychotherapy
6
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._
Independent:
MONTH
Dependent Mth
Rsq
d.f.
F
MED_COST QUA
MED_COST CUB
.664
.666
19
18
18.74
11.94
Sigf
b0
b1
b2
b3
.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
Here’s the graph:
$ Spent on Medical Expenses This Month
300
200
100
Observed
Quadratic
Cubic
0
-6
-4
-2
0
2
4
6
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 parabola—so the equation
that actually describes a parabola (the quadratic equation) is probably the best explanation for the
patterns observed in the data.