View source: R/fit_functions.R
logLik_o | R Documentation |
Returns the log-likelihood as calculated from the orthogonal residuals obtained by residuals_o
.
logLik_o(object)
object |
an object returned from |
The log-likelihood as calculated from the orthogonal residuals.
logLik_o
has no other generic functions on top, so for calculating AIC
, one has to apply AIC(logLik_o(model))
, see 'Examples'. The usual logLik
applies to the vertical residuals of the orthogonal model.
Andrej-Nikolai Spiess
DNase1 <- subset(DNase, Run == 1) DNase1$density <- sapply(DNase1$density, function(x) rnorm(1, x, 0.1 * x)) mod <- onls(density ~ Asym/(1 + exp((xmid - log(conc))/scal)), data = DNase1, start = list(Asym = 3, xmid = 0, scal = 1)) logLik_o(mod) ## compare AIC of vertical versus orthogonal residuals. AIC(mod) AIC(logLik_o(mod))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.