rfma: FMA random-variate generation

View source: R/fma12172022.R

rfmaR Documentation

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)

FMAdist documentation built on Dec. 28, 2022, 1:34 a.m.

Related to rfma in FMAdist...