example_model | R Documentation |
Example of a hierarchical model
example_model
A hierarchical model created by fit_model
with a single chain 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 a single
MCMC object.
# convert to a data frame and view all variable names
df <- as.data.frame(coda::as.mcmc(example_model$fitted_model))
colnames(df)
# view a trace plot
plot_trace(variable = "mu[1,1]", model = example_model)
# drop the first 25 MCMC iterations for burn-in
model <- drop_burnin(model = example_model, burn_in = 25)
## Not run:
# analyze questioned documents
main_dir <- /path/to/main_dir
questioned_docs <- /path/to/questioned_documents_directory
analysis <- analyze_questioned_documents(
main_dir = main_dir,
questioned_docs = questioned_docs
model = example_model
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.