Bookmark and Share

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

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

st: question about use of restricted cubic splines in regression

From   "Airey, David C" <>
To   "" <>
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?


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index