Nothing
#' @export
#' @import AdequacyModel
#' @import graphics
mBellBX<-function (x, a,lambda, method="B")
{
pdf_BellBX<-function(par,x){
a=par[1]
lambda=par[2]
G=(1-exp(-x^2))^a
g=2*a*x*exp(-x^2)*(1-exp(-x^2))^(a-1)
F=(1-exp(-exp(lambda)*(1-exp(-lambda*G))))/(1-(exp(-exp(lambda)+1)))
f=lambda*g*exp(lambda*(1-G))*exp(-exp(lambda)*(1-exp(-lambda*G)))/(1-(exp(-exp(lambda)+1)))
return(f)
}
cdf_BellBX<-function(par,x){
a=par[1]
lambda=par[2]
G=(1-exp(-x^2))^a
g=2*a*x*exp(-x^2)*(1-exp(-x^2))^(a-1)
F=(1-exp(-exp(lambda)*(1-exp(-lambda*G))))/(1-(exp(-exp(lambda)+1)))
f=lambda*g*exp(lambda*(1-G))*exp(-exp(lambda)*(1-exp(-lambda*G)))/(1-(exp(-exp(lambda)+1)))
return(F)
}
res = suppressWarnings(AdequacyModel::goodness.fit(pdf = pdf_BellBX, cdf = cdf_BellBX, starts = c(a,lambda), data = x, method = method, mle = NULL))
aux = cbind(res$mle, res$Erro)
colnames(aux) = c("MLE", "SE")
aux1 = cbind(res$AIC, res$BIC, res$W,res$A, res$Value)
colnames(aux1) = c("AIC", "BIC", "W", "A","-2L")
rownames(aux1) = c("")
aux2 = cbind(res$KS$statistic, res$KS$p.value)
colnames(aux2) = c("KS Statistic", "KS p-value")
rownames(aux2) = c("")
aux3 = cbind(if (res$Convergence == 0) {
"Converged"
}
else {
"Not Converged"
})
colnames(aux3) = c("")
rownames(aux3) = c("")
list(Estimates = aux, `Goodness-of-Fit Tests` = aux1, `Kolmogorov-Smirnov Test` = aux2,
`Convergence Status` = aux3)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.