Dear R-users, I am trying to fit pareto distribution to some data but i've one problem. Using optim to calculate the maximum of the likelihood function of the pareto I use as start parameters the moments method(using the distribution function in the package actuar):
media=mean(x) var=mean(x^2)-media^2 scale=2*var/(var-media^2) shape=(scale-1)*media fitdistr(x,dpareto,list(shape=shape,scale=scale)) The problem is how to initialize the shape and scale parameters when "var<=media^2" . When "var<=media^2" scale and shape parameters are negative using moments method. Does anyone know how to initialize the paramaters when "var<=media^2"? Thanks Borja [[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.