extractLL | R Documentation |
This function extracts the log-likelihood from an object of coxme
,
coxph
, lmekin
, maxlikeFit
, vglm
, or various
unmarkedFit
classes.
extractLL(mod, ...)
## S3 method for class 'coxme'
extractLL(mod, type = "Integrated", ...)
## S3 method for class 'coxph'
extractLL(mod, ...)
## S3 method for class 'lmekin'
extractLL(mod, ...)
## S3 method for class 'maxlikeFit'
extractLL(mod, ...)
## S3 method for class 'unmarkedFit'
extractLL(mod, ...)
## S3 method for class 'vglm'
extractLL(mod, ...)
mod |
an object of |
... |
additional arguments passed to the function. |
type |
a character string indicating whether the integrated partial
likelihood ("Integrated") or penalized likelihood ("Penalized") is to
be used for a |
This utility function extracts the information from a coxme
,
coxph
, lmekin
, maxlikeFit
, vglm
, or
unmarkedFit
object resulting from distsamp
,
gdistsamp
, gmultmix
, multinomPois
,
gpcount
, occu
, occuRN
, colext
,
pcount
, or pcountOpen
.
These functions return the value of the log-likelihood of the model and associated degrees of freedom.
Marc J. Mazerolle
AICc
, aictab
, coxme
,
coxph
, lmekin
,
maxlike
, distsamp
,
gdistsamp
, occu
,
occuRN
, colext
,
pcount
, pcountOpen
##single-season occupancy model example modified from ?occu
## Not run:
require(unmarked)
##single season
data(frogs)
pferUMF <- unmarkedFrameOccu(pfer.bin)
## add some fake covariates for illustration
siteCovs(pferUMF) <- data.frame(sitevar1 = rnorm(numSites(pferUMF)),
sitevar2 = rnorm(numSites(pferUMF)))
## observation covariates are in site-major, observation-minor order
obsCovs(pferUMF) <- data.frame(obsvar1 = rnorm(numSites(pferUMF) *
obsNum(pferUMF)))
##run model set
fm1 <- occu(~ obsvar1 ~ sitevar1, pferUMF)
##extract log-likelihood
extractLL(fm1)
detach(package:unmarked)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.