|
Lightbulb moment here...
based on my results, it looks like the issue is
that the
|
NOINT SSTYPE(3)
is applying the "no intercept" only to the first variable
listed.
Without NOINT, all variables get
refcats. But trying to do 2 separate /FIXED lines is not possible.
From:
Parise, Carol A. Sent: Thursday, May 03, 2012 9:23 AM To:
'R B'; [hidden email] Subject: RE: Follow-up to piecewise
regression question
This is
weird. I included 2 additonal fixed factors in the model but only posted
the output for age: num_sex and racenum10.
When i run
your code with the additional variables after the age variables on the /FIXED
line:
MIXED timehrs BY num_sex racenum10
age3 WITH newage /FIXED=age3 age3*newage num_sex racenum10 | NOINT
SSTYPE(3)
...I get
what you posted - no reference category where age has 3 parameters and the
actual age intercepts make logical sense for the data. It also correctly
leaves sex=1 as the refcat
Estimates of Fixed
Effectsa |
Parameter |
Estimate |
Std. Error |
df |
t |
Sig. |
95% Confidence Interval |
Lower Bound |
Upper Bound |
[age3=1.00] |
24.620714 |
.730377 |
13,805 |
33.710 |
.000 |
23.189075 |
26.052353 |
[age3=2.00] |
18.324952 |
.720691 |
13,805 |
25.427 |
.000 |
16.912300 |
19.737603 |
[age3=3.00] |
24.449104 |
1.072402 |
13,805 |
22.798 |
.000 |
22.347050 |
26.551158 |
[age3=1.00] * NewAge |
.036716 |
.022293 |
13,805 |
1.647 |
.100 |
-.006981 |
.080413 |
[age3=2.00] * NewAge |
.203924 |
.016284 |
13,805 |
12.523 |
.000 |
.172004 |
.235843 |
[age3=3.00] * NewAge |
.082119 |
.019039 |
13,805 |
4.313 |
.000 |
.044800 |
.119438 |
[num_sex=0] |
1.107044 |
.123436 |
13,805 |
8.969 |
.000 |
.865092 |
1.348996 |
[num_sex=1] |
0 |
0 |
. |
. |
. |
. |
. |
a. Dependent Variable:
timehrs. |
Model Dimensiona |
|
Number of Levels |
Number of Parameters |
Fixed Effects |
age3 |
3 |
3 |
age3 * NewAge |
3 |
3 |
num_sex |
2 |
1 |
a. Dependent Variable:
timehrs. |
When i run it with the 2 additional variables *first* on the /FIXED
line:
MIXED timehrs by num_sex racenum10 age3 with newAge
/FIXED = num_sex racenum10 age3 age3*newage |NOINT
SSTYPE(3)
...I get what I
posted where age3 has only 2 parameters and sex is included without a reference
category
Estimates of Fixed
Effectsa |
Parameter |
Estimate |
Std. Error |
df |
t |
Sig. |
95% Confidence Interval |
Lower Bound |
Upper Bound |
[num_sex=0] |
25.556148 |
1.073820 |
13,805 |
23.799 |
.000 |
23.451315 |
27.660981 |
[num_sex=1] |
24.449104 |
1.072402 |
13,805 |
22.798 |
.000 |
22.347050 |
26.551158 |
[age3=1.00] |
.171610 |
1.293038 |
13,805 |
.133 |
.894 |
-2.362920 |
2.706140 |
[age3=2.00] |
-6.124152 |
1.282973 |
13,805 |
-4.773 |
.000 |
-8.638953 |
-3.609351 |
[age3=3.00] |
0 |
0 |
. |
. |
. |
. |
. |
[age3=1.00] * NewAge |
.036716 |
.022293 |
13,805.000 |
1.647 |
.100 |
-.006981 |
.080413 |
[age3=2.00] * NewAge |
.203924 |
.016284 |
13,805 |
12.523 |
.000 |
.172004 |
.235843 |
[age3=3.00] * NewAge |
.082119 |
.019039 |
13,805 |
4.313 |
.000 |
.044800 |
.119438 |
a. Dependent Variable:
timehrs. |
Model Dimension |
|
Number of Levels |
Number of Parameters |
Fixed Effects |
num_sex |
2 |
2 |
age3 |
3 |
2 |
age3 * NewAge |
3 |
3 |
I then ran
MIXED timehrs BY num_sex racenum10 age3 WITH
newage /FIXED=racenum10 age3 age3*newage num_sex | NOINT
SSTYPE(3)
....and guess what - racenum10 no longer had a refcat
but both sex and age did.
i never thought it mattered what order the fixed
factors were place on the /FIXED line but this completely changed the model
parameters.
Carol
Carol,
The following "Estimates of Fixed Effects" Table was taken from the
MIXED model analysis I ran initially on the talk.sav dataset from that
website. Notice that the grand intercept has been removed and there are no
reference categories. The main effects represent group-specific intercepts and
the interaction effects represent group-specific slopes. I don't have much more
time to dedicate to this topic, but I urge you to review the code I posted and
to make sure that you are parameterizing your model the same way.
Ryan
Estimates of Fixed
Effectsa
|
Parameter
|
Estimate
|
Std. Error
|
df
|
t
|
Sig.
|
95% Confidence Interval
|
Lower Bound
|
Upper Bound
|
[group=.00]
|
8.076798
|
4.563993
|
196
|
1.770
|
.078
|
-.924042
|
17.077637
|
[group=1.00]
|
-24.972667
|
5.430149
|
196
|
-4.599
|
.000
|
-35.681687
|
-14.263646
|
[group=.00] * age
|
.681919
|
.437809
|
196
|
1.558
|
.121
|
-.181501
|
1.545340
|
[group=1.00] * age
|
3.629046
|
.286749
|
196.000
|
12.656
|
.000
|
3.063537
|
4.194554
|
a. Dependent Variable: talking on the phone.
|
On Wed, May 2, 2012 at 2:58 PM, R B <[hidden email]> wrote:
Carol,
Something's wrong with your analysis. Your "Estimates of Fixed Effects"
should include three main effect terms (representing intercepts) and three
interaction terms (representing slopes). Instead, it looks like you have a
reference category for age. Did you run the analysis a couple different
ways?
Ryan
On Wed, May 2, 2012 at 2:34 PM, Parise, Carol A. <[hidden email]> wrote:
Here is the result of using age in its original form and
the \TEST statements.
What just dawned on me as i was looking at this is that
since there is a significant interaction for age3*age, the main effect of
age3 is no longer applicable - just like in any other anova.
The efffect of age on time, depends on which part of the
age continum one is on. So, there is no effect of being under age 38
on finish time but being between 38-51 means you get slower by .20 hrs for
every year. If you are over 50, then you still slow down but not as much.
Estimates of Fixed
Effectsa |
Parameter |
Estimate |
Std. Error |
df |
t |
Sig. |
95% Confidence
Interval |
|
|
|
|
|
|
Lower Bound |
Upper Bound |
[age3=1.00] |
.171610 |
1.293038 |
13,805 |
.133 |
.894 |
-2.362920 |
2.706140 |
[age3=2.00] |
-6.124152 |
1.282973 |
13,805 |
-4.773 |
.000 |
-8.638953 |
-3.609351 |
[age3=3.00] |
0b |
0 |
. |
. |
. |
. |
. |
[age3=1.00] * NewAge |
.036716 |
.022293 |
13,805.000 |
1.647 |
.100 |
-.006981 |
.080413 |
[age3=2.00] * NewAge |
.203924 |
.016284 |
13,805 |
12.523 |
.000 |
.172004 |
.235843 |
[age3=3.00] * NewAge |
.082119 |
.019039 |
13,805 |
4.313 |
.000 |
.044800 |
.119438 |
/TEST = "diff in slopes between <38 and 38-50"
age3*newAge 1 -1 0
The estimate is simply 0.037-0.203 and it's significant
which means that the slopes change from one age group to another. I believe
that this provides the rationale for selecting this cutpoint in the data.
Contrast |
Estimate |
Std. Error |
df |
Test Value |
t |
Sig. |
95% Confidence
Interval |
|
|
|
|
|
|
|
Lower Bound |
Upper Bound |
L1 |
-.167208 |
.027493 |
13,805 |
0 |
-6.082 |
.000 |
-.221098 |
-.113318 |
a. diff in slopes between
<38 and 38-50 |
/TEST = "diff in slopes between <38 and
51+" age3*newAge 1 0 -1
The estimate is 0.203-0.082 and it's not
significant which means that the slopes aren't really that different.
Contrast |
Estimate |
Std. Error |
df |
Test Value |
t |
Sig. |
95% Confidence
Interval |
|
|
|
|
|
|
|
Lower Bound |
Upper Bound |
L1 |
-.045403 |
.029255 |
13,805 |
0 |
-1.552 |
.121 |
-.102747 |
.011940 |
a. diff in slopes between
<38 and 51+ |
/TEST = "diff in slopes between 38-50 and 51+"
age3*newAge 0 1 -1.
The difference in slopes between 38-50 and 51+ is
significant which means that the cut point at age 50 is
justfiable.
Contrast |
Estimate |
Std. Error |
df |
Test Value |
t |
Sig. |
95% Confidence
Interval |
|
|
|
|
|
|
|
Lower Bound |
Upper Bound |
L1 |
.121804 |
.024961 |
13,805 |
0 |
4.880 |
.000 |
.072877 |
.170731 |
a. diff in slopes between 38-50 and
51+ |
In the end, people under 38 and over 51 slow down by just
around the same amount of time...but you slow down more in those middle
ages.
Thanks again for taking the time to post. This was
actually really fun to work though and see how it affected my
results.
Carol
|