View source: R/loglikelihood.R
| loglikelihood | R Documentation |
Return, via logLik or a custom S3 method, the (quasi)
log likelihood of a regression object.
loglikelihood(x, ...)
x |
a regression fit object |
... |
passed through to |
This function is used by cpr and cnr to determine the
(quasi) log likelihood returned in the cpr_cpr and cpr_cnr
objects.
Generally this function defaults to logLik. Therefore, if an S3
method for determining the (quasi) log likelihood exists in the workspace
everything should work. If an S3 method does not exist you should define
one.
See methods(loglikelihood) for a list of the provided methods. The
default method uses logLik.
the numeric value of the (quasi) log likelihood.
cpr cnr logLik
fit <- lm(mpg ~ wt, data = mtcars)
stats::logLik(fit)
cpr:::loglikelihood(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.