estfun {lite} | R Documentation |
Functions for the estfun
method
Description
Functions to calculate contributions to the score vector from individual observations for a fitted model object.
Usage
## S3 method for class 'Bernoulli'
estfun(x, ...)
## S3 method for class 'GP'
estfun(x, eps = 1e-05, m = 3, ...)
Arguments
x |
A fitted model object. |
... |
Further arguments. None are used for
|
eps , m |
These control the estimation of the observed
information in |
Details
An estfun
method is used by
meatCL
to calculate the
meat
in the sandwich covariance estimator on which
the log-likelihood adjustments in flite
are based.
Specifically, meatCL
is used to calculate
the argument V
passed to adjust_loglik
.
Value
An n \times k
matrix containing contributions
to the score function from n
observations for each of the k
parameters.
estfun.Bernoulli
: an n \times 2
matrix, where
n
is the sample size, the length of the input data
to
fitBernoulli
. The column is named prob
.
estfun.GP
: an n \times 2
matrix, where n
is the
sample size, the length of the input data
to fitGP
.
The columns are named sigma[u]
and xi
.
See Also
Bernoulli
for maximum likelihood inference for the
Bernoulli distribution.
generalisedPareto
for maximum likelihood inference
for the generalised Pareto distribution.
Examples
library(sandwich)
# estfun.Bernoulli
bfit <- fitBernoulli(c(exdex::cheeseboro) > 45)
head(estfun(bfit))
# estfun.generalisedPareto
gpfit <- fitGP(c(exdex::cheeseboro), u = 45)
head(estfun(gpfit))