Methods for functions mceCalc and mleCalc in package distrMod;
mceCalc(x, PFam, ...)
mleCalc(x, PFam, ...)
# S4 method for numeric,ParamFamily
mceCalc(x, PFam, criterion,
startPar = NULL, penalty = 1e20, crit.name,
Infos = NULL, validity.check = TRUE,
withthetaPar = FALSE,...)
# S4 method for numeric,ParamFamily
mleCalc(x, PFam, startPar = NULL,
penalty = 1e20, dropZeroDensity = TRUE, Infos = NULL,
validity.check = TRUE, ...)
# S4 method for numeric,BinomFamily
mleCalc(x, PFam, ...)
# S4 method for numeric,PoisFamily
mleCalc(x, PFam, ...)
# S4 method for numeric,NormLocationFamily
mleCalc(x, PFam, ...)
# S4 method for numeric,NormScaleFamily
mleCalc(x, PFam, ...)
# S4 method for numeric,NormLocationScaleFamily
mleCalc(x, PFam, ...)a list with components
estimate--- the estimate as a named vector of numeric
criterion--- the criterion value (i.e.; a numeric of length 1);
e.g. the neg. log likelihood
est.name--- the name of the estimator
param--- estimate coerced to class ParamFamParameter
crit.fct--- a function with the named components of theta
as arguments returning the criterion value; used for
profiling / coercing to class mle
method--- a character reporting how the estimate was obtained, i.e.,
by optim, by optimize or by explicit calculations
character; the name of the criterion; may be ""
matrix; info slot to be filled in object of class MCEstimate;
may be NULL
numeric; sample size of x
numeric; data at which to evaluate the estimator
an object of class ParamFamily; the parametric family at
which to evaluate the estimator
a function measuring the ``goodness of fit''
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
numeric; penalizes non-permitted parameter values
character; the name of the criterion; may be missing
logical; shall Parameter theta be transmitted?
matrix; info slot to be filled in object of class MCEstimate;
may be missing
logical: shall return parameter value be checked for validity?
logical of length 1; shall observations with
density zero be dropped? Optimizers like optim require finite
values, so get problems when negative loglikelihood is evaluated.
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.