Gaussian: Parametrisation
Gaussian: Parametrisation
Parametrisation
The Gaussian distribution is
s
1
2
f (y) = exp s (y )
2
2
for continuously responses y where
: is the the mean
: is the precision
s: is a fixed scaling, s > 0.
Link-function
The mean and variance of y are given as
2 =
and
Hyperparameters
The precision is represented as
= log
and the prior is defined on .
Specification
family = gaussian
Required arguments: y and s (argument scale)
The scalings have default value 1.
Hyperparameter spesification and default values
hyper
theta
name log precision
short.name prec
initial 4
fixed FALSE
prior loggamma
param 1 5e-05
to.theta function(x) log(x)
from.theta function(x) exp(x)
1
1
s
survival FALSE
discrete FALSE
link default identity logit log
pdf gaussian
Example
In the following example we estimate the parameters in a simulated example with Gaussian responses,
giving a Gamma-prior with parameters (1, 0.01) and initial value (for the optimisations) of exp(2.0).
n=100
a = 1
b = 1
z = rnorm(n)
eta = a + b*z
tau = 100
scale = exp(rnorm(n))
prec = scale*tau
y = rnorm(n, mean = eta, sd = 1/sqrt(prec))
data = list(y=y, z=z)
formula = y ~ 1+z
result = inla(formula, family = "gaussian", data = data,
control.family = list(hyper = list(
prec = list(
prior = "loggamma",
param = c(1.0,0.01),
initial = 2))),
scale=scale, keep=TRUE)
summary(result)
Notes
None.