Description Objects from the Class Slots Methods Author(s) See Also Examples
This class represents the result of a segmentation, usually
a call to the function segment.
Objects can be created by calls of the function
segment or by calls of the form new("segmentation", ...).
y:A matrix with the data (the dependent variable(s)), see segment.
x:A numeric vector with the regressor variable.
The length of this vector must be either the same as
nrow(y), or 0. The latter case is equivalent to
x=1:nrow(y).
flag:An integer vector, whose length must be either the same as
nrow(y), or 0. This can be used to flag certain
probes for special treatment, for example by
plotAlongChrom.
breakpoints:List of segmentations. The element
breakpoints[[j]] corresponds to a segmentation fit of
j segments, i.e. with j-1 breakpoints. It is a
matrix with (j-1) rows and 1 or 3 columns. It always
contains a column named estimate with the point estimates.
Optionally, it may contain columns lower and upper
with the confidence intervals. The point estimates are the row
indices in y where new segments start, for example:
let z=breakpoints[[j]], then the first segment
is from row 1 to z[1, "estimate"]-1,
the second from row z[1, "estimate"] to
z[2, "estimate"]-1, and so on.
logLik:Numeric vector of the same length as
breakpoints, containing the log-likelihood of the piecewise
constant models under the data y.
hasConfint:Logical vector of the same length as
breakpoints. TRUE if the confidence interval estimates
are present, i.e. if the matrix breakpoints[[j]] has
columns lower and upper.
nrSegments:A scalar integer, value must be either
NA or between 1 and length(breakpoints).
Can be used to select one of the fits in breakpoints for
special treatment, for example by
plotAlongChrom.
The method confint(object, parm, level=0.95,
het.reg=FALSE, het.err=FALSE, ...) computes confidence
intervals for the change point estimates of the
segmentation. Typically, these were obtained from a previous call
to the function segment that created the object.
This is just a wrapper for the function
confint.breakpointsfull
from the strucchange package, which does all the hard
computations.
Parameters: object an object of class segmentation,
parm an integer vector, it determines for which of the segmentation fits
confidence intervals are computed. See also segment.
The other parameters are directly passed on to
confint.breakpointsfull.
The method logLik(object, penalty="none", ...)
returns the log-likelihoods of fitted models. Valid values for the argument
penalty are none, AIC and BIC.
The method plot(x, y, xlim, xlab="x", ylab="y",
bpcol="black", bplty=1, pch=16, ...)
provides a simple visualization of the result of a
segmentation. Parameters: x an object of class segmentation,
y an integer between 1 and
length(x@breakpoints), selecting which of the fits
contained in x to plot, bpcol and bplty color
and line type of breakpoints. The plot shows the numeric data
along with breakpoints and if available their confidence intervals.
summary.
Wolfgang Huber huber@ebi.ac.uk
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.