Learn R Programming

EMC2 (version 3.1.1)

compare_subject: Information Criteria For Each Participant

Description

Returns the BPIC/DIC based model weights for each participant in a list of samples objects

Usage

compare_subject(
  sList,
  stage = "sample",
  filter = 0,
  use_best_fit = TRUE,
  print_summary = TRUE,
  digits = 3
)

Value

List of matrices for each subject of effective number of parameters, mean deviance, deviance of mean, DIC, BPIC and associated weights.

Arguments

sList

List of samples objects

stage

A string. Specifies which stage the samples are to be taken from "preburn", "burn", "adapt", or "sample"

filter

An integer or vector. If it's an integer, iterations up until the value set by filter will be excluded. If a vector is supplied, only the iterations in the vector will be considered.

use_best_fit

Boolean, defaults to TRUE, use minimal likelihood or mean likelihood (whichever is better) in the calculation, otherwise always uses the mean likelihood.

print_summary

Boolean (defaults to TRUE) print table of results

digits

Integer, significant digits in printed table

Examples

Run this code
# For a broader illustration see `compare`.
# Here we just take two times the same model, but normally one would compare
# different models
compare_subject(list(m0 = samples_LNR, m1 = samples_LNR))

Run the code above in your browser using DataLab