Description Usage Arguments Value Author(s) See Also Examples
Implementation of the Bayesian Detection of Clusters and Discontinuities
1 2 3 4 5 6 7 8 9 |
y |
a vector specifying the target variable for each of the nodes. |
neigh |
a matrix defining the graph neighbors. |
c |
parameter indicating the a priori number of clusters. |
n_iterations |
number of iterations. |
burn_in |
number of discarded iterations. |
mu0 |
a priori mean. |
sigma_0 |
a priori standard deviation. |
a list
of seven objects:
mean.info: a posteriori means and credible interval.
cluster.info: hierarchical clustering return object.
matConnections: frequency matrix indicating how many times each pair of nodes was in the same cluster.
k.MCMC: a vector indicating the number of clusters in each iteration.
mean_y: target variable mean.
sd_y: target variable standard deviation.
vec.centers: center configuration for each iteration.
leandromineti@gmail.com
Other gbdcd:
gbdcdGroups()
,
gbdcd_regression()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(gbdcd)
data("aneeldata", package = "gbdcd")
data("aneelshape", package = "gbdcd")
target_variable <- aneelshape$z_Precipitation
neighbors <- aneeldata$connections
out <- gbdcd(
y = target_variable,
neigh = neighbors,
c = 0.35,
n_iterations = 100000,
burn_in = 50000,
mu0 = 0,
sigma_0 = sqrt(2)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.