run_mHMM: Run an mHMM on a simulated sleep dataset

Description Usage Arguments Value

View source: R/run_model.R

Description

Run an mHMM on a simulated sleep dataset

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
run_mHMM(
  data,
  start_values,
  mprop,
  hyperprior_means,
  model_seed,
  mcmc_iterations = 2000,
  mcmc_burn_in = 1000,
  show_progress = TRUE,
  order_data = FALSE
)

Arguments

data

Matrix. data set used to run the mHMM. See s_data parameter in mHMM_cont.

start_values

List (must be unnamed). start values for relevant parameters. See start_val parameter in mHMM_cont.

mprop

List containing two elements (numeric scalars), (1) 'm' or the number of hypothesized latent states and (2) 'n_dep' or the number of dependent (emission) variables.

hyperprior_means

Numeric vector. Contains the hyperprior value for the between-subject distribution means. See mHMM_cont.

model_seed

Int. Random seed that is set before running the model.

mcmc_iterations

Int. number of iterations for the MCMC algorithm. Defaults to 1000. See mcmc parameter in mHMM_cont.

mcmc_burn_in

Int. number of burn-in samples for the MCMC algorithm. Defaults to 500. See mcmc parameter in mHMM_cont.

show_progress

Boolean. Should progress of MCMC algorithm be displayed? Defaults to TRUE.

order_data

Boolean. Should hyperpriors and start values be sorted from lowest to highest? This is required to record label switching. See mHMM_cont.

Value

An mHMM_cont object containing posterior distributions for each of the parameters.


JasperHG90/sleepsimR documentation built on May 18, 2020, 8:49 a.m.