logLikFun.norm: Calculation of the Log-likelihood assuming Identially,...

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/logLikFun.norm.R

Description

Calculates the i-th log-likelihood of each y-yhat pair as described in \insertCiteSeber.2004spsh.

Usage

1

Arguments

y

A vector of n observed properties/variables of interest.

yhat

A vector of n model simulated properties/variables of interest.

sigma

A vector of length 1 considering homoscedastic residuals.

Details

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.

Value

log-likelihood value of an normal distribution with N~(0, sigma^2)

Note

The assumption of i.i.d. and normal distribution is best investigated a posteriori.

Author(s)

Tobias KD Weber , tobias.weber@uni-hohenheim.de

References

\insertRef

Seber.2004spsh

Examples

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)

spsh documentation built on April 14, 2020, 6:37 p.m.