confint.segmented {segmented} | R Documentation |
Computes confidence intervals for the breakpoints in a fitted `segmented' model.
## S3 method for class 'segmented': confint(object, parm, level=0.95, rev.sgn=FALSE, digits=max(3, getOption("digits") - 3), ...)
object |
a fitted segmented object. |
parm |
the segmented variable of interest. If missing all the segmented variables are considered. |
level |
the confidence level required (default to 0.95). |
rev.sgn |
vector of logicals. The length should be equal to the length of parm ; recycled otherwise.
when TRUE it is assumed that the current parm is `minus' the actual segmented variable,
therefore the sign is reversed before printing. This is useful when a null-constraint has been set on the last slope. |
digits |
controls the number of digits to print when printing the output. |
... |
additional parameters |
Currently confint.segmented
computes confidence limits using standard errors coming from the Delta
method for the ratio of two random variables of the estimated. This value is a better approximation of the
one 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
.
A list of matrices. Each matrix includes point estimate and confidence limits of the breakpoint(s) for each segmented variable in the model.
Vito M.R. Muggeo
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)) confint(o)