bootstrap_maxlogL {EstimationTools}R Documentation

Bootstrap computation of standard error for maxlogL class objects.

Description

[Experimental]

bootstrap_maxlogL computes standard errors of maxlogL class objects by non-parametric bootstrap.

Usage

bootstrap_maxlogL(object, R = 2000, silent = FALSE, ...)

Arguments

object

an object of maxlogL class whose standard errors are going to be computed by bootstrap.

R

numeric. It is the number of resamples performed with the dataset in bootstrap computation. Default value is 2000.

silent

logical. If TRUE, notifications of bootstrap_maxlogL are suppressed.

...

arguments passed to boot used in this routine for estimation of standard errors.

Details

The computation performed by this function may be invoked when Hessian from optim and hessian fail in maxlogL or in maxlogLreg.

However, this function can be run even if Hessian matrix calculation does not fails. In this case, standard errors in the maxlogL class object is replaced.

Value

A modified object of class maxlogL.

Author(s)

Jaime Mosquera GutiƩrrez, jmosquerag@unal.edu.co

References

Canty A, Ripley BD (2017). boot: Bootstrap R (S-Plus) Functions.

See Also

maxlogL, maxlogLreg, boot

Examples

library(EstimationTools)

#--------------------------------------------------------------------------------
# First example: Comparison between standard error computation via Hessian matrix
# and standard error computation via bootstrap

N <- rbinom(n = 100, size = 10, prob = 0.3)
phat1 <- maxlogL(x = N, dist = 'dbinom', fixed = list(size = 10),
                link = list(over = "prob", fun = "logit_link"))

## Standard error computation method and results
print(phat1$outputs$StdE_Method)   # Hessian
summary(phat1)

## 'bootstrap_maxlogL' implementation
phat2 <- phat1                   # Copy the first 'maxlogL' object
bootstrap_maxlogL(phat2, R = 100)

## Standard error computation method and results
print(phat2$outputs$StdE_Method)   # Bootstrap
summary(phat2)


#--------------------------------------------------------------------------------


[Package EstimationTools version 4.0.0 Index]