Nothing
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
pinvgauss_export <- function(x, a, b) {
.Call(`_cobin_pinvgauss_export`, x, a, b)
}
pgig_onehalf_export <- function(x, a, b) {
.Call(`_cobin_pgig_onehalf_export`, x, a, b)
}
pgig_negonehalf_export <- function(x, a, b) {
.Call(`_cobin_pgig_negonehalf_export`, x, a, b)
}
#' Sample Kolmogorov-Gamma random variables
#'
#' A random variable \eqn{X} follows Kolmogorov-Gamma(b,c) distribution, in short KG(b,c), if
#' \deqn{
#' X \stackrel{d}{=} \dfrac{1}{2\pi^2}\sum_{k=1}^\infty \dfrac{\epsilon_k}{k^2 + c^2/(4\pi^2)}, \quad \epsilon_k\stackrel{iid}{\sim} Gamma(b,1)
#' }
#' where \eqn{\stackrel{d}{=}} denotes equality in distribution.
#' The random variate generation is based on alternating series method, a fast and exact method (without infinite sum truncation) implemented in cpp.
#' This function only supports integer b, which is sufficient for cobin and micobin regression models.
#'
#' @param n The number of samples.
#' @param b First parameter, positive integer (1,2,...). Length must be 1 or n.
#' @param c Second parameter, real, associated with tilting. Length must be 1 or n.
#' @return It returns n independent Kolmogorov-Gamma(\code{b[i]},\code{c[i]}) samples. If input b or c is scalar, it is assumed to be length n vector with same entries.
#' @examples
#' \donttest{
#' rkgcpp(100, 1, 2)
#' rkgcpp(100, 1, rnorm(100))
#' rkgcpp(100, rep(c(1,2),50), rnorm(100))
#' }
#' @export
rkgcpp <- function(n, b, c) {
.Call(`_cobin_rkgcpp`, n, b, c)
}
rinvgauss_mulambda_export <- function(n, mu, lambda) {
.Call(`_cobin_rinvgauss_mulambda_export`, n, mu, lambda)
}
rgig_negonehalf_export <- function(n, a, b) {
.Call(`_cobin_rgig_negonehalf_export`, n, a, b)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.