# 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 specific Gibbs sampler for 2 dimension (x,y) with bivariate density using Rcpp
#' @param m numbers of sample want to generate
#' @param a the a parameter in Beta(x+a,n-x+b)
#' @param b the b parameter in Beta(x+a,n-x+b)
#' @param n the n parameter in Binomial(n,y)
#' @return a matrix including two random sample with dimension of (\code{m},2)
#' @examples
#' \dontrun{
#' dir_cpp <- '/data/cenmin/statistical computing/Rcpp/'
#' sourceCpp(paste0(dir_cpp,"GBSampler.cpp"))
#' set.seed(12)
#' m = 10000
#' a = 2
#' b = 3
#' n = 5
#' t1 <- proc.time()
#' xC <- gbsamplerC(m,a,b,n)
#' t2 <- proc.time()
#' t <- t2-t1
#' paste0(t[3][[1]],'s')
#' }
#' @export
gbsamplerC <- function(m, a, b, n) {
.Call(`_StatComp21097_gbsamplerC`, m, a, b, n)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.