example_model_2chains | R Documentation |
Example of a hierarchical model
example_model_2chains
A hierarchical model created by fit_model()
with two chains of 100 MCMC iterations. It is a named
list of 4 objects:
A data frame of model training data that shows the writer, document name, cluster assignment, slope, principle component rotation angle, and wrapped principle component rotation angle for each training graph.
A data frame of the cluster fill counts for each model training document.
The model training information from graph_measurements
and cluster_fill_counts
formatted for RJAGS.
A model fit using the rjags_data
and the RJAGS and coda packages. It is an MCMC list that contains an MCMC object for
each chain.
# convert to a data frame and view all variable names
df <- as.data.frame(coda::as.mcmc(example_model_1chain$fitted_model))
colnames(df)
# view a trace plot
plot_trace(variable = "mu[1,1]", model = example_model_2chains)
# drop the first 25 MCMC iterations from each chain for burn-in
model <- drop_burnin(model = example_model_2chains, burn_in = 25)
## Not run:
# analyze questioned documents
template_dir <- /path/to/cluster_template_directory
questioned_images_dir <- /path/to/questioned_documents_directory
analysis <- analyze_questioned_documents(
template_dir = template_dir,
questioned_images_dir = questioned_images_dir
model = example_model_2chains
num_cores = 2
)
analysis$posterior_probabilities
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.