Learn R Programming

segmented (version 2.2-1)

confint.stepmented: Confidence intervals for jumpoints in stepmented regression

Description

Computes confidence intervals for the changepoints (or jumpoints) in a fitted `stepmented' model.

Usage

# S3 method for stepmented
confint(object, parm, level=0.95, method=c("delta", "score", "gradient"), 
    round=TRUE, cheb=FALSE, digits=max(4, getOption("digits") - 1), 
    .coef=NULL, .vcov=NULL, ...)

Arguments

Value

A matrix including point estimate and confidence limits of the breakpoint(s) for the stepmented variable possibly specified in parm.

Details

confint.stepmented computes confidence limits for the changepoints. Currently the only option is 'delta', i.e. to compute the approximate covariance matrix via a smoothing approximation (see vcov.stepmented) and to build the limits using the standard Normal quantiles. Note that, the limits are rounded to the lowest observed value, thus the resulting confidence interval might not be symmetric if the stepmented covariate has not equispaced values.

See Also

stepmented and lines.segmented to plot the estimated breakpoints with corresponding confidence intervals.

Examples

Run this code
set.seed(10)
x<-1:100
z<-runif(100)
y<-2+2.5*(x>45)-1.5*(x>70)+z+rnorm(100)
o<-stepmented(y, npsi=2)

confint(o) #round=TRUE is default
confint(o, round=FALSE)  

Run the code above in your browser using DataLab