Learn R Programming

mvabund (version 4.2.1)

logLik.manylm: Calculate the Log Likelihood

Description

Calculate the log likelihood of a multivariate linear model.

Usage


# S3 method for 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.

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.

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.

Examples

Run this code
# NOT RUN {
data(spider)
spiddat <- mvabund(spider$abund)
lm.spider <- manylm(spiddat~., data=spider$x)
logLik(lm.spider)
# }

Run the code above in your browser using DataLab