R/RcppExports.R

Defines functions StoreZ SummarizeDat summarize1 CumSumInv SampleZAgg rmultinom2 rmultinom1

Documented in CumSumInv rmultinom1 rmultinom2 SampleZAgg StoreZ summarize1 SummarizeDat

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

#' Internal function that samples z's from a categorical distribution
#'
#' @param prob A numeric matrix.
#' @param randu A numeric vector.
#'
#'
rmultinom1 <- function(prob, randu) {
    .Call(`_bayesmove_rmultinom1`, prob, randu)
}

#' Internal function that samples z's from a multinomial distribution
#'
#' @param prob A numeric vector.
#' @param n An integer.
#' @param randu A numeric vector.
#' @param nmaxclust An integer.
#'
#'
rmultinom2 <- function(prob, n, randu, nmaxclust) {
    .Call(`_bayesmove_rmultinom2`, prob, n, randu, nmaxclust)
}

#' Internal function that samples z1 aggregate
#'
#' @param ntsegm An integer.
#' @param b1 An integer.
#' @param y1 An integer matrix.
#' @param nmaxclust An integer.
#' @param lphi1 A numeric matrix.
#' @param ltheta A numeric matrix.
#' @param zeroes A numeric vector.
#'
#'
SampleZAgg <- function(ntsegm, b1, y1, nmaxclust, lphi1, ltheta, zeroes) {
    .Call(`_bayesmove_SampleZAgg`, ntsegm, b1, y1, nmaxclust, lphi1, ltheta, zeroes)
}

#' Internal function that calculates the inverted cumsum
#'
#' @param ntsegm An integer.
#' @param nmaxclust An integer.
#' @param z An integer matrix.
#'
#'
CumSumInv <- function(ntsegm, nmaxclust, z) {
    .Call(`_bayesmove_CumSumInv`, ntsegm, nmaxclust, z)
}

#' Internal function that summarizes bin distributions of track segments
#'
#' @param VecVals A vector of bin values.
#' @param Breakpts A vector if breakpoints.
#' @param nobs The number of observations.
#' @param nbins The number of bins for a given data stream.
#' @param nbreak The number of estimated breakpoints.
#'
#'
summarize1 <- function(VecVals, Breakpts, nobs, nbins, nbreak) {
    .Call(`_bayesmove_summarize1`, VecVals, Breakpts, nobs, nbins, nbreak)
}

#' Internal function that generates nmat matrix to help with multinomial draws
#'
#' @param z An integer vector.
#' @param dat An integer vector.
#' @param ncateg An integer.
#' @param nbehav An integer.
#' @param nobs An integer.
#'
#'
SummarizeDat <- function(z, dat, ncateg, nbehav, nobs) {
    .Call(`_bayesmove_SummarizeDat`, z, dat, ncateg, nbehav, nobs)
}

#' This function helps store z from all iterations after burn in
#'
#' @param z An integer vector.
#' @param store_z An integer matrix.
#' @param nobs An integer.
#'
#'
StoreZ <- function(z, store_z, nobs) {
    .Call(`_bayesmove_StoreZ`, z, store_z, nobs)
}

Try the bayesmove package in your browser

Any scripts or data that you put into this service are public.

bayesmove documentation built on Oct. 22, 2021, 9:08 a.m.