[R] fitting Weibull distribution on observed percentiles

From: Claude Messiaen - Urc Necker <stagiaire2.urc_at_nck.ap-hop-paris.fr>
Date: Wed 13 Jul 2005 - 20:10:57 EST


Hi , R Users

I'm trying to fit a Weibull ditribution on observed percentiles using nls but it doesn't work. Here is the code I use: is there something wrong ?

# p corresponds to percentiles
# and q to the observed values
# the datas are from the livebirth in france in 1998 distribution

ined1998 <- data.frame( p = c(0.01638,0.49629,0.99284) ,

                                       q = c( 18,27,41))

a0<- 3
b0<- ined1998$q[2]/gamma(1+1/a0)

dist_w1998 <- nls(ined1998$q ~ qweibull(ined1998$p , a0 ,                                     b0) , start = c(a0,b0) , data=ined1998)

I look forward your reply

C.M
URC NECKER         [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 13 20:43:09 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:37 EST