Description Usage Arguments Value
View source: R/gam_loglikelihood.R
This function computes the negative log-likelihood that the given gamma HMM parameters could have generated the data being fit.
1 2 3 4 5 6 7 8 9 10 | gam_loglikelihood(
working_params,
x,
design,
num_states,
num_variables,
num_subjects,
num_covariates,
state_dep_dist_pooled = FALSE
)
|
working_params |
A vector of the working gamma parameters for the HMM. |
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. |
design |
A list of design matrices for each subject with each row indicating the time and each column indicating the value of the covariate. |
num_states |
The number of states in the desired HMM. |
num_variables |
The number of variables in the data. |
num_subjects |
The number of subjects/trials that generated the data. |
num_covariates |
The number of covariates in the data that the transition probability matrix depends on. |
state_dep_dist_pooled |
A logical variable indiacting whether the
state dependent distribution parameters |
A number indicating the negative loglikelihood
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.