Estimate-class {distrMod} | R Documentation |
Estimate-class.
Description
Class of estimates.
Objects from the Class
Objects can be created by calls of the form new("Estimate", ...)
.
More frequently they are created via the generating function
Estimator
.
Slots
name
Object of class
"character"
: name of the estimator.estimate
Object of class
"ANY"
: estimate.estimate.call
Object of class
"call"
: call by which estimate was produced.Infos
object of class
"matrix"
with two columns namedmethod
andmessage
: additional informations.asvar
object of class
"OptionalNumericOrMatrix"
which may contain the asymptotic (co)variance of the estimator.samplesize
object of class
"numeric"
— the samplesize (only complete cases are counted) at which the estimate was evaluated.completecases
object of class
"logical"
— complete cases at which the estimate was evaluated.nuis.idx
object of class
"OptionalNumeric"
: indices ofestimate
belonging to the nuisance part.fixed
object of class
"OptionalNumeric"
: the fixed and known part of the parameter.trafo
object of class
"list"
: a list with componentsfct
andmat
(see below).untransformed.estimate
Object of class
"ANY"
: untransformed estimate.untransformed.asvar
object of class
"OptionalNumericOrMatrix"
which may contain the asymptotic (co)variance of the untransformed estimator.
Methods
- name
signature(object = "Estimate")
: accessor function for slotname
.- name<-
signature(object = "Estimate")
: replacement function for slotname
.- estimate
signature(object = "Estimate")
: accessor function for slotestimate
.- untransformed.estimate
signature(object = "Estimate")
: accessor function for slotuntransformed.estimate
.- estimate.call
signature(object = "Estimate")
: accessor function for slotestimate.call
.- samplesize
signature(object = "Estimate")
: (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
signature(object = "Estimate")
: accessor function for slotcompletecases
.- asvar
signature(object = "Estimate")
: accessor function for slotasvar
.- asvar<-
signature(object = "Estimate")
: replacement function for slotasvar
.- untransformed.asvar
signature(object = "Estimate")
: accessor function for slotuntransformed.asvar
.- nuisance
signature(object = "Estimate")
: accessor function fornuisance
part of slotestimate
.- main
signature(object = "Estimate")
: accessor function formain
part of slotestimate
.- fixed
signature(object = "Estimate")
: accessor function for slotfixed
.- Infos
signature(object = "Estimate")
: accessor function for slotInfos
.- Infos<-
signature(object = "Estimate")
: replacement function for slotInfos
.- addInfo<-
signature(object = "Estimate")
: function to add an information to slotInfos
.- show
signature(object = "Estimate")
signature(object = "Estimate")
: 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 name/type of the estimator, the value of its main
part, and, if present, the corresponding standard errors, as well as,
also if present, the value of the nuisance part.
When show.detail
is matched to "medium"
, you will in
addition see the class of the estimator, its call and its sample-size
and, if present, the fixed part of the parameter and
the asymptotic covariance matrix. Also the information
gathered in the Infos
slot is shown.
Finally, when show.detail
is matched to "maximal"
,
and if, in addition, you estimate non-trivial (i.e. not the identity)
transformation of the parameter of the parametric family, you will also be
shown this transformation in form of its function and its derivative matrix
at the estimated parameter value, as well as the estimator (with standard errors,
if present) and (again, if present) the corresponding asymptotic covariance
of the untransformed, total (i.e. main and nuisance part) parameter.
trafo
realizes partial influence curves; i.e.; we are only
interested is some possibly lower dimensional smooth (not necessarily
linear or even coordinate-wise) aspect/transformation \tau
of the parameter \theta
.
To be coherent with the corresponding nuisance implementation, we make the following convention:
The full parameter \theta
is split up coordinate-wise
in a main parameter \theta'
and a nuisance parameter
\theta''
(which is unknown, too, hence has to be
estimated, but only is of secondary interest) and a fixed,
known part \theta'''
.
Without loss of generality, we restrict ourselves to the case that
transformation \tau
only acts on the main parameter
\theta'
— if we want to transform the whole
parameter, we only have to assume that both nuisance parameter
\theta''
and fixed, known part of the parameter
\theta'''
have length 0.
To the implementation:
Slot trafo
can either contain a (constant) matrix
D_\theta
or a function
\tau\colon \Theta' \to \tilde \Theta,\qquad \theta \mapsto \tau(\theta)
mapping main parameter
\theta'
to some range \tilde \Theta
.
If slot value trafo
is a function, besides \tau(\theta)
,
it will also return the corresponding derivative matrix
\frac{\partial}{\partial \theta}\tau(\theta)
.
More specifically, the return value of this function theta
is a
list with entries fval
, the function value \tau(\theta)
,
and mat
, the derivative matrix.
In case trafo
is a matrix D
, we interpret it as such a derivative
matrix \frac{\partial}{\partial \theta}\tau(\theta)
,
and, correspondingly, \tau(\theta)
as the linear mapping
\tau(\theta)=D\,\theta
.
Note
The pretty-printing code for methods show
and print
has been borrowed from print.fitdistr
in package MASS by B.D. Ripley.
Author(s)
Matthias Kohl Matthias.Kohl@stamats.de,
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de
See Also
Examples
x <- rnorm(100)
Estimator(x, estimator = mean, name = "mean")
x1 <- x; x1[sample(1:100,10)] <- NA
myEst1 <- Estimator(x1, estimator = mean, name = "mean")
samplesize(myEst1)
samplesize(myEst1, onlycomplete = FALSE)