Learn R Programming

FMAdist (version 0.1.0)

fmafit: Building frequentist model averaging input models

Description

Creation of an input model (fitted distribution) via the frequentist model averaging “FMA” approach.

Usage

fmafit(X,Fset,J,type)

Arguments

X

a numerical vector of nonzero length containing data values for fitting

Fset

a list of character strings that specifies the set of candidate distributions; supported distributions are 'normal', 'lognormal', 'exponential', 'gamma', 'weibull', 'inverse gaussian', 'student t', 'uniform', 'cauchy', 'loglogistic', 'ED'

J

number of groups to divide the data into for cross-validation; if not specified, J = 10

type

a character string specifying the type of model averaging estimator: 'P' for probability, 'Q' for quantile; if not specified, type = 'P'

Value

fmafit returns an object which is a list with four components:

w

weight vector associated with distributions in Fset

MLE_list

list of MLE parameter estimates for each candidate distribution with 'NA' for ED (the empirical distribution)

Fset

same as the input argument

data

sorted input argument X (needed for ED)

Details

fmafit first fits each candidate parametric distribution in Fset to the data X using maximum likelihood estimation, which yields a set of fitted distributions F = {F_1, F_2,..., F_q}. The MLEs for each distribution are returned as MLE_list. Next a weight vector w = {w_1, w_2,..., w_q} is obtained through cross-validation and also returned. The resulting model-average estimator of the true cumulative distribution of the data is

$$F(x,w) = \sum_{m=1}^{q}(w_m)(F_m(x)).$$

The model average fitting can be either in the cumulative probability space or quantile space. The difference between the two types of model averaging is only in the weight vector associated with the candidate distributions, which is obtained through cross-validation in either the probability or quantile space.

References

W. X. Jiang and B. L. Nelson (2018), "Better Input Modeling via Model Averaging," Proceedings of the 2018 Winter Simulation Conference, IEEE Press, 1575-1586.

See Also

See rfma for random-variate generation from the fitted distribution obtained via “FMA” approach.

Examples

Run this code
# NOT RUN {
data<-rlnorm(500,meanlog=0,sdlog=0.25)
Fset<-c('gamma','weibull','normal','ED')
type<-'P' #by default type<-'Q'
J<-5  #by default J<-10
myfit<-fmafit(data,Fset,J,type)
# }

Run the code above in your browser using DataLab