After searching in the forum, I did not find similar questions. If I missed it, please let me know. I would really appreciate.
I need to plot pdf , cdf, and quantile function of a truncated gamma for any given shape and scale values in R . But, I got error for some values of shape and scale.
My code:
library(distr)
library(distrEx)
library(truncdist)
scale8 <- 750000
shape8 <- 0.0016
G0 <- Gammad(scale = scale8, shape = shape8)
plot(G0)
TG <- Truncate(G0, lower=0, upper=1000000) # Error in if (.isEqual(gaps[jj, 2], gaps[j + 1,
# 1])) gaps[jj, 2] <- gaps[j + :
# missing value where TRUE/FALSE needed
plot(TG)
My understanding is that for some pdf of gamma, its trucnated gamma distribution do not exist ?
Any help would be appreciated!