R/RcppExports.R

Defines functions gibbsC vaccC

Documented in gibbsC vaccC

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

#' @title A Gibbs sampler using Rcpp
#' @description A Gibbs sampler using Rcpp
#' @param N the number of samples
#' @param thin the number of between-sample random numbers
#' @return a random sample of size \code{n}
#' @examples
#' \dontrun{
#' rnC <- gibbsC(100,10)
#' par(mfrow=c(2,1));
#' plot(rnC[,1],type='l')
#' plot(rnC[,2],type='l')
#' }
#' @export
gibbsC <- function(N, thin) {
    .Call('_StatComp_gibbsC', PACKAGE = 'StatComp', N, thin)
}

#' @title Use three inputs to predict response using Rcpp.
#' @description The prediction model is described in http://www.babelgraph.org/wp/?p=358.
#' @param age the first predictor (numeric)
#' @param female the second predictor (logical)
#' @param ily the third predictor (logical)
#' @return a random sample of size \code{n}
#' @examples
#' \dontrun{
#' data(data)
#' attach(data)
#' res <- vaccC(age,female,ily)
#' }
#' @export
vaccC <- function(age, female, ily) {
    .Call('_StatComp_vaccC', PACKAGE = 'StatComp', age, female, ily)
}
hudie-lab/StatComp documentation built on Jan. 3, 2020, 12:15 a.m.