logLik.manylm: Calculate the Log Likelihood

Description Usage Arguments Details Value Examples

Description

Calculate the log likelihood of a multivariate linear model.

Usage

1
2
## S3 method for class 'manylm'
logLik(object, REML = FALSE, ...)

Arguments

object

a manylm object from which a log-likelihood value should be extracted.

...

some methods for this function require additional arguments.

REML

an optional logical value. If TRUE the restricted log-likelihood is returned, else, if FALSE, the log-likelihood is returned. Defaults to FALSE.

Details

It is assumed that the scale has been estimated (by maximum likelihood or REML), and all the constants in the log-likelihood are included.

Value

Returns an object, say r, of class logLik which is a number with attributes, attr(r, "df") (degrees of freedom) giving the number of (estimated) parameters in the model.

Examples

1
2
3
4
5
6
data(spider)
spiddat <- mvabund(spider$abund)
X <- spider$x

lm.spider <- manylm(spiddat~X)
logLik(lm.spider)

Example output

'log Lik.'  -82.23117,  -90.82730,  -72.20628,  -59.43927,  -62.45190,  -89.03656,  -98.13404, -120.14104, -121.73527, -117.76401, -118.10046,  -88.70699 (df=8)

mvabund documentation built on May 2, 2019, 6:10 p.m.