'Fixing' PearsonFitML to fit to a Pearson V distribution I am using the pearsonFitML function in the PearsonDS package to do maximum likelihood estimation of parameters in R. 
I am particularly interested in fitting Pearson Type 5 distributions to my data. Does anyone know how I can 'fix' this function so it only tries fitting a type 5 distribution? This may just be a straightforward issue of syntax but I've been playing round for a while and haven't got this sorted yet!
Many thanks,
Faith 
 A: Pearson Type V distribution is the inverse-gamma distribution. This question was previously answered in your question Maximum Likelihood Estimation of Inverse Gamma Distribution in R or RPy using the command fitdistr. If you do not trust this estimation, you can try direct optimisation of the likelihood function using the command optim.
The folowing code shows how to do this using simulated data. If you post your sample, I can adjust the code and perhaps we can see what is causing trouble in the optimisation step.
rm(list=ls())
# Required packages
library(MCMCpack)

# Simulated data
set.seed(1)
data = rinvgamma(n=250, shape = 5, scale = 2) + 2

hist(data)

# log-likelihood
ll = function(par){
if(par[1]>0 & par[2]>0 & par[3]<min(data)) return( -sum(log(dinvgamma(data-    par[3],par[1],par[2]))) )
else return(Inf)
}

# MLE
mle = optim(c(5,2,2),ll)
params = mle$par

# Fit
hist(data,probability=T,ylim=c(0,2.5))
points(seq(2,4.5,0.001),dinvgamma(seq(2,4.5,0.001)-params[3],params[1],params[2]),type="l",col="red")

I hope this helps.
