slope.segmented {segmented}R Documentation

Summary for slopes of segmented relationships

Description

Computes summary of the slopes of each segmented relationship in the fitted model.

Usage

slope.segmented(ogg, level = 0.95)

Arguments

ogg an object of class "segmented", returned by any segmented method.
level the confidence level required.

Details

To fit broken-line relationships, segmented uses a parameterization whose coefficients are not the slopes. Therefore given an object "segmented", slope.segmented computes point estimates, standard errors, t-values and confidence intervals of the slopes of each segmented relationship in the fitted model.

Value

slope.segmented returns a list for each variable having a piecewise-linear relation with the response in the fitted model. Each list is a matrix with number of rows equal to number of segments and five columns summarizing the results.

Note

The returned summary is based on limiting Gaussian distribution for the model parameters involved in the computations. Sometimes even with large sample sizes such approximations are questionable (e.g., with small difference-in-slopes parameters) and the results returned by slope.segmented might be unreliable. Therefore is responsability of the user to gauge the applicability of such asymptotic approximations. Anyway, the t values may be not assumed for testing purposes and they should be used just as guidelines to assess the estimates' uncertainty.

Author(s)

Vito M. R. Muggeo, vito.muggeo@giustizia.it

References

Muggeo, V.M.R. (2003) Estimating regression models with unknown break-points. Statistics in Medicine 22, 3055–3071.

See Also

segmented

Examples

## A segmented relationship with three breakpoints
## 
x<-1:100
y<-2+1.5*pmax(x-35,0)-1.5*pmax(x-70,0)+rnorm(100,0,5)
dati<-data.frame(x=x,y=y)
out.lm<-lm(y~x,data=dati)
out.seg<-segmented(out.lm,Z=x,psi=c(20,80))
## the slopes of the three segments....
slope.segmented(out.seg)
rm(x,y,out.lm,out.seg)

[Package segmented version 0.1-4 Index]