How to use fitdist correctly?

180 Views Asked by At

I want to fitting about Generalized normal distribution. However, the R code for performing this was input, and the following error occurred. I really need your help to solve this. Help me.

library(fitdistrplus)
data(mtcars)
head(mtcars)
fit <- fitdist(mtcars$mpg, "gnorm", start=list(mean=mean(mtcars$mpg), 
                                               sd=sd(mtcars$mpg), 
                                               shape=0))

The following are the results of the implementation.

> fit <- fitdist(mtcars$mpg, "gnorm", 
+                start=list(mean=mean(mtcars$mpg), 
+                           sd=sd(mtcars$mpg), 
+                           shape=0))
Error in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg,  : 
'start' must specify names which are arguments to 'distr'.

I want an R code that can solve these problems, and I want a brief description of it. Thanks a lot.

0

There are 0 best solutions below