Bookmark and Share

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]

Re: st: multilevel mixed effects piecewise model with 1 unknown knot location


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: multilevel mixed effects piecewise model with 1 unknown knot location
Date   Wed, 23 Jan 2013 14:51:26 +0100

On Wed, Jan 23, 2013 at 1:12 PM, Jordan Silberman wrote:
> Does anyone know of a way to estimate in Stata a multilevel model that
> is piecewise, with 1 knot, at an unknown location?

That will require quite some custom programming. The problem is that
multilevel models are estimated using some form of maximum likelihood,
and the likelihood of such a hockey stick model is not smooth; at the
maximum you won't be able to compute the first and second derivative.
The tools in Stata for maximizing the likelihood require that the
first and second derivatives exist, so not only will you have to write
your own likelihood evaluator, but you also have to rewrite/adapt the
tools for maximizing that likelihood. I would say that is way too much
work to be realistic.

What you could do is a grid search, i.e. estimate many different
models with the knot at different locations and pick the one that fits
best

-- Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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