0

I found a similiar problem to my current issue but it does not really apply to my problem or at least I don't find where the problem is.

I am following the document: https://cran.r-project.org/web/packages/fitdistrplus/fitdistrplus.pdf to fit a pareto dsitribution to my data. But first I am trying to go all single steps like in the document fitdistrplus.pdf.

Therefore I am trying to use the same piece of coding (Page 30):

library(fitdistrplus)
library(actuar)

require(actuar)
#simulate a sample
x4 <- rpareto(1000, 6, 2)
#empirical raw moment
memp <- function(x, order) mean(x^order)
#fit
fP <- fitdist(x4, "pareto", method="mme", order=c(1, 2), memp="memp",
start=list(shape=10, scale=10), lower=1, upper=Inf)
summary(fP)
plot(fP)

This is the result:

checkstartfix is carried out
Error in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg,  : 
  'start' must specify names which are arguments to 'distr'.

I am not really sure what the exact problem is? I have the issue solely with fitting the pareto-distr but not with lnorm or weibull. My R-Version is 4.2.0 and RStudio is 2022.02.2 Build 485.

Can somebody please help me to understand where the problem is?

Kind regards p.

Phil
  • 7,287
  • 3
  • 36
  • 66
pintomat
  • 1
  • 1
  • Does this answer your question? [Error in fitting data to Gumbel distribution using fitdist in R](https://stackoverflow.com/questions/55831530/error-in-fitting-data-to-gumbel-distribution-using-fitdist-in-r) – Phil Aug 04 '22 at 03:59
  • Thanks. This is what I have already found. I have the exact same notations as the document (scale, shape) and still have the problem. I am following the same piece of code where the author gets results but I don't. – pintomat Aug 04 '22 at 05:04
  • I think I found the solution and it may be the versions of R and RStudio. I'll reply later if it is working. – pintomat Aug 05 '22 at 08:36
  • RStudio wouldn't have an effect on the behaviour of the package. Maybe R itself, but any versioning difference in behaviour is most likely to come from the package itself. – Phil Aug 05 '22 at 14:16
  • Its now done! There were 2 issues. First was version of R and firewall. – pintomat Aug 10 '22 at 08:29

0 Answers0