Description Usage Arguments Value
View source: R/gam_ci_functions.R
This function plots the histograms for each subject and variable with the fitted state dependent distributions overlayed and their corresponding confidence intervals.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | gam_hist_ci(
x,
viterbi,
num_states,
num_subjects,
num_variables,
hmm,
state_dep_dist_pooled = FALSE,
variable_names = c("Var 1", "Var 2", "Var 3"),
subject_names = c("Subject 1", "Subject 2", "Subject 3", "Subject 4"),
width = 1,
n = 100,
level = 0.975,
x_step = 0.2
)
|
x |
The data to be fit with an HMM in the form of a 3D array. The first index (row) corresponds to time, the second (column) to the variable number, and the third (matrix number) to the subject number. |
viterbi |
A matrix with each column indicating the sequence of states
decoded by |
num_states |
The number of states in the desired HMM. |
num_subjects |
The number of subjects/trials that generated the data. |
num_variables |
The number of variables in the data. |
hmm |
A list of parameters that specify the gamma HMM, including
|
state_dep_dist_pooled |
A logical variable indiacting whether the
state dependent distribution parameters |
variable_names |
A vector containing the names of the variables in the
data |
subject_names |
A vector containing the names of the subjects generating
the data |
width |
The width of the histogram bins. |
n |
The number of samples in the Monte Carlo fitting. |
level |
A number indicating the level of confidence for the desired interval. |
x_step |
A value indicating the step length for the range of observation values. |
Histograms of the data with overlayed distributions and confidence intervals.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.