Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Airey, David C" <david.airey@vanderbilt.edu> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
st: question about use of restricted cubic splines in regression |

Date |
Thu, 20 Oct 2011 23:01:15 -0500 |

. I have one continuous response Y and one continuous predictor X measured in 20 groups. One of the groups is a natural control, and I want to test whether each of the 19 other groups is different from the control. I'd like to fit the regression lines for each of the 20 groups using restricted cubic splines with 4 knots, because I know the response will not be linear but I don't want to assume a specific nonlinear function. I want to fit all 20 groups using fixed effects as the full model. I'm assuming equal variances across groups. I then want to fit a reduced model where the control group and one of the 19 other groups have the same coefficients, but the other 18 groups have different estimates. I then want to perform a likelihood ratio test for the difference. I will create reduced models for each of the other 18 groups and perform 18 more likelihood ratio tests to test whether the control group differs from one or more of the 19 other groups. I've not worked with restricted cubic splines before. Do I make a set of knots for each group? If I want coefficients shared between two groups I assume I recode the groups to have the same group identifier and make knot variables for the combined group? Do I also need indicator variables for group identification? -Dave * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: question about use of restricted cubic splines in regression***From:*Nick Cox <njcoxstata@gmail.com>

- Prev by Date:
**st: calculating many distances and storing them in many new variables** - Next by Date:
**st: Panel: Granger Causality test** - Previous by thread:
**st: calculating many distances and storing them in many new variables** - Next by thread:
**Re: st: question about use of restricted cubic splines in regression** - Index(es):