I want to randomly generate a vector of size
n - that represents hypothetical revenues per users in a webshop.
Typically I would imagine this distribution to have:
- a disproportionate amount of 0 (users that do not buy, let's say around 95%)
- a lower bound at 0 (users can't buy for less than zero dollars)
- unbounded above (users are unlimited in their potential expenditure)
The distribution will hence be right-skewed.
In R, I tried with:
pois_data <-rpois(100,lambda=0.01) lambda_est <- mean(pois_data) p0_tilde <- exp(-lambda_est) # number of observtions 'expected' to be zero n*p0_tilde 97.0445533548508
In this Poisson I have a 97% of 0s, but instead of the observation valued 1, I want continuous values that might reflect an hypothetical distrubution of revenues (I read that typically would be drawn from a lognormal).
How can I do that in R?