[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: broken stick (piecewise linear) regression

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: broken stick (piecewise linear) regression
Date   Thu, 31 Jan 2008 21:09:41 -0000

That does sound a good example. Assuming that your subjects don't die as
a result of your experiments, wouldn't you need to include the return to
the previous state too? I doubt that my own transitions in and out of
breathlessness execute the same trajectory in state space, but I am just
a person and not a physiologist. 

But what does SAS NLIN PROC offer that Stata doesn't? 

What you mean by "found lacking" in -nl- is not spelled out here. There
are plenty of stories of -nl- only behaving as users would wish with a
different parameterisation or different starting values. I guess that
yours could be among them. The indictment would not be of -nl- but of
how it wss set up. 

[email protected] 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Raphael
Sent: 31 January 2008 20:58
To: [email protected]
Subject: Re: st: RE: broken stick (piecewise linear) regression

-nl- offers a solution but it is NOT a good one. I have tested it with
data from the cited paper below and have been found lacking.

Here is one reason why we fit two-line models rather than a smooth
In examining the relationship between two linear metabolic variables,
as a person exercise we can detect the time at which this person
changes form aerobic to anaerobic state (i.e. change in slope). That
point is what we refer to as the changepoint. Here interest lies in
estimating the changepoint.
The Statistician (2001). 50, Part 1, 51-61.

I am a bit disappointed though that Stata is still lagging behind.


On Jan 31, 2008 3:27 PM, Nick Cox <[email protected]> wrote:
> I don't understand what distinction is being made here.
> My understanding is that nonlinear least squares is one flavour of
> numerical optimisation. Whether -nl- is an especially good way to
> proceed with the broken stick problem I cannot say, but on the face of
> it that is one clear solution.
> In any event Mata now includes much more on numerical optimisation
> was available in 2005, so Raphael has several approaches to choose
> in writing his program.
> I'll insert my own prejudice: it seems to me that if broken stick
> is an appropriate model, rather than something smoother, then the
> breakpoint will be fairly obvious in any case, at least in terms of an
> initial value.
> Nick
> [email protected]
> Raphael Fraser
> I saw a thread with the above subject line concerning
> piecewise linear regression posted in 2005 on Statalist.
> I am facing the same problem now; that of estimating the unknown
> change point. Mention was made of using -nl- but it uses
> least squares method. The only way to solve this problem
> is numerical optimization. The problem can be solved
> quite easily in SAS using NLIN PROC.
> Is there a Stata solution?
> *
> *   For searches and help try:
> *
> *
> *
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index