View source: R/DistSelCriteria.R
DistSelCriteria | R Documentation |
A function to calculate the distribution selection criteria for a list of candidate fits.
DistSelCriteria(
X,
w = rep(1, length(X))/length(X),
candDist = c("Beta_ab", "Laplace", "Normal"),
criteria = c("logLik", "AIC", "AICc", "BIC", "MDL")
)
X |
Sample obersevations. |
w |
An optional vector of sample weights. |
candDist |
A vector of names of candidate distributions. |
criteria |
A vector of criteria to be calculated. |
When comparing models fitted by maximum likelihood to the same data, the smaller the AIC, BIC or MDL, the better the fit. When comparing models using the log-likelihood criterion, the larger the log-likelihood the better the fit.
An object of class matrix, containing the listed distribution selection criteria for the named distributions.
The MDL criterion only works for parameter estimation by numerical maximum likelihood.
Haizhen Wu and A. Jonathan R. Godfrey.
Ozone <- airquality$Ozone
Ozone <- Ozone[!is.na(Ozone)] # Removing the NA's from Ozone data
DistSelCriteria(Ozone, candDist = c("Gamma", "Weibull", "Normal", "Exp"),
criteria = c("logLik","AIC","AICc", "BIC"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.