LL_gaussian {gspcr} | R Documentation |
Gaussian log-likelihood
Description
Computes the gaussian (normal) log-likelihood of a vector of observed values given a trained linear regression model.
Usage
LL_gaussian(y, x, mod)
Arguments
y |
numeric vector recording a continuous dependent variable. |
x |
data.frame (or matrix) containing predictor values. |
mod |
|
Details
If x
and y
are equal to the data on which mod
has been trained, this function returns the same result as the default logLink
function. If x
and y
are new, the function returns the log-likelihood of the new data under the trained model.
Value
A list containing:
-
ll
an atomic vector of length 1 containing the log-likelihood value. -
sc
an atomic vector containing the systematic component for the inputx
andmod
.
Author(s)
Edoardo Costantini, 2022
[Package gspcr version 0.9.5 Index]