Copyright 2002 (c) by Bahar Biller and Barry L. Nelson ********************** VARTA PROGRAM HELP FILE ********************** Bahar Biller Updates: 01/28/02 09/09/02 The VARTA program consists of a series of C++ subroutines which implement the theory in Biller and Nelson [2002]. Given a prespecified number of marginal distributions along with a finite number of correlation matrices to match and their respective desired relative errors, the program outputs the parameters of the VAR process that result in an VARTA process with the desired properties. The data points generated from the desired input process are stored in the program output file called ``VARTA.out." ************* PROGRAM INPUT ************* The main input for the VARTA program is in the user-created file "VARTA.dat". The format of this input file is: Line 1: Number of observations to be generated by the VARTA program Line 2: Number of component series in the input process, k Line 3: Maximum lag for which an input correlation matrix is given, p Line 4: 1 if the marginal distributions are specified as a Johnson transformation 2 if the marginal distributions are specified through their first four moments If the value on Line 4 is 1, then Next 5k lines: Type of Johnson transformation for component series 1 1 = Johnson Lognormal 2 = Johnson Unbounded 3 = Johnson Bounded 4 = Johnson Normal Value of XI for component series 1 Value of XLAM for component series 1 Value of GAMMA for component series 1 Value of DELTA for component series 1 Type of Johnson transformation for component series 2 Value of XI for component series 2 Value of XLAM for component series 2 Value of GAMMA for component series 2 Value of DELTA for component series 2 . . . . . Type of Johnson transformation for component series k Value of XI for component series k Value of XLAM for component series k Value of GAMMA for component series k Value of DELTA for component series k If the value on Line 4 is 2, then Next 4k lines: XBAR, the mean for component series 1 SD, the standard deviation for component series 1 RB1, the square_root of the BETA1 for component series 1 BB2, the value of the BETA2 for component series 1 XBAR, the mean for component series 2 SD, the standard deviation for component series 2 RB1, the square_root of the BETA1 for component series 2 BB2, the value of the BETA2 for component series 2 . . . . . XBAR, the mean for component series k SD, the standard deviation for component series k RB1, the square_root of the BETA1 for component series k BB2, the value of the BETA2 for component series k Next pk^2+k(k-1)/2 lines: Entries for input correlation matrices, rho_X, for lags from 0 to p rho_X[0][1][1] rho_X[0][1][2] . . . rho_X[0][1][k] rho_X[0][2][1] . . . rho_X[0][2][k] . . . . . rho_X[p][k-1][1] rho_X[p][k-1][2] . . . rho_X[p][k-1][k] rho_X[p][k][1] . . . rho_X[p][k][k] Next line: Desired relative error (e.g., 0.05 for no more than 5% relative error) No other user input is required for this option. ************** PROGRAM OUTPUT ************** The VARTA program output appears in an ouput file called VARTA.out. If the program terminated abnormally, then the reason for abnormal termination will appear in this file. Reasons for abnormal termination are: 0 The data generation is successfully completed and read into the VARTA.out output file. 1 There is no Johnson representation for the first four parameters given (Given first four moments do not correspond to a well-defined distribution). 2 The shape parameter, delta, is negative. 3 The scale parameter, xlam, is negative for the unbounded family. 4 The scale parameter, xlam, is not one for the lognormal family. 5 The scale parameter, xlam, is not one for the normal family. 6 The location parameter, xi, is not zero for the normal family. 7 The input correlation matrix given at lag 0 is not symmetric. 8 One or more input autocorrelations does not lie between the minimum and maximum feasible bivariate correlations for the specified marginal distribution. 9 The input autocorrelation structure specified through the first p lags is not positive definite. 10 The base correlation matrix implied by the specified correlations is not positive definite. 11 The underlying base process is not stationary. 12 The covariance matrix of the white noise is not positive definite. 13 SB fitting has failed to converge, so an ST fit is made instead. 14 SB fitting has failed to converge, so an SN fit is made instead. 15 SB fitting has failed to converge, so an SL fit is made instead. ********* GLOBALS.H ********* Defines the global variables used in the VARTA program rho_X[h][i][j] : Trivariate array indicating the input correlation between ith and jth component series at lag h. rho_Z[h][i][j] : Trivariate array indicating the base correlation between ith and jth component series at lag h. X[i][j] : Input data corresponding to the ith component seies generated at time j. corr_min : Minimum possible pairwise correlation. corr_max : Maximum possible pairwise correlation. All the given input correlations, rho_X[h][i][j] must lie between corr_min[i][j] and max_corr[i][j]. Phi : Autoregressive coefficient matrix. Sigma : Covariance matrix of the white noise. marginal_type : Type of the Johnson transformation. The next four variables correspond to the Johnson parameters: gamma delta xi xlam The next four variables correspond to the first four moments: mean : Mean dev : Standard Deviation sqrt_beta_1 : Square root of skewness, taking the same sign as the third moment about the mean beta_2 : Kurtosis ******** MAIN.CPP ******** /* Opens the input data file ``VARTA.dat" string FileName("VARTA.dat"); /* For the paper example */ ifstream dataFile(FileName.c_str()); /* Reads the input-process-definition file in the following order: length kvalue pvalue way_to_define_marginals marginal_type_1 # way_to_define_marginals = 1 xi_1 xlam_1 gamma_1 delta_1 ..... ..... marginal_type_kvalue xi_kvalue xlam_kvalue gamma_kvalue delta_kvalue mean_1 # way_to_define_marginals = 2 std_1 beta_1_1 beta_2_1 ........ ........ mean_kvalue std_kvalue beta_1_kvalue beta_2_kvalue rho_X[0][1][1] rho_X[0][1][2] ............. rho_X[0][1][kvalue] .............. .............. rho_X[pvalue][1][1] rho_X[pvalue][1][2] ............. rho_X[pvalue][1][kvalue] digit_of_accuracy */ /* Check the feasibility of the Johnson-type marginals of the input process */ /* For each component series, determine the possible bivariate input correlations */ /* Check the autocorrelation structure of the input process */ /* Solve the correlation-matching problem */ /* Check the autocorrelation structure of the input process */ /* Define the underlying base process through its system parameters */ /* Generate data with the desired marginals and the autocorrelation structure */ REFERENCES Biller, B. 2002. A Comprehensive Input-Modeling Framework and Software for Stochastic, Discrete-Event Simulation Experiments. Doctoral Dissertation. Department of Industrial Engineering and Management Sciences, Northwestern University, Evanston, IL. Biller, B. and B.L. Nelson. 2002. Modeling and Generating Multivariate Time-Series Input Processes Using a Vector Autoregressive Technique. Under Review for ACM Transactions on Mathematical Modeling and Software.