R/RcppExports.R

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Sample environment process and state process of a subject
#'
#' Produce a Gibbs sample of environment process and state process of a subject
#' 
#' @param rt a vector of response time sequence of a subject
#' @param wb_shape current update of Weibull shape parameter
#' @param wb_scale a vector of current update of Weibull scale parameters in all states
#' @param p an array of current update of transition matrices of state process
#' @param q a matrix of current update of transition matrix of environment process
#' @param e_stat a vector of current update of stationary distribution of environment process
#' @param s_stat a vector of current update of stationary distribution of state process
#' @param ntrial total number of trials
#' @param nstate total number of states
#' @param nenv   total number of environments
#' 
#' @return A list with the following components:
#'   \item{et}{a vector of Gibbs sample of environment process}
#'   \item{st}{a vector of Gibbs sample of state process}
#' @export
sample_et_st <- function(rt, wb_shape, wb_scale, p, q, e_stat, s_stat, ntrial, nstate, nenv) {
    .Call('_WeibullHM_sample_et_st', PACKAGE = 'WeibullHM', rt, wb_shape, wb_scale, p, q, e_stat, s_stat, ntrial, nstate, nenv)
}

#' Compute stationary distributions of environment process and state process
#' 
#' @param p an array of transition matrices of state process
#' @param q a matrix of transition matrix of environment process
#' @param nstate total number of states
#' @param nenv   total number of environments
#' 
#' @return A list with the following components:
#'   \item{e_stat}{stationary distribution of environment process}
#'   \item{s_stat}{stationary distribution of state process}
#' @export
stat_dist <- function(p, q, nstate, nenv) {
    .Call('_WeibullHM_stat_dist', PACKAGE = 'WeibullHM', p, q, nstate, nenv)
}
zhifeiyan/WeibullHM documentation built on May 4, 2019, 11:21 p.m.