Good-day Sir, I am R.Language users but am try to? estimate parameter of beta distribution particular dataset but give this error, which is not clear to me: (Initial value in "vmmin" is not finite) beta.fit <- fitdistr(data,densfun=dbeta,shape1=value , shape2=value) kindly assist. expecting your reply:
Assistant
3 messages · Adelabu Ahmmed, Jessica Streicher, Rui Barradas
You're not giving people much to work with. I googled the error, and it seems to come from the call to optim and has likely to do with bad starting parameters. That said, the documentation of fitdistr doesn't suggest it even supports "dbeta", there is only a "beta" mentioned.
On 22.01.2013, at 17:07, Adelabu Ahmmed wrote:
Good-day Sir, I am R.Language users but am try to estimate parameter of beta distribution particular dataset but give this error, which is not clear to me: (Initial value in "vmmin" is not finite) beta.fit <- fitdistr(data,densfun=dbeta,shape1=value , shape2=value) kindly assist. expecting your reply:
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Hello, You are calling the function in a wrong way. In the case of a beta fit, densfun should be the quoted string "beta" and the initial parameter values are elements of a named list. Like this: library(MASS) x <- rbeta(1000, shape1 = 2, shape2 = 0.5) fitdistr(x, densfun = "beta", start = list(shape1 = 1, shape2 = 1)) As for your error, I only got it if the data clearly can not fit a beta. y <- rgamma(1000, shape = 2, rate = 0.5) fitdistr(y, densfun = "beta", start = list(shape1 = 1, shape2 = 1)) Error in optim(x = c(6.19809706003757, 2.32632108817696, 3.60844436009277, : initial value in 'vmmin' is not finite So revise the way you call fitdistr and then, if the error persists, revise the parametric distribution to be fitted. Hope this helps, Rui Barradas Em 22-01-2013 16:07, Adelabu Ahmmed escreveu:
Good-day Sir, I am R.Language users but am try to estimate parameter of beta distribution particular dataset but give this error, which is not clear to me: (Initial value in "vmmin" is not finite) beta.fit <- fitdistr(data,densfun=dbeta,shape1=value , shape2=value) kindly assist. expecting your reply:
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.