sampled_forstmann {pmwg} | R Documentation |
A sampled object of a model of the Forstmann dataset
Description
A pmwgs object with a limited number of samples of the Forstmann dataset.
Usage
sampled_forstmann
Format
A pmwgs object minus the data. A pmwgs opbject is a list with a specific structure and elements, as outlined below.
- par_names
A character vector containing the model parameter names
- n_pars
The number of parameters in the model
- n_subjects
The number of unique subject ID's in the data
- subjects
A vector containing the unique subject ID's
- prior
A list that holds the prior for
theta_mu
(the model parameters). Contains the mean (theta_mu_mean
), covariance matrix (theta_mu_var
) and inverse covariance matrix (theta_mu_invar
)- ll_func
The log likielihood function used by pmwg for model estimation
- samples
A list with defined structure containing the samples, see the Samples Element section for more detail
Details
The pmwgs object is missing one aspect, the pmwgs$data element. In order to fully replicate the full object (ie to run more sampling stages) you will need to add the data back in, via sampled_forstmann$data <- forstmann
Samples Element
The samples element of a PMwG object contains the different types of samples
estimated by PMwG. These include the three main types of samples
theta_mu
, theta_sig
and alpha
as well as a number of
other items which are detailed here.
- theta_mu
samples used for estimating the model parameters (group level), an array of size (n_pars x n_samples)
- theta_sig
samples used for estimating the parameter covariance matrix, an array of size (n_pars x n_pars x n_samples)
- alpha
samples used for estimating the subject random effects, an array of size (n_pars x n_subjects x n_samples)
- stage
A vector containing what PMwG stage each sample was drawn in
- subj_ll
The winning particles log-likelihood for each subject and sample
- a_half
Mixing weights used during the Gibbs step when creating a new sample for the covariance matrix
- last_theta_sig_inv
The inverse of the last samples covariance matrix
- idx
The index of the last sample drawn
Source
https://www.pnas.org/content/105/45/17538