Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tregress

Truncated student generator for Bayesian regression simulation


Description

Simulates n random vectors X exactly distributed from the d-dimensional Student distribution with df=ν degrees of freedom, mean zero and scale matrix sigma, conditional on l<X<u,

Usage

tregress(n, lb, ub, sigma, df)

Arguments

n

number of observations

lb

vector of lower truncation limits

ub

vector of upper truncation limits

sigma

scale matrix

df

degrees of freedom

Value

list with components

  • R: n vector of scale

  • Z: a d by n matrix

so that √(ν)Z/R follows a truncated Student distribution

Author(s)

Matlab code by Zdravko Botev, R port by Leo Belzile

References

Z. I. Botev and P. L'Ecuyer (2015), Efficient probability estimation and simulation of the truncated multivariate Student-t distribution, Proceedings of the 2015 Winter Simulation Conference, pp. 380-391,

Examples

d <- 5
tregress(lb =rep(-2, d), ub = rep(2, d), df = 3, n = 10,
  sigma = diag(0.5, d) + matrix(1, d, d))

TruncatedNormal

Truncated Multivariate Normal and Student Distributions

v2.2
GPL-3
Authors
Zdravko Botev [aut] (<https://orcid.org/0000-0001-9054-3452>), Leo Belzile [aut, cre] (<https://orcid.org/0000-0002-9135-014X>)
Initial release
2020-05-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.