Tag Archives: R fitdistr Error

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

Error Message:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
par<-MASS::fitdistr(xd,“gamma”)
Error in stats::optim(x = c(275.246894836426, 344.755493164062, 4575.26025390625, :
non-finite finite-difference value [1]
par<-MASS::fitdistr(xd,“gamma”) Error in stats::optim(x = c(275.246894836426, 344.755493164062, 4575.26025390625, : non-finite finite-difference value [1]
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”)