Skip to content
Prev 383887 / 398502 Next

How to find a split point in a curve?

Hello,

Are you looking for a segmented regression?

fit <- lm(Y ~ X)
seg <- segmented::segmented(fit, seg.Z = ~X)
seg$psi[, 'Est.']
#[1] 29.21595

plot(X, Y)
plot(seg, add = TRUE)


Hope this helps,

Rui Barradas


?s 16:12 de 14/05/20, Luigi Marongiu escreveu: