mgcv
This extracts the score of the log-likelihood for each observation for a
model estimated using gam
or bam
. It is necessary to allow
mgcv
to work correctly with functions from sandwich
to product
cluster or robust standard errors.
# S3 method for gam
estfun(x, correct_df = TRUE, override_check = FALSE, ...)
A matrix used internally for sandwich
.
A model estimated using gam
or bam
.
The default, TRUE
, adjusts sandwich
to use the
effective degrees of freedom for k
instead of the number of columns
of the design. FALSE
uses k
.
The default, FALSE
, allows this function to be
used inside of sandwich
. If only the matrix of scores is required,
set to TRUE
.
Not used for estfun.gam
.