Description Usage Arguments Details Author(s) References Examples
This function performs a prior elicitation for the precision parameter of a DP prior. The function calculates:
1) the expected value and the standard deviation of the number of clusters,
given the values of the parameters of the gamma
prior for the precision parameter, a0
and b0
, or
2) the value of the parameters a0
and b0
of the gamma
prior distribution
for the precision parameter, alpha
, given the prior expected number and the
standard deviation of the number of clusters.
1 |
n |
number of observations which distribution follows a DP prior. |
method |
the method to be used. See |
a0 |
hyperparameter for the |
b0 |
hyperparameter for the |
mean |
prior expected number of clusters when alpha ~ Gamma(a0,b0). |
std |
prior standard deviation for the number of clusters when alpha ~ Gamma(a0,b0). |
The methods supported by these functions are based on the fact that a priori
E(alpha) = a0/b0
and Var(alpha) = a0/b0^2
, and an additional
approximation based on Taylor series expansion.
The default method, "JGL"
, is based on the exact value of the mean and
the variance of the number of clusters given the precision parameter
alpha (see, Jara, Garcia-Zatera and Lesaffre, 2007).
The Method "KMQ"
is base on the Liu (1996) approximation to
the expected value and the variance of the number of clusters given the
precision parameter alpha (see, Kottas, Muller and Quintana, 2005).
Given the prior judgement for the mean and variance of the number of
clusters, the equations are numerically solve for a0
and b0
.
With this objective, the Newton-Raphson algorithm and the forward-difference
approximation to Jacobian are used.
Alejandro Jara <atjara@uc.cl>
Jara, A., Garcia-Zattera, M.J., Lesaffre, E. (2007) A Dirichlet Process mixture model for the analysis of correlated binary responses. Computational Statistics and Data Analysis 51: 5402-5415.
Kottas, A., Muller, P., Quintana, F. (2005) Nonparametric Bayesian modeling for multivariate ordinal data, Journal of Computational and Graphical Statistics 14: 610-625.
Liu, J.S. (1996) Nonparametric Hierarchical Bayes via Sequential Imputations, The Annals of Statistics, 24: 911-930.
1 2 3 4 5 6 7 8 9 10 11 | # Calculate the expected value and the standard deviation
# for the number of cluster given alpha ~ Gamma(a0,b0).
DPelicit(200,a0=2.01,b0=2.01,method="JGL")
DPelicit(200,a0=2.01,b0=2.01,method="KMQ")
# Calculate the values of a0 and b0, given the expected value
# and the standard deviation of the number of clusters
DPelicit(200,mean=3.1,std=2.7,method="JGL")
DPelicit(200,mean=3.1,std=2.7,method="KMQ")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.