Learn R Programming

segmented (version 0.2-1)

ci.psi: Interval estimate for the breakpoints

Description

ci.psi returns confidence intervals for the breakpoints from a fitted segmented model.

Usage

ci.psi(ogg, level = 0.95, Fieller = FALSE)

Arguments

ogg
a fitted object of class "segmented".
level
confidence level of the interval. Default to 0.95.
Fieller
if TRUE, the Fieller's method is applied. Currently unimplemented.

Value

  • A list of matrices. Each matrix includes point estimate and confidence limits of the breakpoint(s) for each segmented variable in the model.

Details

Currently ci.psi computes confidence limits using the approximate standard errors of the estimated breakpoints as reported in the `psi' component of the list returned by any segmented method. The resulting confidence intervals are based on the asymptotic Normal distribution of the breakpoint estimator which is reliable just for clear-cut kink relationships. See Details in segmented.

See Also

see also segmented

Examples

Run this code
set.seed(10)
x<-1:100
z<-runif(100)
y<-2+1.5*pmax(x-35,0)-1.5*pmax(x-70,0)+10*pmax(z-.5,0)+rnorm(100,0,2)
out.lm<-lm(y~x)
o<-segmented(out.lm,seg.Z=~x+z,psi=list(x=c(30,60),z=.4)) 
ci.psi(o)

Run the code above in your browser using DataLab