[Solved] R fitdistr Error: non-finite finite-difference value

Error Message:

par<-MASS::fitdistr(xd,“gamma”)

Error in stats::optim(x = c(275.246894836426, 344.755493164062, 4575.26025390625, :
non-finite finite-difference value [1]

 

Solution: Scaling the data
par<-MASS::fitdistr(xd/100,“gamma”)

Read More: