gam_ci: Compute the confidence intervals

Description Usage Arguments Value

View source: R/gam_ci_functions.R

Description

This function computes the confidence intervals for the estimated parameters alpha, theta, and beta using the variances outputted from gam_fit_hmm() and the Monte Carlo method of estimation.

Usage

1
2
3
4
5
6
7
gam_ci(
  hmm,
  state_dep_dist_pooled = FALSE,
  n = 100,
  level = 0.975,
  raw_sample = FALSE
)

Arguments

hmm

A list of parameters that specify the gamma HMM, including num_states, num_variables, num_subjects,num_covariates, alpha, theta, beta, delta.

state_dep_dist_pooled

A logical variable indiacting whether the state dependent distribution parameters alpha and theta should be treated as equal for all subjects.

n

The number of samples in the Monte Carlo fitting.

level

A number indicating the level of confidence for the desired interval.

raw_sample

A logical variable indicating wheter to simply output the n sampled alphas and thetas from the Monte Carlo estimate.

Value

Either a list of the sampled alphas and thetas or the list of confidence intervals for each parameter.


simonecollier/lizardHMM documentation built on Dec. 23, 2021, 2:24 a.m.