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 AGIL_Software MTDFREML





Practiceheadline bar Practice Problems The practice zip file contains examples of data files, input (also referred to as answer) files, and output files for the MTDFREML programs. The zip file also contains a PowerPoint file, MTDF_Practice, that includes input and batch files as well as some helpful hints. All of these examples use Karin Meyer's mouse data and pedigree files. Included in the zip file are three sets of files, corresponding to the three analyses: A relatively simple single trait analysis with a random animal effect and three fixed effects The pedigree file, Mouse.ped, includes three columns, representing animal, sire, and dam IDs in columns 1, 2, and 3. The data file, Mouse.dat, includes 7 integer variables and 3 real numbers on each row of data. There are three fixed effects in the model: generation, sex, and litter size, from integer variables 4, 5, and 6, respectively. The trait analyzed in this example is body weight from column 2 of the real data columns. There are no missing observations, but a logical missing value would be zero. There are 329 animals in the pedigree (see MTDF56 to confirm this), and the animal ID is contained in the first integer column. A more complicated analysis featuring two traits, each with an animal effect and correlated animal (maternal) genetic effects and random uncorrelated (maternal permanent environmental) effect and several fixed effects The pedigree information in the second analysis is the same as that used in the first analysis. The second model. The factors are the same for both traits included in this analysis. The same data file, Mouse.dat, will be used in the second exercise. There same three fixed effects are included in the model for each trait: generation, sex, and litter size, from integer variables 4, 5, and 6, respectively. The same trait is analyzed in this example, body weight from column 2 of the real data columns. The second trait included in this analysis is feed intake.  Again, there are no missing observations, but a logical missing value would be zero for the new trait, feed intake. In addition to the random animal effect for each trait, a maternal genetic effect is estimated for each trait. This maternal genetic effect is fit as a "second" animal effect and associated with dam ID in the second integer field. Finally, a maternal permanent environmental effect is fit as an uncorrelated random effect that is also linked by dam ID. A relatively simple model that uses a bit of a trick with equivalent models to fit a fixed effect model for a single trait. The final model fit is a model fitting solely fixed effects. This is accomplished by creating a pedigree with a single individual We accomplish this by adding a column of ones and a column of zeros to the original pedigree file as columns 4 and 5, respectively. The resulting file is named Mouse.p10. Similarly, columns of ones and zeros were added to the Mouse.dat file between the original third and fourth columns. This new data file is named Mouse.d10. To create the single animal pedigree, the user simply indicates that the animal ID is stored in the column of ones (column 4) and the sire and dam are both coded as zero (column 5). The resulting pedigree has a single animal, coded as animal 1. Consequently, the relationship matrix, is a 1-by-1 matrix with a value of one. When specifying the "animal" effect, the user uses the column of ones as the animal ID. The solutions to the random effects in a set of mixed model equations have a unique property - they must sum to zero, or in this situation, the single solution must be zero, which means that the animal effect does not affect the likelihood. This can be shown to be an equivalent model to the strictly fixed effect model. The fixed effects are the same as the previous two models: generation, sex, and litter size, from integer variables 6, 7, and 8, respectively. Remember that two additional columns were added to this data file. The same trait is analyzed in this example, body weight from column 2 of the real data columns. When you have obtained solutions to the mixed models, confirm that the "animal" effect solution is truly zero. You can verify that the solutions to the fixed effects are unaffected by changing the variance components. For each of the analyses a set of answer files are included that can be used as a guide for providing answers interactively. These input files can also be used along with an attached batch file that enable rapid semi-automated analysis of that model. For each of the three scenarios, four answer files are provided. First, for each analysis, an answer file is included for MTDFNRM that will construct the inverse of the numerator relationship matrix (A-1). Next, an input file is provided for MTDFPREP that provides model description, and an answer file that provides starting values for the variance component estimation and iteration constraints for MTDFRUN is included. Finally, an input file is provided to obtain sets of inverse blocks, sampling variances, contrasts and standard errors of contrasts,  and expectations of fixed effects. The DOS/Windows convention of ***executable.exe < input.txt* (**e.g., mtdfnrm<mousenrm.in) means that the executable mtdfnrm[.exe] (providing the .exe file extension is optional) using the mousenrm.in file to respond to questions asked and input required when running mtdfnrm.exe. Otherwise, answers must be entered manually (i.e., typed) in response to questions.    File Name
    Description Location: {Root of Zip file} MTDF_Practice.pptx
    Answer/input files and some helpful hints Location: .\Input Mouse.ped
    Pedigree file with columns: Animal, Sire, DamMouse.dat
    Data file with columns: Animal, Sire, Dam, Generation, Sex, Litter Size (Integer), Litter Number, Litter Size (Real), Body Wt, Feed IntakeMouse.p10
    Pedigree file; Animal, Sire, Dam, Ones, ZerosMouse.d10
     Data file with columns: Animal, Sire, Dam, Ones, Zeros, Generation, Sex, Litter Size (Integer), Litter Number, Litter Size (Real), Body Wt, Feed Intake Location: .\Input\Mouse MouseNRM.in
     Answer file for running mouse pedigree using MTDFNRM.exeMousePRP.in
     Answer file for running MTDFPREP.exe. This input file provides the number of animals in pedigree reported in output from MTDFNRM (in MTDF56)MouseRUN.in
     Answer file used in the first run of MTDFRUN.exeMouseRUN.SE
     Answer file to use after assumed convergence to continue to use the VCE with option 4 to obtain F- and t- statistics, SEP, expected values of solutions for levels of fixed factors, etc.Mouse.bat
     Batch file showing program sequence, replacement of hand input with answer files, and saving output files to prevent MTDFREML standard output files from being overwritten Location: .\Result\Mouse MTDF56.1
     Output file from MTDFNRM. This output information is needed to provide the number of animals in the pedigree file (needed in MTDFPREP)MTDF66.1
     Output file with summary of information provided by MTDFPREPMTDF4.1
     Renamed MTDF4 file updated with new estimates of variance components (see batch file), can be used as written by completed MTDFREML run or can be modified to restart (see batch file)MTDF76.1
     First set of solutions. Save to compare -2logL with restartMTDF4.2
     Answer file updated (from MTDF4.1) with new estimates of variancesMTDF67.2
     Output file with F- and t- statistics and expected valuesMTDF76.2
     Second set of solutions to compare -2logL with previous or next startMTDF77.2
     Solution file for fixed effectsMTDF78.2
     EBV for all animals in pedigree file (two EBV per animal corresponding to direct and maternal genetic effects)MTDF54
     (not shown, will have VCE when VCE are too big for formats used to write MTDF76)MTDF72
     (not shown, will have EBV, SEP, rTI, and inbreeding coefficient if answer is yes to that question-see MouseRUN.SE2 for such an answer file) Location: .\Input\Two MouseNRM.in
     Answer file for running mouse pedigree using MTDFNRM.exeMousePRP.in2
     Answer file for running MTDFPREP.exe for two-trait modelMouseRUN.in2
     Answer file used in the first run of MTDFRUN.exe for two-trait modelMouseRUN.SE2
     Answer file to use after assumed convergence to continue to use the VCE with option 4 to obtain F- and t- statistics, SEP, expected values of solutions for levels of fixed factors, etc. for two-trait analysisMouseTwo.bat
     Batch file showing program sequence, replacement of hand input with answer files, and saving output files to prevent MTDFREML standard output files from being overwritten for two-trait analysis Location: .\Result\Two MTDF56_Two.1
     Output file from MTDFNRM. This output information is needed to provide the number of animals in the pedigree file (needed in MTDFPREP)MTDF66_Two.1
     Output file with summary of information provided by MTDFPREPMTDF4_Two.1-5
     Renamed MTDF4 files updated with new estimates of variance components, and used as written by completed MTDFREML run to restart (see batch file)MTDF76_Two.1-5
     Sets of likelihood evaluations. Compare -2logL with restartMTDF67_Two.5
     Sets of inverse blocks, sampling variances, contrasts and standard errors of contrasts, expectations of fixed effects. See MouseRUN.SE2MTDF77.5
     Solution file for fixed effectsMTDF78.5
     EBV for all animals in pedigree file (two EBV per animal corresponding to direct and maternal genetic effects for each of the two traits) Location: .\Input\Fix MouseNRM.fix
     Answer file for creating a single animal pedigree using MTDFNRM.exeMousePRP.fix
     Answer file for running MTDFPREP.exe for a fixed-effects only modelMouseRUN.fix
     Answer file used in the first run of MTDFRUN.exe for the fixed-effects modelMouseRUN.fse
     Answer file to Sets of inverse blocks, sampling variances, contrasts and standard errors of contrasts, expectations of fixed effects for fixed-effects model.MouseFix.bat
     Batch file to completely run the fixed-effects model, saving output files to prevent MTDFREML standard output files from being overwritten Location: .\Result\Fix MTDF56.fix
     Output file from MTDFNRM. Confirm the pedigree contains a single animalMTDF66.fix
     Output file with summary of information provided by MTDFPREP. Again, confirm the pedigree contains a single animalMTDF4.fix
     Renamed MTDF4 files updated with new estimates of variance components. Not used.MTDF76.fix
     Iteration for variance componentsMTDF67.fix
     Sets of inverse blocks, sampling variances, contrasts and standard errors of contrasts, expectations of fixed effects. See MouseRUN.SE2MTDF77.fix
     Solution file for fixed effects - this is why we ran this analysis! Note that these solutions (and any estimable function) do NOT depend on the variance components provided!MTDF78.fix
     EBV for single animals in pedigree. Confirm the value of the animal effect is ZERO!


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