Dear all i want to estimated the parameter of the gamma density(a,b,d) f(x) = (1/gamma(b)*(a^b)) * ((x-d)^(b-1)) * exp{-(x-d)/a)} for x>d
f(x) = Age specific fertility rate x = age when i run this in R by usling nls() gamma.asfr <- formula(asfr ~ (((age-d)^(b-1))/((gamma(b))*(a^b)))* exp(-((age-d)/a))) gamma.asfr1 <- nls(gamma.asfr, data= asfr.aus, start = list(b = 28, a = 1, d= 0.5), trace = TRUE) error: Error in numericDeriv(form[[3L]], names(ind), env) : Missing value or an infinity produced when evaluating the model when I use plinear algoritm, and run this gamma.asfr1 <- nls(gamma.asfr, data= asfr.aus, start = list(b = 28, a = 1, d= 0.5), trace = TRUE, algorithm="plinear") error: number of iterations exceeded maximum of 50 then i fix the iteration and minFactor even then its can't work gamma.asfr1 <- nls(gamma.asfr, data= asfr.aus, start = list(b = 28, a = 1, d= 0.5), trace = TRUE, algorithm="plinear", nls.control(maxiter=500, minFactor=0.000001)) error: Missing value or an infinity produced when evaluating the model Can any body tell the problem, where i am doing wrong thanks in advanc .. Muhammad Asif Wazir Ph.D student Institut für Statistik und Decision Support Systems (ISDS). University of Vienna, Austria cell: 00436509092298 [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.