Hi Paul,
Thanks for starting this thread.
I have been struggling with the same plyr problems.
I have also had some trouble moving onto the next step -
integrating the segmented output with
ggplot2 or lattice. Have you had any luck in this?
There is good documentation on adding lm into
ggpl
m...@comcast.net]
Sent: Monday, October 14, 2013 5:30 PM
To: Prew, Paul
Cc: arun; R help
Subject: Re: [R] using ddply with segmented regression
On Oct 14, 2013, at 2:57 PM, Prew, Paul wrote:
> Hello, the code provided by arun did the trick. Thank you very much, arun.
>
> However, I&
h Center | Mail Stop ESC-F4412-A
655 Lone Oak Drive | Eagan, MN 55121-1560
-Original Message-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Saturday, October 12, 2013 1:42 AM
To: R help
Cc: Prew, Paul
Subject: Re: [R] using ddply with segmented regression
Hi,
Try:
segmentf_df
>
> Paul Prew | Statistician
> 651-795-5942 | fax 651-204-7504
> Ecolab Research Center | Mail Stop ESC-F4412-A
> 655 Lone Oak Drive | Eagan, MN 55121-1560
>
> -Original Message-
> From: arun [mailto:smartpink...@yahoo.com]
> Sent: Saturday, Octobe
y, October 12, 2013 1:42 AM
To: R help
Cc: Prew, Paul
Subject: Re: [R] using ddply with segmented regression
Hi,
Try:
segmentf_df <- function(df) {
out.lm<-lm(deltaWgt~Cycle, data=df)
segmented(out.lm,seg.Z=~Cycle,
psi=(Cycle=NA),control=seg.control(stop.if.error=FALSE,n.boot=0))
}
librar
Hi,
Try:
segmentf_df <- function(df) {
out.lm<-lm(deltaWgt~Cycle, data=df)
segmented(out.lm,seg.Z=~Cycle,
psi=(Cycle=NA),control=seg.control(stop.if.error=FALSE,n.boot=0))
}
library(plyr)
library(segmented)
dlply(df,.(Lot.Run),segmentf_df)
$`J062431-1`
Call: segmented.lm(obj = out.lm, seg.Z =
6 matches
Mail list logo