[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: How to make prediction after a spline regression
At 18:40 13/04/04 -0700, Shige Song wrote:
The -noconstant- option is mandatory if you want the parameters
corresponding to the reference splines to be the odds at the reference
point. If you do not have a -noconstant- option, then you should also omit
the reference spline corresponding to a reference point inside the
completeness range, and the parameters corresponding to the other reference
spline will then be odds ratios, comparing the values of the spline at the
other reference point to the value of the spline at the ommitted reference
point. However, in this case, the value of the spline at the ommitted
reference point will be given by the baseline odds parameter _cons, which
is usually not printed by Stata.
Thanks for the reply. One more thing, is the "noconstant" option in the
logistic regression mandatory or optional? I did not include in my xtlogit
model, it did not seem to influence the estimate (none of the spline terms
The best thing to do is probably to use the -noconstant- option with a unit
variable. For instance, if the reference splines are cs_1, cs_2, ... ,
cs_10, and the ommitted reference spline is cs_5, and the binary outcome
variable is y, then you can either type
logit y cs_*, or noconst
to estimate parameters corresponding to the odds at the reference points.
Alternatively, you can type
gene byte baseline=1
logit y baseline cs_1-cs_4 cs_6-cs_10, or noconst
and the parameter corresponding to the variable baseline will be the value
of the odds at the reference point corresponding to cs_5, and the
parameters corresponding to cs_1-cs_4 and to cs_6-cs_10 will be odds ratios
between the odds at the other reference point and the odds at the ommitted
reference point. Note that the ommitted reference point must be in the
completeness range of the spline.
I am currently preparing a paper on reference splines for submission to
Statistics in Medicine, explaining these issues. I can send you a copy of
the current preliminary draft on request.
I hope this helps.
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Opinions expressed are those of the author, not the institution.
* For searches and help try: