familyPrior | R Documentation |
"familyPrior"
objects provide a convenient way to specify the prior
distribution used for the Bayesian posterior mean estimation of the WALS
estimators in wals
, walsGLM
and
walsNB
familyPrior(object, ...)
weibull(q = 0.887630085544086, b = log(2))
subbotin(q = 0.799512530172489, b = 0.937673273794677)
laplace(b = log(2))
## S3 method for class 'familyPrior'
print(x, digits = max(3, getOption("digits") - 3), ...)
## S3 method for class 'wals'
familyPrior(object, ...)
object , x |
Object of of class |
... |
Further arguments passed to methods. |
q |
|
b |
|
digits |
The number of significant digits to display. |
familyPrior()
is a generic function that extracts the family used in
"wals"
objects.
The density function of the reflected generalized gamma distribution is
\pi(x) = \frac{q c^{(1 - \alpha)/q}}{2 \Gamma((1 - \alpha)/q)}
|x|^{-\alpha} \exp(-c |x|^{q}).
The double (reflected) Weibull, Subbotin and Laplace distributions are all special cases of the reflected generalized gamma distribution. The Laplace distribution is also a special case of the double Weibull and of the Subbotin distribution.
The double (reflected) Weibull density sets q = 1 - \alpha
, the Subbotin
density sets \alpha = 0
and the Laplace density sets \alpha = 0
and q = 1
.
The default values for the parameters q
and b
are minimax regret
solutions for the corresponding priors. The double (reflected) Weibull and
Subbotin prior are both neutral and robust. In contrast, the Laplace prior
is only neutral but not robust. See section 9 "Enter Bayes: Neutrality and
Robustness" of \insertCitemagnus2016wals;textualWALS for details and
Table 1 for the optimal parameter values.
An object of class "familyPrior"
to be used in
wals
, walsGLM
and walsNB
.
This is a list with the elements
q |
Parameter |
alpha |
Parameter |
b |
Parameter |
delta |
Parameter |
printPars |
vector. Contains the parameters that are shown in printing
functions, e.g. |
prior |
String with the name of the prior distribution. |
laplace()
returns an object of the specialized class
"familyPrior_laplace"
that inherits from "familyPrior"
.
This allows separate processing of the Laplace prior in the estimation
functions as closed-form formulas exists for its posterior mean and variance.
The list elements are the same as for objects of class "familyPrior"
.
wals, walsGLM, walsNB, computePosterior, ddweibull, dsubbotin, dlaplace.
## Use in wals():
fit <- wals(gdpgrowth ~ lgdp60 + equipinv + school60 + life60 + popgrowth |
law + tropics + avelf + confucian, data = GrowthMPP,
prior = weibull(q = 0.8, b = log(1.8)))
summary(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.