analyze_questioned_documents: Analyze Questioned Documents

View source: R/ClusterModeling_analysisfunctions.R

analyze_questioned_documentsR Documentation

Analyze Questioned Documents

Description

analyze_questioned_documents() estimates the posterior probability of writership for the questioned documents using Markov Chain Monte Carlo (MCMC) draws from a hierarchical model created with fit_model().

Usage

analyze_questioned_documents(
  template_dir,
  questioned_images_dir,
  model,
  num_cores,
  num_graphs = "All",
  writer_indices,
  doc_indices
)

Arguments

template_dir

A directory that contains a cluster template created by make_clustering_templates()

questioned_images_dir

A directory containing questioned documents

model

A fitted model created by fit_model()

num_cores

An integer number of cores to use for parallel processing with the doParallel package.

num_graphs

"All" or integer number of graphs to randomly select from each questioned document.

writer_indices

A vector of start and stop characters for writer IDs in file names

doc_indices

A vector of start and stop characters for document names in file names

Value

A list of likelihoods, votes, and posterior probabilities of writership for each questioned document.

Examples

## Not run: 
template_dir <- "/path/to/template_dir"
questioned_images_dir <- "/path/to/questioned_images"
analysis <- analyze_questioned_documents(
  template_dir = template_dir,
  questioned_images_dir = questioned_images_dir,
  model = model,
  num_cores = 2,
  num_graphs = "All",
  writer_indices = c(2, 5),
  doc_indices = c(7, 18)
)
analysis$posterior_probabilities

## End(Not run)


handwriter documentation built on Oct. 13, 2023, 5:10 p.m.