moment
The software in this page calculates the posterior means and posterior standard deviations , and assess numerical accuracy of the posterior means. A description of the methodology can be found in BACC manual.
In the fortran, c, and matlab versions there is a standard input file with input records as follows:
- Number of burn-in iterations;"1" if machine-readable file to be created, else 0
- Name of machine-readable file to be created if "1" on line above
- name of moment simulator file to be written
- Column number of posterior simulator matrix for first moment
- Column number of posterior simulator matrix for second moment
- Column number of posterior simulator matrix for third moment
- Column number of posterior simulator matrix for fourth moment
- :
- :
- :
Languages
C routines
To run the program:
- Edit the control file (i.e., momin) as specified above
- Compile and link
- enter the command moment < CONTROL-FILE > OUTPUT-FILE
Files needed to create executable:
Fortran Routines
To run the program:
- Edit the control file described above
- Compile and link
- Enter the command moment < CONTROL-FILE > OUTPUT-FILE
Files needed to obtain the executable:
Libraries needed:
This routine uses IMSL. The user needs to link to IMSL or to the libraries described in LIBRARIES to generate executable.
Gauss
To run the program:
- Edit the top portion of moment
- Enter the command gauss -b moment
Files needed:
Mathematica
To run the program:
- Edit the top portion of moment.m
- Enter the command math < moment.m
Files needed to obtain the executable:
Matlab
To run the program:
- Edit the control file as noted above
- Edit the top portion of moment.m to specify the name of the control file and the name of the output file.
- Enter the command matlab < moment.m
Files needed to obtain the executable:
SPlus
To run the program:
- Edit the top portion of moment
- Enter the command splus BATCH moment out
Files needed to obtain the executable:
Samples
Sample input and output files
- sim(example
simulation file)
- momsim(example
simulation ouput file from moment)
- momout(example
ouput file from moment)
- momin(example
input file from moment)