r <- c(2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5)
f <- c(33, 111, 168, 147, 96, 45, 18, 4, 0)
param <- c("alpha", "beta", "mu")
pdf <- quote( alpha/beta*((x-mu)/beta)^(alpha-1)*exp( -((x-mu)/beta)^alpha ) )
cdf <- quote( 1-exp( -((x-mu)/beta)^alpha ) );
lb <- 2
ub <- Inf
start <-c(2, 3, 2)
level <- 0.05
fitgrouped2(r, f, param, start, cdf, pdf, method = "Nelder-Mead", lb = lb, ub = ub, level = 0.05)
Run the code above in your browser using DataLab