Cubic spline variable formation (STB-10: srd15) ------------------------------- ^spline^ # variable [^if^ exp] [^in^ range] This ado-file designs a cubic spline variable(s) with anywhere from 3-7 knots at default joins. The # symbol in the syntax must be replaced by an integer from 3 to 7 inclusive. This is followed by a variable name; this should be a continuous variable. #-2 new variables are formed and given the default names ^knot1^, etc. These should be included in your model; there is little restriction on your model: it must be a single-equation but it can certainly be nonlinear (logistic, cox, etc. are allowed). After estimating your model with your variables, the linear form of the variable used for the splines and all "knot" variables, you should perform a joint test of the spline variables (the linear form and all knot variables simultaneously; I recommend ^testparm var kn*^). If this test is significant, the linear form is not sufficient. Obtain the predicted values and graph these predicted values against the linear variable--this graph MAY help you in determining a possible functional form, or transformation, to apply to this variable. The variables called knot# remain in your data set; thus, if you don't want these variables, or you want to use ^spline^ again (either for the same variable but with a different number of knots or for a different variable), you should either drop the variables or re-load your data set. Author ------ Richard Goldstein, Qualitas, Brighton, MA EMAIL goldst@@harvarda.bitnet