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 |
distr |
A character string |
methods |
A vector of methods: character among
|
init |
A named list for the intial guess method. |
weights |
An optional vector of weights to be used in the fitting process.
Should be |
... |
unused for |
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"))