Re: Follow-up to piecewise regression question

Posted by Ryan on
URL: http://spssx-discussion.165.s1.nabble.com/Follow-up-to-piecewise-regression-question-tp5668949p5676588.html

For those interested, I decided to apply the approach I suggested below to the data provided in one of the websites Carol sent us the link for:

http://www.ats.ucla.edu/stat/spss/faq/piecewise.htm
 
I found that the slopes were identical. Moreover, after centering age at 14, the intercepts fell in line as well. As I think about it, the parameterization I proposed is essentially identical to the piecewise regression model reported on that website.
 
Ryan
On Sun, Apr 29, 2012 at 9:13 PM, R B <[hidden email]> wrote:
Carol,
 
It seems to me that a simple approach to allow for varying slopes would be to create an indicator variable of the age groups of interest (e.g., 0 thru <{a} = 1, {a} thru <{b} = 2, >= {b} = 3), and then to parameterize the model as follows:

MIXED y BY group WITH age
  /FIXED=group group*age | NOINT SSTYPE(3)
  /METHOD=REML
  /PRINT=SOLUTION.
 
The model above assumes that age has a linear relationship with the dependent variable that varies depending on the age group. The estimated group-specifc slopes (group*age interaction effects) are provided in the "Estimates of Fixed Effects" Table. If you wanted to test whether the group-specific slopes were significantly different from each other, you could add the following TEST statements:
 
  /TEST = "diff in slopes between grp 1 and grp 2" group*age 1 -1  0
  /TEST = "diff in slopes between grp 1 and grp 3" group*age 1  0 -1
  /TEST = "diff in slopes between grp 2 and grp 3" group*age 0  1 -1
 
The code provided above is untested, but I'm fairly certain it will do as I suggest.
 
Ryan
 
On Thu, Apr 26, 2012 at 8:00 PM, Parise, Carol A. <[hidden email]> wrote:
Hi all,
 
I posted a question last week about extending the information from these articles:
 
 
 
.....to accomodate having the coefficient represent the increase in odds of an event for every 1 year increase in age within an age group.
 
The examples in these articles demonstrate how to compute this when you want to split a group into above or below a single value such as <14 and 14+. I think that to have multiple groups, i need to constrain the age group so that the lower limit of the age group is 0 and each year in age within the age group increases by 1. The end result is that the number of cases in the new age matches the number of cases in the 38-50 age group.
 
With this in mind, i computed below what I think is the correct new variable to enter in a piecewise regression for a 38-50 age group.
 
However, I cannot find an example that validates or invaldates this idea.
 
Thanks for any references or information you may have.
 
Carol
 
 
 
age piecewise age 38-50
27 .
28 .
29 .
30 .
31 .
32 .
33 .
34 .
35 .
36 .
37 .
38 0
39 1
40 2
41 3
42 4
43 5
44 6
45 7
46 8
47 9
48 10
49 11
50 12
51 .
52 .
53 .
54 .
55 .
56 .
57 .