Simulations of a truncated normal distribution [General Statistics]
Dear all!
I just stumbled over the generation of random draws from a truncated normal distribution whilst thinking about possible scenarios for a PK simulation study.
Does anybody know how to draw from a truncated normal distribution with prespecified (fixed) mean and variance - not in the underlying normal distribution, but in the consequent truncated normal distribution? In R function truncnorm (or other functions) you can only specify the mean and sd of the underlying normal distribution...
In more detail, I want to generate draws X with l < X < u ~ truncNorm(m,v) where m and v are fixed mean and variance, l=0 is the lower, u=Inf the upper bound. m and v are functions of mu and delta, the mean and variance of the underlying normal distribution N(mu,delta) without truncation.
Theoretically, solving the system of equations m=f(mu,delta) and v=g(mu,delta) for mu and delta should give me the desired result, i.e. the mean and variance in the underlying normal distribution so that, after truncation, i will have mean m and variance v in the truncated normal distribution. f() and g() represent the functions describing the relationship of the mean and the variance, respectively, between normal and truncated normal distribution. As f() and g() are rather complex, including the CDF of the normal distribution, my algebraic skills are insufficient...
Can anybody help?
Thanks for your efforts,
All the best,
Alex
I just stumbled over the generation of random draws from a truncated normal distribution whilst thinking about possible scenarios for a PK simulation study.
Does anybody know how to draw from a truncated normal distribution with prespecified (fixed) mean and variance - not in the underlying normal distribution, but in the consequent truncated normal distribution? In R function truncnorm (or other functions) you can only specify the mean and sd of the underlying normal distribution...
In more detail, I want to generate draws X with l < X < u ~ truncNorm(m,v) where m and v are fixed mean and variance, l=0 is the lower, u=Inf the upper bound. m and v are functions of mu and delta, the mean and variance of the underlying normal distribution N(mu,delta) without truncation.
Theoretically, solving the system of equations m=f(mu,delta) and v=g(mu,delta) for mu and delta should give me the desired result, i.e. the mean and variance in the underlying normal distribution so that, after truncation, i will have mean m and variance v in the truncated normal distribution. f() and g() represent the functions describing the relationship of the mean and the variance, respectively, between normal and truncated normal distribution. As f() and g() are rather complex, including the CDF of the normal distribution, my algebraic skills are insufficient...
Can anybody help?
Thanks for your efforts,
All the best,
Alex
Complete thread:
- Simulations of a truncated normal distributionAlex 2015-03-17 10:19
- Simulations of a truncated normal distribution Helmut 2015-03-17 12:48
- Simulations of a truncated normal distribution ElMaestro 2015-03-17 15:20
- Simulations of a truncated normal distribution nobody 2015-03-17 15:24
- Simulations of a truncated normal distribution Alex 2015-03-17 15:56
- Simulations of a truncated normal distribution nobody 2015-03-17 15:24