Learn R Programming

distrMod (version 2.0.7)

meRes: helper functions for mceCalc and mleCalc

Description

helper functions to produce consistent lists to be digested in functions mceCalc and mleCalc

Usage

meRes(x, estimate, criterion.value, param, crit.fct, method = "explicit solution",
      crit.name = "Maximum Likelihood", Infos)
get.criterion.fct(theta, Data, ParamFam, criterion, fun, ...)
## S3 method for class 'numeric':
samplesize(object)

Arguments

x
numeric; the data at which to evaluate the estimate
estimate
numeric; the estimate
criterion.value
numeric; the value of the criterium
param
object of class ParamFamParameter; the parameter value
crit.fct
a function to fill slot minuslogl when an object of class MCEstimate is coerced to class mle (from package stats4); to this end function get.criterion.fct (also see deta
method
character; describes how the estimate was obtained
crit.name
character; name of the criterion
Infos
optional matrix of characters in two columns; information to be attached to the estimate
samplesize
numeric; the sample size at which the estimator was evaluated
theta
the parameter value as named numeric vector
Data
numeric; the data at which to evaluate the MCE
ParamFam
an object of class ParamFamily; the parametric family at which to evaluate the MCE
criterion
the criterion function used in the MCE
fun
wrapper to the criterion function used in the MCE (with certain checking whether parameter value is permitted and possibly penalizing if not; see code to , for example.)
...
further arguments to be passed to optim / optimize
object
numeric; the data at which to evaluate the estimate

Value

  • meResa list of prescribed structure to be digested in functions mceCalc and mleCalc by the internal helper function .process.meCalcRes.
  • get.criterion.fcta function; see details below;
  • samplesizenumeric

Details

get.criterion.fct produces a function criterion.fct to fill slot minuslogl when an object of class MCEstimate is coerced to class mle (from package stats4); this way we may use profiling methods introduced there also for objects of our classes. More specifically, we produce a function where all coordinates/components of theta appear as separate named arguments, which then calls fun with these separate arguments again stacked to one (named) vector argument; samplesize determines the samplesize of argument object,i.e.; if object has an attribute dim, it returns dim(object)[2], else length(object).