[R] R-help

Gabor Grothendieck ggrothendieck at gmail.com
Fri Jan 27 14:39:57 CET 2012


On Fri, Jan 27, 2012 at 6:35 AM, Christopher Kelvin
<chris_kelvin2001 at yahoo.com> wrote:
> Hello,
> How can i do simulation with a weibull distribution after i have generated data with the distribution,
> for example; if i generate x=rweibull(50,shape=0.8,scale=2) and i want to simulate this data 1000 times so that i can use it to estimate
> the parameters.

library(MASS)
set.seed(123)
n <- 1000
k <- 50
r <- matrix(rweibull(n*k, shape = 0.8, scale =2), k)
m <- t(apply(r, 2, function(x) coef(fitdistr(x, "weibull"))))
summary(m)

Please use a meaningful subject on your posts to r-help and trim them
so that they don't include the literally thousands of lines of garbage
that were at the end of your post.



More information about the R-help mailing list