Date: Tue, 20 Mar 2007 21:48:46 -0700
Reply-To: Dale McLerran <stringplayer_2@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Dale McLerran <stringplayer_2@YAHOO.COM>
Subject: Re: Conditional clauses in a regression model
Content-Type: text/plain; charset=iso-8859-1
--- Jean-Jacques Dubois <jjbdubois@MINDSPRING.COM> wrote:
> Hello all,
> I have to work with yet another awful regression model, made up of
> intersecting hyperbolas, which can be fitted using at least two PROCs
> and MODEL), using conditional syntax. In PROC NLIN, it looks
> something like
> proc NLIN data=a method=Marquardt;
> Y1= a*x/ x ;
> Y2= b*x/ x ;
> parameters a=5 to 50 by 5
> b=5 to 50 by 5
> c=0 to 5 by 1;
> if Y1<Y2 then model=Y1-c;
> else model=Y2-c;
> an equivalent would be:
> This does not work out too badly with the data of interest, but users
> very curious to know just how SAS handles the fitting of this type of
> so-called ‘segmented’ model. I am not quite sure what they mean,
> but I think
> they would like more detail of how the objective function is
> computed, then
> minimized, when conditional clauses are involved.
> I know I would like to know.
> I have not had much success in the literature, and I hope one of you
> will be
> able to shed some light.
David Cassell has not yet found time to respond to your question,
so let me play the curmudgeon role here tonight. So, before
answering your question, I have a number of questions for you
1) How are the data presented to you? Do you have just a single
response variable Y that theory indicates should have two
different functional relationships with a predictor X depending
on whether the predictor has X>=X_join?
2) Why do you have only a single intercept term in your model?
Unless you know that the two segments should join at X=0, then you
really should have two intercepts in your model, shouldn't you?
3) Also, I would note that the code you present above has no response
variable named, so the above code cannot be code that you have
used to fit a model. Without really knowing what code you have
fit, it is not really possible to say what your estimation model
4) Finally, if you don't know how the model is being fit, then how
do you know that you are fitting an appropriate model in the
first place? It seems rather odd to me to write, in essence,
"This is my model, now tell me what it does."
Sorry to be so terse here, but your post raises a lot of questions
and red flags to me.
Fred Hutchinson Cancer Research Center
Ph: (206) 667-2926
Fax: (206) 667-5977
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.