tnorm: Sample from a truncated normal distribution

Description Usage Arguments Value

View source: R/SAM_gibbs_functions.R

Description

This function generates n samples from a truncated normal distribution using the CDF of the normal distribution

Usage

1
tnorm(n, lo, hi, mu, sig)

Arguments

n

number of samples to generate

lo

lower truncation point. If there is no lower truncation, lo should be set to -Inf

hi

upper truncation point. If there is no upper truncation, hi should be set to Inf

mu

mode of the truncated normal distribution

sig

dispersion parameter for truncated normal

Value

this function returns a vector of size n


drvalle1/EcoCluster documentation built on Jan. 25, 2022, 12:46 a.m.