confint.stepmented | R Documentation |
Computes confidence intervals for the breakpoints in a fitted ‘stepmented’ model.
## S3 method for class '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, ...)
object |
a fitted |
parm |
the stepmented variable of interest. If missing the first stepmented variable in |
level |
the confidence level required, default to 0.95. |
method |
which confidence interval should be computed. One of |
round |
logical. Should the values (estimates and lower/upper limits) rounded to the smallest integer? |
cheb |
logical. If |
digits |
controls the number of digits to print when returning the output. |
.coef |
The regression parameter estimates. If unspecified (i.e. |
.vcov |
The full covariance matrix of estimates. If unspecified (i.e. |
... |
additional arguments passed to |
confint.stepmented
computes confidence limits for the changepoints. Currently the only option is to compute the covariance matrix and to build
A matrix including point estimate and confidence limits of the breakpoint(s) for the
stepmented variable possibly specified in parm
.
Currently only method='delta' is allowed.
Vito M.R. Muggeo
stepmented
and lines.segmented
to plot the estimated breakpoints with corresponding
confidence intervals.
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) #delta CI for the 1st variable
confint(o, "x", method="score") #also method="g"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.