Find the log-likelihood of a fitted model when estmethod
is "ml"
or "reml"
.
# S3 method for splm
logLik(object, ...)
# S3 method for spautor
logLik(object, ...)
# S3 method for spglm
logLik(object, ...)
# S3 method for spgautor
logLik(object, ...)
Arguments
- object
A fitted model object from splm()
, spautor()
, spglm()
, or spgautor()
where estmethod
is "ml"
or "reml"
.
- ...
Other arguments. Not used (needed for generic consistency).
Value
The log-likelihood.
Examples
spmod <- splm(z ~ water + tarp,
data = caribou,
spcov_type = "exponential", xcoord = x, ycoord = y
)
logLik(spmod)
#> 'log Lik.' 2.924924 (df=3)