U.S. flagAn official website of the United States government
                    Here's how you know **Official websites use .gov**
                            
                            A **.gov** website belongs to an official government organization in the United States.
 **Secure .gov websites use HTTPS**
                            
                            A **lock** (                            
                              A locked padlock                                                      
                            
                            ) or **https://** means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.


Menu Agricultural Research Service
						
                    U.S. DEPARTMENT OF AGRICULTURE
 Animal Genomics and Improvement Laboratory: Beltsville, MD
 close



    Research

                    Research Projects
                                    Publications
                                    Collaborations
                                    News
                                    Software
                People

                    Staff Listing
                                    Careers


        


                    AIP
                        Home
                                    About
                                    Publications
                                    Software
                                    People
                                    Collaborations
                                    Careers
                                    Centennial
                                    Contact
                                    Dairy industry links
                    DirectionsSearch small
                    Search
            
            ARS Home
                                About ARS
                                Contact Us




ARS Home Northeast Area Beltsville, Maryland (BARC) Beltsville Agricultural Research Center Animal Genomics and Improvement Laboratory AIP Software MTGSAM





- ARS National Programs
- Search for a scientific manuscript
- Search for a research project
- ARS Software
- Programs and Projects
- Collaborations
- Subjects of Investigation
- Publications
- Home
- About
- Publications
- Software
- People
- Collaborations
- Careers
- Centennial
- Contact
- Dairy industry links
- Home
- Queries login
- News
- Animal Evaluation lists
- Genotype counts

**MTGSAM**
Utility programsSeveral MTGSAM utility programs are available to simplify some of the tasks necessary in using the Gibbs sampling programs.README.UTL
Information about obtaining utilitiesHERITCOR.FOR
Generates a new sample file (MTGS64) that contains values of heritabilities (fraction of phenotypic variance for other variances) and correlations
Reads MTGSPREP output to determine model so that calculation of phenotypic variance is determined without user intervention
Linked with MTGSSUB.FOR, MTGSRSB.FOR, and timing subroutines
Batch and make files for automated compiling and linking includedLAGCOR.FOR
Calculates lags of samples written to MTGS61 or MTGS64; user can specify additional burn-in rounds if MTGSRUN value  is considered insufficient
Requests gap between lag values calculated and number of correlations to calculate; e.g., if a value of 5 is used for lag and 20 correlations are requested, correlation of samples would be written 5, 10, 15, ..., 100 records apart in sample file
**Remember that samples in sample files may already be thinned depending on MTDFRUN option chosen**; this thinning rate should be considered when determining any additional burn-in and when deciding on gap between values calculated.
User specifies original frequency of sample writing used in MTGSRUN so that correct lags can be calculated based on original (unthinned) chain and lags listed in output file correspond to original chain; e.g., with a MTGSRUN thinning rate of 20 (every 20th sample written to MTGS61) and a requested gap of 5 records for calculating a total of 10 correlations, correlations of samples would be written 5 apart corresponding to lags of 5, 10, 15, ..., 50 records apart in **thinned** chain and lags of 100, 200, ..., 1,000 samples apart in **original** chainMNSAMP.FOR
Calculates mean of sampled values in MTGS61 or MTGS64, which is especially useful to monitor a Gibbs chain for a run that has not completed
Allows user to specify additional burn-in rounds if MTGSRUN value is considered insufficientPULLDAT.FOR
Used to read sampling data from MTGS61, 62, or 64 and copy that information to a user-specified text file; user specifies number of variables to copy to text file (with a shortcut for writing all variables).
Allows user to specify additional burn-in rounds if MTGSRUN value is considered insufficient
Writes sample information for a user-specified interval between samples read from sample filePULLMAT.FOR
Used similarly to PULLDAT.FOR except that output file is a user-specified MATLAB file
Resulting dataset can be loaded into MATLAB using "load filename" command; file name must have .mat as file extension
Matrix will be called gs (lower case), and rows will contain string of values for each parameter specified (rather than columns) to minimize memory usage (the only way to write the data file with columns containing the variable is to read the whole data set in, which will often be impossible); result is that number of samples in sample file (MTGS61 or 64) must be known in advanceGIBBSIT.FOR
Fortran program written by Raftery and Lewis; description comes from program header
Calculates number of iterations required in a Markov-chain Monte Carlo (e.g., Gibbs sampling) run; user has to specify precision required
Returns number of iterations required to estimate posterior cdf of q-quantile of quantity of interest (function of  parameters) to within ±r with probability s
Also gives number of "burn-in" iterations required for conditional distribution given any starting point (of derived 2-state process) to be within ε of actual equilibrium distribution
Not distributed with utilities program but available directly from StatLib.Contact
Please direct questions, comments, and program problems to Curt Van Tassell


Return to top


Connect with ARS Sign up


ARS Home
                            USDA.gov
                            Plain Writing
                            Policies & Links
                            Civil Rights Statements
                            FOIA
                            Accessibility Statement
                            Privacy Policy
                            Non-Discrimination Statement
                            Quality of Information
                            USA.gov
                            WhiteHouse.gov