On Thu, Jan 28, 2010 at 9:32 PM, Maarten buis <[email protected]> wrote:
> --- On Thu, 28/1/10, Dan MacNulty wrote:
>> Can STATA estimate a logistic spline regression model in
>> which the knot is treated as unknown and estimated as a
>> parameter? If so, I'd be very grateful if someone could
>> point me in the right direction.
>
> I doubt any software can. This is a very tough estimation
> problem even if you have continuous dependent variable.
> With a dichotomous dependend variables there is much less
> information present in your data about the shape the
> association between your dependent and independent
> variable. I had a quick stab at doing this in -ml-, but
> I was not surprised to find that these models just don't
> converge, even with good starting values. So I don't
> think that this is a software problem, but rather that
> this is a data problem: there is just not enough information
> in data with a dichotomous dependent variables on the
> shape of the relationship to reliably estimate this type
> of model.
>
Surely that depends on the size of the dataset too? If Dan's outcome
variable has thousands of successes and thousands of failures then i'd
have thought there might be enough information to estimate the
position of a single knot in a linear spline, if not in a cubic
spline. Agree there's no built-in command to fit this (nor
user-written one AFAIK) so it would take a bit of programming in -ml-
(though you could call -mkspline- and -logit- to do most of the work).
Might take a little while to run though.
Roger.
--
Roger Harbord
http://www.epi.bris.ac.uk/staff/rharbord.htm
*
* 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/