Package 'FMAdist'

Title: Frequentist Model Averaging Distribution
Description: Creation of an input model (fitted distribution) via the frequentist model averaging (FMA) approach and generate random-variates from the distribution specified by "myfit" which is the fitted input model via the FMA approach. See 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.
Authors: Barry L. Nelson [aut], Xi Jiang [aut, cre]
Maintainer: Xi Jiang <[email protected]>
License: GPL-2
Version: 0.1.2
Built: 2024-12-03 06:40:15 UTC
Source: CRAN

Help Index


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'

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)=m=1q(wm)(Fm(x)).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.

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)

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.

B.L. Nelson and A.T. Wan and G. Zou and X. Zhang and W. X. Jiang (2021), "Reducing simulation input-model risk via input model averaging," INFORMS Journal on Computing, 33(2), 672-684.

See Also

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

Examples

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)

FMA random-variate generation

Description

Generate random variates from the distribution specified by myfit which is the fitted input model via the frequentist model averaging “FMA” approach.

Usage

rfma(n, myfit)

Arguments

n

number of random variates to generate

myfit

a list object returned by fmafit containing the four components needed for random-variate generation: w, MLE_list, Fset, and data

Details

rfma generates random variates that have the distribution of the model-average estimator. Each time a random variate is needed, a distribution is selected with probability equal to the corresponding weight and then a random variate from the fitted distribution is generated.

Value

rfma generates random variates from the distribution specified by myfit

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.

B.L. Nelson and A.T. Wan and G. Zou and X. Zhang and W. X. Jiang (2021), "Reducing simulation input-model risk via input model averaging," INFORMS Journal on Computing, 33(2), 672-684.

See Also

See fmafit for creation of an input model (fitted distribution) via the frequentist model averaging “FMA” approach.

Examples

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)
n<-100
sim_data<-rfma(n,myfit)