Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Estimator

Function to compute estimates


Description

The function Estimator provides a general way to compute estimates.

Usage

Estimator(x, estimator, name, Infos, asvar = NULL, nuis.idx,
          trafo = NULL, fixed = NULL, asvar.fct, na.rm = TRUE, ...,
          ParamFamily = NULL, .withEvalAsVar = TRUE)

Arguments

x

(empirical) data

estimator

function: estimator to be evaluated on x.

name

optional name for estimator.

Infos

character: optional informations about estimator

asvar

optionally the asymptotic (co)variance of the estimator

nuis.idx

optionally the indices of the estimate belonging to nuisance parameter

fixed

optionally (numeric) the fixed part of the parameter

trafo

an object of class MatrixorFunction – a transformation for the main parameter

asvar.fct

optionally: a function to determine the corresponding asymptotic variance; if given, asvar.fct takes arguments L2Fam(the parametric model as object of class L2ParamFamily) and param (the parameter value as object of class ParamFamParameter); arguments are called by name; asvar.fct may also process further arguments passed through the ... argument.

na.rm

logical: if TRUE, the estimator is evaluated at complete.cases(x).

...

further arguments to estimator.

ParamFamily

an optional object of class ParamFamily. Passed on to asvar.fct to compute asymptotic variances.

.withEvalAsVar

logical: shall slot asVar be evaluated (if asvar.fct is given) or just the call be returned?

Details

The argument criterion has to be a function with arguments the empirical data as well as an object of class "Distribution" and possibly ....

Value

An object of S4-class "Estimate".

Author(s)

See Also

Examples

x <- rnorm(100)
Estimator(x, estimator = mean, name = "mean")

X <- matrix(rnorm(1000), nrow = 10)
Estimator(X, estimator = rowMeans, name = "mean")

distrMod

Object Oriented Implementation of Probability Models

v2.8.4
LGPL-3
Authors
Matthias Kohl [aut, cph], Peter Ruckdeschel [cre, cph], R Core Team [ctb, cph] (for source file 'format.perc')
Initial release
2020-03-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.