dot-rtrunc: Simulate sample from truncated distribution

Description Usage Arguments Value

Description

a function to generate truncated distribution. Simulate one random sample from a standard normal distribution truncated to the left in the middle .rtrunc(1, spec = "norm", a = -Inf, b = 0)

Usage

1
.rtrunc(n, spec, a = -Inf, b = Inf, ...)

Arguments

n

the number of observations.

spec

a character string to specify the distribution.

a

lower bound.

b

upper bound.

...

any other arguments that can be used for the functions of different distribution such as "mean", "sd" for "qnorm()".

Value

A vector contains n random samples from the truncated distribution "spec".


PAsso documentation built on June 18, 2021, 5:09 p.m.