bread.maxLik: Bread for Sandwich Estimator

Description Usage Arguments Value Warnings Author(s) See Also Examples

View source: R/bread.maxLik.R

Description

Extracting an estimator for the ‘bread’ of the sandwich estimator, see bread.

Usage

1
2
## S3 method for class 'maxLik'
bread( x, ... )

Arguments

x

an object of class maxLik.

...

further arguments (currently ignored).

Value

Matrix, the inverse of the expectation of the second derivative (Hessian matrix) of the log-likelihood function with respect to the parameters. In case of the simple Maximum Likelihood, it is equal to the variance covariance matrix of the parameters, multiplied by the number of observations.

Warnings

The sandwich package is required for this function.

This method works only if the observaton-specific gradient information was available for the estimation. This is the case if the observation-specific gradient was supplied (see the grad argument for maxLik), or the log-likelihood function returns a vector of observation-specific values.

Author(s)

Arne Henningsen

See Also

bread, maxLik.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## ML estimation of exponential duration model:
t <- rexp(100, 2)
loglik <- function(theta) log(theta) - theta*t

## Estimate with numeric gradient and hessian
a <- maxLik(loglik, start=1 )

# Extract the "bread"
library( sandwich )
bread( a )

all.equal( bread( a ), vcov( a ) * nObs( a ) )

Example output

Loading required package: miscTools

Please cite the 'maxLik' package as:
Henningsen, Arne and Toomet, Ott (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443-458. DOI 10.1007/s00180-010-0217-1.

If you have questions, suggestions, or comments regarding the 'maxLik' package, please use a forum or 'tracker' at maxLik's R-Forge site:
https://r-forge.r-project.org/projects/maxlik/
         [,1]
[1,] 4.413217
[1] TRUE

maxLik documentation built on July 27, 2021, 1:07 a.m.