Version 1.0-2 Dte 2016-08-29 Pckge truncdist August 30, 2016 Author, Mintiner Frederick Novomestky <fnovomes@poly.edu> Depends R (>= 2.0.1), stts4,evd A collection of tools to evlute proility density functions, cumultive distriution functions, quntile functions nd rndom numers for truncted rndom vriles. These functions re provided to lso compute the expected vlue nd vrince. Ndrjh nd Kotz (2006) developed most of the functions. QQ plots cn e produced. All the proility functions in the stts, stts4 nd evd pckges re utomticlly ville for trunction.. Title Truncted Rndom Vriles License GPL (>= 2) NeedsCompiltion no Repository CRAN Dte/Puliction 2016-08-30 01:27:43 R topics documented: dtrunc............................................ 2 extrunc........................................... 3 ptrunc............................................ 4 qqtrunc........................................... 5 qtrunc............................................ 6 rtrunc............................................ 7 vrtrunc........................................... 8 Index 9 1
2 dtrunc dtrunc Proility density function of truncted rndom vriles This function computes vlues for the proility density function of truncted rndom vrile. Usge dtrunc(x,, = -Inf, = Inf,...) x A numeric vector of quntile vlues chrcter vlue tht ifies the underlying proility distriution numeric vlue for the upper ound of the rndom vrile... other rguments re re pssed to the corresponding quntile function Detils The R function is used to ccess the required proility density nd cumultive distriution functions of the underlying unrestricted rndom vrile. Vlue A vector of density function vlues. Frederick Novomestky <fnovomes@poly.edu> Ndrjh, S. nd S. Kotz, 2006. R Progrms for Computing Truncted Distriutions, Journl of Sttisticl Softwre, 16, August 2006, http://www.jsttsoft.org/v16/c02 Exmples x <- seq( 0, 3,.1 ) pdf <- dtrunc( x, ="norm", =1, =2 )
extrunc 3 extrunc Expected vlue of truncted rndom vrile This function computes the expected vlue of truncted rndom vrile using numericl integrtion. Usge extrunc(, = -Inf, = Inf,...) chrcter vlue tht ifies the underlying proility distriution numeric vlue for the upper ound of the rndom vrile... other rguments re re pssed to the corresponding quntile function Detils Numericl integrtion of the truncted density function is performed to compute the expected vlue. Vlue A numericl vlue for the expecttion. Ndrjh, S. nd S. Kotz, 2006. R Progrms for Computing Truncted Distriutions, Journl of Sttisticl Softwre, 16, August 2006, http://www.jsttsoft.org/v16/c02 dtrunc Exmples mu <- extrunc( ="norm",=1, =2 )
4 ptrunc ptrunc Cumultive distriution function of truncted rndom vrile This function compute vlues of the cumultive distriution function for truncted rndom vriles. Usge ptrunc(q,, = -Inf, = Inf,...) q numeric vector of quntile vlues chrcter vlue tht ifies the underlying proility distriution numeric vlue for the upper ound of the rndom vrile... other rguments re re pssed to the corresponding quntile function Vlue A vector of proility vlues. Ndrjh, S. nd S. Kotz, 2006. R Progrms for Computing Truncted Distriutions, Journl of Sttisticl Softwre, 16, August 2006, http://www.jsttsoft.org/v16/c02 dtrunc Exmples x <- seq( 0, 3,.1 ) cdf <- ptrunc( x, ="norm", =1, =2 )
qqtrunc 5 qqtrunc QQ Plot for Truncted Rndom Vrile Usge This function produces QQ plot of smple quntiles ginst theoreticl quntiles for truncted rndom vrile. qqtrunc(x,, = -Inf, = Inf, title = "Truncted Distriution Q-Q Plot", xlel = "Theoreticl Quntiles", ylel = "Smple Quntiles",...) x Vlue title xlel ylel numeric vector of smple vlues chrcter vlue tht ifies the underlying proility distriution numeric vlue for the upper ound of the rndom vrile A chrcter vlue for the chrt title A chrcter vlue for the horizon xis lel A chrcter vlue for the verticl xis lel... other rguments re re pssed to the corresponding quntile function A plot. Ndrjh, S. nd S. Kotz, 2006. R Progrms for Computing Truncted Distriutions, Journl of Sttisticl Softwre, 16, August 2006, http://www.jsttsoft.org/v16/c02 qtrunc Exmples x <- rtrunc( 500, ="norm", =1, =2 ) qqtrunc( x, ="norm", =1, =2 )
6 qtrunc qtrunc Quntitle Function for Truncted Rndom Vrile This function evlutes the inverse of the cumultive distriution funciton for truncted rndom vrile or so the so clled quntile function for given vector of proilities nd the ified distriution. Usge qtrunc(p,, = -Inf, = Inf,...) p A vector of proilities chrcter vlue tht ifies the underlying proility distriution numeric vlue for the upper ound of the rndom vrile... other rguments re re pssed to the corresponding quntile nd distriution function Vlue A vector of quntile vlues in the rnge of the truncted rndom vrile. Ndrjh, S. nd S. Kotz, 2006. R Progrms for Computing Truncted Distriutions, Journl of Sttisticl Softwre, 16, August 2006, http://www.jsttsoft.org/v16/c02 Exmples p <- seq(.1,.9,.01 ) q <- qtrunc( p, ="norm", =1, =2 )
rtrunc 7 rtrunc Generte truncted rndom devites This function genertes n rndom devites tht re drwn from the ified truncted distriution. Usge rtrunc(n,, = -Inf, = Inf,...) n positive integer for the numer of rndom devites generted chrcter vlue tht ifies the underlying proility distriution numeric vlue for the upper ound of the rndom vrile... other rguments re re pssed to the corresponding quntile function Vlue A vector with one or more rndom devites. Ndrjh, S. nd S. Kotz, 2006. R Progrms for Computing Truncted Distriutions, Journl of Sttisticl Softwre, 16, August 2006, http://www.jsttsoft.org/v16/c02 qtrunc Exmples x <- rtrunc( 500, ="norm", =1, =2 )
8 vrtrunc vrtrunc Vrince of truncted rndom vrile Usge This function estimtes the vrince of truncted rndom vrile using numericl integrtion. vrtrunc(, = -Inf, = Inf,...) Detils Vlue chrcter vlue tht ifies the underlying proility distriution numeric vlue for the upper ound of the rndom vrile... other rguments re re pssed to the corresponding quntile function Numericl integrtion of the truncted density function is performed to compute the vrince nd the ssocited expected vlue. A numeric vlue. Ndrjh, S. nd S. Kotz, 2006. R Progrms for Computing Truncted Distriutions, Journl of Sttisticl Softwre, 16, August 2006, http://www.jsttsoft.org/v16/c02 extrunc, dtrunc Exmples vr <- vrtrunc( ="norm", =1, =2 )
Index Topic mth dtrunc, 2 extrunc, 3 ptrunc, 4 qqtrunc, 5 qtrunc, 6 rtrunc, 7 vrtrunc, 8 dtrunc, 2, 3, 4, 8 extrunc, 3, 8 ptrunc, 4 qqtrunc, 5 qtrunc, 5, 6, 7 rtrunc, 7 vrtrunc, 8 9