Re: [R] fit a "threshold" function with nls

2012-10-23 Thread Matthieu Stigler
quot;r-help@r-project.org" , Bert Gunter Subject: Re: [R] fit a "threshold" function with nls Message-ID: Content-Type: text/plain Thank you all for your help. I think I now understand the issue. I tried to write a likelihood function for my binomial model. Please excuse m

Re: [R] fit a "threshold" function with nls

2012-10-20 Thread Bert Gunter
__ >> From: Vito Muggeo [vito.mug...@unipa.it] >> Sent: Tuesday, October 16, 2012 9:55 AM >> To: Bert Gunter >> Cc: Véronique Boucher Lalonde; r-help@r-project.org; Ravi Varadhan >> Subject: Re: [R] fit a "threshold" function with nls >> >>

Re: [R] fit a "threshold" function with nls

2012-10-20 Thread Véronique Boucher Lalonde
using > optimization tools. > > Best, > Ravi > > From: Vito Muggeo [vito.mug...@unipa.it] > Sent: Tuesday, October 16, 2012 9:55 AM > To: Bert Gunter > Cc: Véronique Boucher Lalonde; r-help@r-project.org; Ravi Varadhan > Subjec

Re: [R] fit a "threshold" function with nls

2012-10-16 Thread Ravi Varadhan
Ravi From: Vito Muggeo [vito.mug...@unipa.it] Sent: Tuesday, October 16, 2012 9:55 AM To: Bert Gunter Cc: Véronique Boucher Lalonde; r-help@r-project.org; Ravi Varadhan Subject: Re: [R] fit a "threshold" function with nls Véronique, in addition to Bert's comments, I wo

Re: [R] fit a "threshold" function with nls

2012-10-16 Thread Vito Muggeo
Véronique, in addition to Bert's comments, I would like to bring to your attention that there are several packages that perform threshold/breakpoint/changepoint estimation in R, including cumSeg, segmented, strucchange, and bcp for a Bayesian approach Moreover some packages, such as cghFLasso

Re: [R] fit a "threshold" function with nls

2012-10-15 Thread Bert Gunter
Véronique: I've cc'ed this to a true expert (Ravi Varadhan) who is one of those who can give you a definitive response, but I **believe** the problem is that threshhold type function fits have objective functions whose derivatives are discontinuous,and hence gradient -based methods can run into t

[R] fit a "threshold" function with nls

2012-10-15 Thread Véronique Boucher Lalonde
I am trying to model a dependent variable as a threshold function of my independent variable. What I mean is that I want to fit different intercepts to y following 2 breakpoints, but with fixed slopes. I am trying to do this with using ifelse statements in the nls function. Perhaps, this is not an