Description Usage Arguments Details Value Note Author(s) References Examples
View source: R/logLikFun.norm.R
Calculates the i-th log-likelihood of each y-yhat pair as described in \insertCiteSeber.2004spsh.
1 | logLikFun.norm(y, yhat, sigma)
|
y |
A vector of |
yhat |
A vector of |
sigma |
A vector of length 1 considering homoscedastic residuals. |
The underlying assumption is, that the model residuals (errors) are independently, and identically distributed (i.i.d.) following a normal distribution. Alternatively consider using dnorm.
log-likelihood value of an normal distribution with N~(0, sigma^2)
The assumption of i.i.d. and normal distribution is best investigated a posteriori.
Tobias KD Weber , tobias.weber@uni-hohenheim.de
Seber.2004spsh
1 2 3 4 5 6 7 | # homoscedastic residuals
sig.s <- .01
y.scat <- rnorm(100, 0, sig.s)
yhat <- (1:100)^1.2
y <- yhat + y.scat
sum(logLikFun.norm(y, yhat, sig.s))
plot(yhat-y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.