Learn R Programming

distrMod (version 2.5.3)

mceCalc-methods: Methods for functions mceCalc and mleCalc in Package `distrMod'

Description

Methods for functions mceCalc and mleCalc in package distrMod;

Usage

mceCalc(x, PFam, ...) mleCalc(x, PFam, ...) "mceCalc"(x, PFam, criterion, startPar = NULL, penalty = 1e20, crit.name, Infos = NULL, validity.check = TRUE, withthetaPar = FALSE,...) "mleCalc"(x, PFam, startPar = NULL, penalty = 1e20, Infos = NULL, validity.check = TRUE, ...) "mleCalc"(x, PFam, ...) "mleCalc"(x, PFam, ...) "mleCalc"(x, PFam, ...) "mleCalc"(x, PFam, ...) "mleCalc"(x, PFam, ...)

Arguments

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
withthetaPar
logical; shall Parameter theta be transmitted?
Infos
matrix; info slot to be filled in object of class MCEstimate; may be missing
validity.check
logical: shall return parameter value be checked for validity?
...
additional argument(s) for optim / optimize

Value

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
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

Details

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.