mleCalc-methods: Methods for functions mceCalc and mleCalc in Package... In distrMod: Object Oriented Implementation of Probability Models

Description

Methods for functions `mceCalc` and `mleCalc` in package distrMod;

Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21``` ```mceCalc(x, PFam, ...) mleCalc(x, PFam, ...) ## S4 method for signature 'numeric,ParamFamily' mceCalc(x, PFam, criterion, startPar = NULL, penalty = 1e20, crit.name, Infos = NULL, validity.check = TRUE, withthetaPar = FALSE,...) ## S4 method for signature 'numeric,ParamFamily' mleCalc(x, PFam, startPar = NULL, penalty = 1e20, dropZeroDensity = TRUE, Infos = NULL, validity.check = TRUE, ...) ## 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, ...) ```

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? `dropZeroDensity` 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`

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.

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`

distrMod documentation built on May 29, 2017, 5:45 p.m.