View source: R/bootstrap_maxlogL.R
bootstrap_maxlogL | R Documentation |
maxlogL
class objects.bootstrap_maxlogL
computes standard errors of
maxlogL
class objects by non-parametric bootstrap.
bootstrap_maxlogL(object, R = 2000, silent = FALSE, ...)
object |
an object of |
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 |
... |
arguments passed to |
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.
A modified object of class maxlogL
.
Jaime Mosquera GutiƩrrez, jmosquerag@unal.edu.co
Canty2017EstimationTools
maxlogL
, maxlogLreg
, boot
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) #--------------------------------------------------------------------------------
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.