View source: R/SpecPrior-generators.R
Weights | R Documentation |
In normal usage, it is better to accept the default priors for the weights than to specify them explicitly. End users are therefore unlikely to need this function.
Weights(mean = 0, sd = 1, damp = Damp(), scale1 = HalfT(), scale2 = HalfT())
mean |
The mean of the prior for |
sd |
The standard deviation of the prior for |
damp |
An object of class |
scale1 |
An object of class |
scale2 |
An object of class |
A Mix
prior treats an interaction as a mixture of
normal distributions. The weights, also referred as mixture
parameters, evolve over time. The evolution of the weight for
each component is governed by an auto-regressive time series model.
Specifically, transformed values of the weights are modelled
using
level1[k,h] = level2[k,h] + error1[k,h]
level2[k,h] = mean + damp * level2[k-1,h] + error2[k,h]
mean
has a normal prior.
damp
has the boundary-avoiding prior described in
Gelman et al (2004) p316-317. This prior is equivalent to assuming
a Beta(2, 2) prior on the transformed parameter (damp
+0.5)/2.
error1
and error2
both have half-t priors. These
priors have the defaults described in HalfT
.
An object of class Weights
.
Mixture priors are specified using Mix
.
The weights in a mixture prior are specified using
Weights
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.