> On Dec 3, 2015, at 2:03 AM,
> wrote:
>
>
> library(truncdist)
>
> When running the following code, the output from extrunc() and vartrunc() is
> correct:
>
snipped
>
> However, changing the mean from 40 to 44:
> m <- 44; v <- 9
>
> and running the code again, the output is as follows:
library(truncdist)
When running the following code, the output from extrunc() and vartrunc() is
correct:
# Mean and variance of Gamma distribution
m <- 40; v <- 9
# Derive shape and scale parameters
a <- m^2/v; s <- v/m
# Checks: mean=shape*scale, variance=mean*scale^2
a*s; a*s^2
# Generate 1M
2 matches
Mail list logo