Confint-class {distrMod} | R Documentation |
Confint-class
Description
Return value S4 classes for method “confint”.
Objects from the Class
Objects could in principle be created by calls of the
form new("Confint", ...)
.
The preferred form is to have them created via a call to
confint
.
Slots
type
Object of class
"character"
: type of the confidence interval (asymptotic, bootstrap,...). Can be of length>2
. Then in printing, the first element is printed in the gap '[...]' in 'an [...] confidence interval', while the other elements are printed below.confint
Object of class
"array"
: the confidence interval(s).call.estimate
Object of class
"call"
: the estimate(s) for which the confidence intervals are produced.name.estimate
Object of class
"character"
: the name of the estimate(s) for which the confidence intervals are produced.samplesize.estimate
:Object of class
"numeric"
: the sample size of the estimate(s) for which the confidence intervals are (only complete cases) produced.completecases.estimate
:Object of class
"logical"
: complete cases at which the estimate was evaluated.trafo.estimate
Object of class
"matrix"
: the trafo/derivative matrix of the estimate(s) for which the confidence intervals are produced.nuisance.estimate
Object of class
"OptionalNumeric"
: the nuisance parameter (if any) at which the confidence intervals are produced.fixed.estimate
Object of class
"OptionalNumeric"
: the fixed part of the parameter (if any) at which the confidence intervals are produced.
Methods
- type
signature(object = "Confint")
: accessor function for slottype
.- confint
signature(object = "Confint", method = "missing")
: accessor function for slottype
.- call.estimate
signature(object = "Confint")
: accessor function for slotcall.estimate
.- name.estimate
signature(object = "Confint")
: accessor function for slotname.estimate
.- trafo.estimate
signature(object = "Confint")
: accessor function for slottrafo.estimate
.- samplesize.estimate
signature(object = "Confint")
: (with additional argumentonlycompletecases
defaulting toTRUE
returns the sample size; in case there are any incomplete cases and argumentonlycompletecases
isFALSE
, the number of these is added to slotsamplesize
.- completecases.estimate
signature(object = "Confint")
: accessor function for slotcompletecases.estimate
.- nuisance.estimate
signature(object = "Confint")
: accessor function for slotnuisance.estimate
.- fixed.estimate
signature(object = "Confint")
: accessor function for slotfixed.estimate
.- show
signature(object = "Confint")
: shows a detailed view of the object; slotsnuisance.estimate
andfixed.estimate
are only shown if non-null, and slottrafo.estimate
only if different from a unit matrix.signature(object = "Confint")
: just asshow
, but with additional argumentsdigits
.
Details for methods 'show', 'print'
Detailedness of output by methods show
, print
is controlled
by the global option show.details
to be set by
distrModoptions
.
As method show
is used when inspecting an object by typing the object's
name into the console, show
comes without extra arguments and hence
detailedness must be controlled by global options.
Method print
may be called with a (partially matched) argument
show.details
, and then the global option is temporarily set to this
value.
More specifically, when show.detail
is matched to "minimal"
you will be shown only the type of the confidence interval(s) and its/their
values. When show.detail
is matched to "medium"
, you will in
addition see the type of the estimator(s) for which it is produced,
the corresponding call of the estimater, its sample size, and, if present, the
value of the corresponding nuisance parameter.
Finally, when show.detail
is matched to "maximal"
, additionally
you will be shown the fixed part of the parameter (if present) and
the transformation of the estimator (if non-trivial, i.e. the
identity) in form of its function code respectively of its derivative matrix.
Note
The pretty-printing code for methods show
and print
has been borrowed from confint.default
in package stats.
Author(s)
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de
See Also
Estimator
, confint
, Estimate-class
,
trafo-methods
Examples
## some transformation
mtrafo <- function(x){
nms0 <- c("scale","shape")
nms <- c("shape","rate")
fval0 <- c(x[2], 1/x[1])
names(fval0) <- nms
mat0 <- matrix( c(0, -1/x[1]^2, 1, 0), nrow = 2, ncol = 2,
dimnames = list(nms,nms0))
list(fval = fval0, mat = mat0)}
x <- rgamma(50, scale = 0.5, shape = 3)
## parametric family of probability measures
G <- GammaFamily(scale = 1, shape = 2, trafo = mtrafo)
## MLE
res <- MLEstimator(x = x, ParamFamily = G)
ci <- confint(res)
print(ci, digits = 4, show.details="maximal")
print(ci, digits = 4, show.details="medium")
print(ci, digits = 4, show.details="minimal")