Friday, 28 August 2015 14:12
To: r-help@r-project.org
Subject: [R] Piecewise regression using segmented package plotted in xyplot
Hi,
xyplot(threshold ~ age |frequency.a, data=rage,
groups=HL,
cex=0.5,
layout=c(7,4),
par.strip.tex=list(cex=0.8),
xlab="Age (years)",
ylab=&
I perhaps should have added a stronger warning here; note that the model
fitting in my previous post (below) uses explicit initial breakpoints for
segmented (specifically, c(30,60) at line 1 of the get.segments() ). if you
know where yours are, substitute them there. Otherwise, you'd need to us
There isn't an abline method for segmented, and even if there were you'd need
segments() for a segmented line plot. You're going to have to roll your own.
That will need a function to extract the break locations and predicted values
at those points
I don't have your data, so I can't do one spe
Hi,
xyplot(threshold ~ age |frequency.a, data=rage,
groups=HL,
cex=0.5,
layout=c(7,4),
par.strip.tex=list(cex=0.8),
xlab="Age (years)",
ylab="Threshold (dB SPL)",
na.rm="TRUE",
panel=function(x,y,groups,...) {
panel.superpose(x,y,groups=HL,...)
# panel.abline(segmented(lm(threshold~age
4 matches
Mail list logo