rScaledInvChi2: Simulates from the Scaled Inv-Chi2 distribution.

View source: R/distributions.R

rScaledInvChi2R Documentation

Simulates from the Scaled Inv-Chi2 distribution.

Description

Simulates from the Scaled Inv-Chi2 distribution.

Usage

rScaledInvChi2(n, v, tau2)

Arguments

n

the number of draws

v

degrees of freedom parameter in the Scaled Inv-Chi2 distribution

tau2

scale parameter in the Scaled Inv-Chi2 distribution

Value

vector with n draws

Examples

library(bayeslearn)
draws = rScaledInvChi2(n = 10000, v = 5, tau2 = 10)
mean(draws) # Should be close to the theoretical (v/(v-2))*\tau2 = 16.667

StatisticsSU/bayeslearn documentation built on Feb. 2, 2023, 8:41 a.m.