Type: | Package |
Title: | Frequentist Model Averaging Distribution |
Version: | 0.1.2 |
Author: | Barry L. Nelson [aut], Xi Jiang [aut, cre] |
Maintainer: | Xi Jiang <xijiang2020@u.northwestern.edu> |
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. |
Depends: | R (≥ 3.1.0), stats, utils |
Imports: | fitdistrplus, actuar, EnvStats, extraDistr, MASS, quadprog |
License: | GPL-2 |
Encoding: | UTF-8 |
RoxygenNote: | 6.1.1 |
NeedsCompilation: | no |
Packaged: | 2022-12-18 03:17:41 UTC; wendyj |
Repository: | CRAN |
Date/Publication: | 2022-12-18 17:00:09 UTC |
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 |
J |
number of groups to divide the data into for cross-validation; if not specified, |
type |
a character string specifying the type of model
averaging estimator: |
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.
Value
fmafit
returns an object which is a list with four components:
w |
weight vector associated with distributions in
|
MLE_list |
list of MLE parameter estimates for each candidate distribution with |
Fset |
same as the input argument |
data |
sorted input argument |
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 |
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)