Re: [R] breakpoints and nonlinear regression

2012-01-19 Thread Vito Muggeo (UniPa)
dear Julian, Il 18/01/2012 14.36, crimsonengineer87 ha scritto: Thanks for the comments. Yes, I also had segmented and then I went away from that. I can't remember. I've tried using it but I get some sort of strange error. Here's some code ... it is difficult for me to help you without knowin

Re: [R] breakpoints and nonlinear regression

2012-01-18 Thread crimsonengineer87
Thanks for the comments. Yes, I also had segmented and then I went away from that. I can't remember. I've tried using it but I get some sort of strange error. Here's some code ... pavlu.glm <- glm(Na ~ yield, data=pavludata, family=gaussian) pavlu.seg <- segmented(pavlu.glm, seg.Z=~yield, psi=100

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Achim Zeileis
On Tue, 17 Jan 2012, crimsonengineer87 wrote: Thanks for the comments everyone. I was hoping to not have to find someone in the stats department ... well, we'll see. So in response to Z's comment ... I have tried breakpoints(Na ~ yield) and I did expect to get something continuous. You won't

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Rolf Turner
In respect of fitting piecewise linear regressions, have you looked at the "segmented" package? cheers, Rolf Turner On 18/01/12 04:30, crimsonengineer87 wrote: Dear Forum, I have been wracking my head over this problem for the past few days. I have a dataset of (x,y). I have been

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread crimsonengineer87
Thanks for the comments everyone. I was hoping to not have to find someone in the stats department ... well, we'll see. So in response to Z's comment ... I have tried breakpoints(Na ~ yield) and I did expect to get something continuous. The idea was to get two or three linear functions making up t

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Achim Zeileis
On Tue, 17 Jan 2012, Bert Gunter wrote: On Tue, Jan 17, 2012 at 8:06 AM, Kenneth Frost wrote: Sorry, that wasn't to helpful...I see that the intervals and se.fit argument are currently ignored. Yes, because the fitted values are nonlinear in the parameters, which makes finding exact confide

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Achim Zeileis
On Tue, 17 Jan 2012, crimsonengineer87 wrote: Dear Forum, I have been wracking my head over this problem for the past few days. I have a dataset of (x,y). I have been able to obtain a nonlinear regression line using nls. However, we would like to do some statistical analysis. I would like to ob

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Bert Gunter
On Tue, Jan 17, 2012 at 8:06 AM, Kenneth Frost wrote: > Sorry, that wasn't to helpful...I see that the intervals and se.fit argument > are currently ignored. Yes, because the fitted values are nonlinear in the parameters, which makes finding exact confidence regions impossible. I think the "usua

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread crimsonengineer87
Hi Ken, Thx for that advice. I took a brief look at it. I already have my curve by just using the curve() function using the parameters a and b given by the nls. Would se.fit and interval have computed the CI? Maybe where I'm confused is at how I can break up my curve into pieces of linear regres

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Kenneth Frost
Sorry, that wasn't to helpful...I see that the intervals and se.fit argument are currently ignored. On 01/17/12, crimsonengineer87 wrote: > Dear Forum, > > I have been wracking my head over this problem for the past few days. I have > a dataset of (x,y). I have been able to obtain a nonlinear

Re: [R] breakpoints and nonlinear regression

2012-01-17 Thread Kenneth Frost
Hi, Julian- I'm not sure if this will be what you want but you could start by taking a look at: ?predict.nls Ken On 01/17/12, crimsonengineer87 wrote: > Dear Forum, > > I have been wracking my head over this problem for the past few days. I have > a dataset of (x,y). I have been able to obtain

[R] breakpoints and nonlinear regression

2012-01-17 Thread crimsonengineer87
Dear Forum, I have been wracking my head over this problem for the past few days. I have a dataset of (x,y). I have been able to obtain a nonlinear regression line using nls. However, we would like to do some statistical analysis. I would like to obtain a confidence interval for the curve. We thou