benchonestep {OneStep}R Documentation

Performing benchmark of one-step MLE against other methods

Description

benchonestep performs a benchmark of one-step MLE against other methods on a given dataset. benchonestep.replicate repeats several times the procedure: data random generation and benchmark through benchonestep.

Usage

benchonestep(data, distr, methods, init, weights=NULL,...) 
benchonestep.replicate(nsample, nbsimu, distr, methods=NULL, echo=FALSE, ncpus=1, ...) 

Arguments

data

A numeric vector of length n

distr

A character string "name" naming a distribution for which the corresponding density function dname and the corresponding distribution function pname must be classically defined.

methods

A vector of methods: character among "mme", "mle", "onestep" (can be abbreviated).

init

A named list for the intial guess method.

weights

An optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector with strictly positive integers (typically the number of occurences of each observation). If non-NULL, weighted MLE is used, otherwise ordinary MLE.

...

unused for benchonestep; true parameters passed to rdistr for benchonestep.replicate

nsample

a numeric for the sample size.

nbsimu

a numeric for the replication number.

echo

a logical to display or not some traces of benchmarking.

ncpus

Number of processes to be used in parallel operation: typically one would fix it to the number of available CPUs.

Value

A matrix with estimate and time in seconds per method for benchonestep; an array with estimates, times, errors in seconds per method, per simulation for benchonestep.replicate.

Author(s)

Alexandre Brouste, Darel Noutsa Mieniedou, Christophe Dutang

References

L. LeCam (1956). On the asymptotic theory of estimation and testing hypothesis. In: Proceedings of 3rd Berkeley Symposium I, pages 355-368.

Examples

n <- 1000
set.seed(1234)

x <- rbeta(n, 3, 2)
benchonestep(x, "beta", c("mle", "one")) 

[Package OneStep version 0.9.3 Index]