| mceCalc-methods {distrMod} | R Documentation |
Methods for functions mceCalc and mleCalc in package distrMod;
mceCalc(x, PFam, ...)
mleCalc(x, PFam, ...)
## S4 method for signature 'numeric, ParamFamily':
mceCalc(x, PFam, criterion,
startPar = NULL, penalty = 0, crit.name,
Infos = NULL, ...)
## S4 method for signature 'numeric, ParamFamily':
mleCalc(x, PFam, startPar = NULL,
penalty = 0, Infos = NULL, ...)
## S4 method for signature 'numeric, BinomFamily':
mleCalc(x, PFam, ...)
## S4 method for signature 'numeric, PoisFamily':
mleCalc(x, PFam, ...)
## S4 method for signature 'numeric, NormLocationFamily':
mleCalc(x, PFam, ...)
## S4 method for signature 'numeric, NormScaleFamily':
mleCalc(x, PFam, ...)
## S4 method for signature 'numeric,
## NormLocationScaleFamily':
mleCalc(x, PFam, ...)
x |
numeric; data at which to evaluate the estimator |
PFam |
an object of class ParamFamily; the parametric family at
which to evaluate the estimator |
criterion |
a function measuring the ``goodness of fit'' |
startPar |
in case optim is used: a starting value for the parameter fit;
in case optimize is used: a vector containing a search interval for the
(one-dim) parameter |
penalty |
numeric; penalizes non-permitted parameter values |
crit.name |
character; the name of the criterion; may be missing |
Infos |
matrix; info slot to be filled in object of class MCEstimate;
may be missing |
... |
additional argument(s) for optim / optimize |
mceCalc is used internally by function MCEstimator to allow
for method dispatch according to argument PFam;
similarly, and for the same purpose mleCalc is used internally by function
MLEstimator.
This way we / or any other developper can write particular methods
for special cases where we may avoid using numerical optimization
without interfering with existing code.
For programming one's own mleCalc / mceCalc methods, there is
the helper function meRes to produce consistent return values.
a list with components
|
— the estimate as a named vector of numeric |
|
— the criterion value (i.e.; a numeric of length 1);
e.g. the neg. log likelihood |
|
— the name of the estimator |
|
— estimate coerced to class ParamFamParameter |
|
— a function with the named components of theta
as arguments returning the criterion value; used for
profiling / coercing to class mle |
|
— a character reporting how the estimate was obtained, i.e.,
by optim, by optimize or by explicit calculations |
crit.name |
character; the name of the criterion; may be "" |
Infos |
matrix; info slot to be filled in object of class MCEstimate;
may be NULL |
samplesize |
numeric; sample size of x |