nsamples.gMAP: Return the number of posterior samples

View source: R/nsamples.R

nsamples.gMAPR Documentation

Return the number of posterior samples

Description

Return the number of posterior samples

Usage

## S3 method for class 'gMAP'
nsamples(object, ...)

Arguments

object

fitted model object

...

not used in this function

Examples

## Setting up dummy sampling for fast execution of example
## Please use 4 chains and 20x more warmup & iter in practice
.user_mc_options <- options(RBesT.MC.warmup=50, RBesT.MC.iter=100,
                            RBesT.MC.chains=2, RBesT.MC.thin=1)


set.seed(34563)
map_AS <- gMAP(cbind(r, n - r) ~ 1 | study,
  family = binomial,
  data = AS,
  tau.dist = "HalfNormal", tau.prior = 1,
  beta.prior = 2
)

nsamples(map_AS)

## Recover user set sampling defaults
options(.user_mc_options)


RBesT documentation built on March 13, 2026, 5:06 p.m.