I'm trying to estimate where the breakpoint of my lm is, but it only makes sense in my system to have a breakpoint value between 5 and 20. How can I specify psi location limits in segmented()?
psi=c(5,20) #does not work
psi=seq(5,20,1) #also does not work.
## segmented regression on linear trend
y <- birdpred$mean
z <- birdpred$year
lin.mod <- lm(y~z)
lm.seg <- segmented(lin.mod, seg.Z=~z, psi=c(5, 20))
lm.seg$psi ## breakpoint
Thank you!