| summary.segmented {segmented} | R Documentation |
summary method for class segmented.
## S3 method for class 'segmented'
summary(object, short = FALSE, var.diff = FALSE, ...)
## S3 method for class 'summary.segmented'
print(x, short=x$short, var.diff=x$var.diff,
digits = max(3, getOption("digits") - 3),
signif.stars = getOption("show.signif.stars"),...)
object |
Object of class "segmented". |
short |
logical indicating if the ‘short’ summary should be printed. |
var.diff |
logical indicating if different error variances should be computed in each interval of the segmented variable, see Details. |
x |
a |
digits |
controls number of digits printed in output. |
signif.stars |
logical, should stars be printed on summary tables of coefficients? |
... |
further arguments. |
If short=TRUE only coefficients of the segmented relationships are printed.
If var.diff=TRUE and there is only one segmented variable, different error variances are
computed in the intervals defined by the estimated breakpoints of the segmented variable.
For the jth interval with nj observations
the error variance is estimated via RSSj/(nj-p), where RSS_j is the residual sum of squares
in interval jth, and p are the model parameters. Note var.diff=TRUE does not affect
the parameter estimation which is performed via ordinary (and not weighted) least squares.
However if var.diff=TRUE the variance-covariance matrix of the estimates is computed via the
sandwich formula,
(X'X)^{-1}X'VX(X'X)^{-1}
where V is the diagonal matrix including the different error variance estimates. Standard errors are the square root of the main diagonal of this matrix.
A list (similar to one returned by segmented.lm or segmented.glm) with additional components:
psi |
estimated break-points and relevant (approximate) standard errors |
Ttable |
estimates and standard errors of the model parameters. This is similar
to the matrix |
gap |
estimated coefficients, standard errors and t-values for the ‘gap’ variables |
cov.var.diff |
if |
sigma.new |
if |
df.new |
if |
Vito M.R. Muggeo
##continues example from segmented() # summary(segmented.model,short=TRUE) ## an heteroscedastic example.. # set.seed(123) # n<-100 # x<-1:n/n # y<- -x+1.5*pmax(x-.5,0)+rnorm(n,0,1)*ifelse(x<=.5,.4,.1) # o<-lm(y~x) # oseg<-segmented(o,seg.Z=~x,psi=.6) # summary(oseg,var.diff=TRUE)$sigma.new