Learn R Programming

BayesMallowsSMC2 (version 0.2.1)

summary.BayesMallowsSMC2: Summary Method for BayesMallowsSMC2 Objects

Description

Creates a summary of a BayesMallowsSMC2 object returned by compute_sequentially().

Usage

# S3 method for BayesMallowsSMC2
summary(object, ...)

Value

An object of class summary.BayesMallowsSMC2, which is a list containing summary information about the model.

Arguments

object

An object of class BayesMallowsSMC2.

...

Additional arguments (currently unused).

Details

The summary method creates a summary object that includes:

  • Number of particles

  • Number of timepoints

  • Number of items

  • Number of clusters

  • Log marginal likelihood

  • Final effective sample size (ESS)

  • Number of resampling events

  • Posterior mean of alpha for each cluster

  • Posterior standard deviation of alpha for each cluster

Examples

Run this code
# Fit a model with complete rankings
set.seed(123)
mod <- compute_sequentially(
  complete_rankings,
  hyperparameters = set_hyperparameters(n_items = 5),
  smc_options = set_smc_options(n_particles = 100, n_particle_filters = 1)
)

# Create summary
summary(mod)

Run the code above in your browser using DataLab