Trunc {Sim.PLFN} | R Documentation |
Simulation from a Truncated Distribution
Description
This function can simulation from a truncated distribution which is used for generating the left and right spreads of Piecewise Linear Fuzzy Numbers (PLFNs).
Usage
Trunc(n, T.dist, T.dist.par, L = -Inf, R = Inf)
Arguments
n |
The sample size. |
T.dist |
The distribution name of random variable (which one needs its truncated version) is determined by characteristic element |
T.dist.par |
A vector of distribution parameters (which one needs its truncated version) with considered ordering in |
L |
The left point of truncation of distribution. |
R |
The right point of truncation of distribution. |
Details
The goal of introducing Trunc
function in this package is only using in PLFN
and S.PLFN
functions.
Value
A vector of random data from the considered truncated distribution.
See Also
DISTRIB
Examples
# Truncated Normal Distribution:
data1 = Trunc(n=10^4, T.dist="norm", T.dist.par=c(5,2), L=3, R=10)
hist(data1)
data2 = Trunc(n=1000, T.dist="chisq", T.dist.par=4, L=0, R=12)
hist(data2)
data3 = Trunc(n=10^4, T.dist="norm", T.dist.par=c(5,2), L=3)
hist(data3)
[Package Sim.PLFN version 1.0 Index]