[R] fitting the gamma cumulative distribution function
Tim Bergsma
timb at metrumrg.com
Tue Feb 27 15:29:51 CET 2007
Hi.
I have a vector of quantiles and a vector of probabilites that, when
plotted, look very like the gamma cumulative distribution function. I
can guess some shape and scale parameters that give a similar result,
but I'd rather let the parameters be estimated. Is there a direct way
to do this in R?
Thanks,
Tim.
week <- c(0,5,6,7,9,11,14,19,39)
fraction <- c(0,0.23279,0.41093,0.58198,0.77935,0.88057,0.94231,0.98583,1)
weeks <- 1:160/4
plot(weeks, pgamma(weeks,shape=6,scale=1.15),type="l")
points(week,fraction,col="red")
More information about the R-help
mailing list