readme.thrgibbs1
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
readme.thrgibbs1 [2012/05/28 14:07] – created shogo | readme.thrgibbs1 [2018/04/12 20:26] – [Options] shogo | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | THRGIBBS1F90 | + | ====== |
- | Based on THRGIBBSF90 written by DeukHwan Lee at the University of Georgia, | + | =====Summary===== |
- | Rewritten by Shogo Tsuruta, 2004 | + | Gibbs sampler for threshold-linear mixed models. The original program (THRGIBBSF90) was written by DeukHwan Lee in 2001 based on GIBBS2F90 |
- | last modified 09/05/2007 | + | \\ |
+ | THRGIBBS1F90 implements Gibbs sampler for mixed threshold-linear models involving multiple categorical and linear variables. Thresholds and variances can be estimated or assumed. Another version of thrgibbs1f90b for binary responses is available. | ||
+ | \\ | ||
+ | See PREGSF90 with genotypes (SNP) for options. | ||
+ | =====Parameters===== | ||
+ | The parameter file is the same as for BLUPF90 except for options. | ||
- | Functionality | + | =====Options===== |
- | ------------- | + | < |
+ | OPTION cat 0 0 2 5 | ||
+ | </ | ||
+ | " | ||
+ | " | ||
+ | < | ||
+ | OPTION fixed_var all | ||
+ | </ | ||
+ | Store all samples for solutions in " | ||
+ | < | ||
+ | OPTION fixed_var all 1 2 3 | ||
+ | </ | ||
+ | Store all samples for solutions in " | ||
+ | < | ||
+ | OPTION fixed_var mean | ||
+ | </ | ||
+ | Only posterior means and SD for solutions are calculated for all effects in " | ||
+ | < | ||
+ | OPTION fixed_var mean 1 2 3 | ||
+ | </ | ||
+ | Only posterior means and SD for solutions are calculated for effects 1, 2, and 3 in " | ||
+ | </ | ||
+ | < | ||
+ | OPTION solution all | ||
+ | </ | ||
+ | Caution: this option will create a huge output solution file when you run many rounds and/or use a large model. | ||
+ | Store all samples for solutions in " | ||
+ | < | ||
+ | OPTION solution all 1 2 3 | ||
+ | </ | ||
+ | Caution: this option will create a huge output solution file when you run many rounds and/or use a large model. | ||
+ | Store all samples for solutions in " | ||
+ | < | ||
+ | OPTION solution mean | ||
+ | </ | ||
+ | Only posterior means and SD for solutions are calculated for all effects in " | ||
+ | < | ||
+ | OPTION solution mean 1 2 3 | ||
+ | </ | ||
+ | Only posterior means and SD for solutions are calculated for effects 1, 2, and 3 in " | ||
+ | < | ||
+ | OPTION cont 10000 | ||
+ | </ | ||
+ | " | ||
+ | When using " | ||
+ | < | ||
+ | OPTION prior 5 2 -1 5 | ||
+ | </ | ||
+ | The (co)variance | ||
+ | Degree of belief for all random effects should be specified using the following structure: | ||
+ | OPTION prior eff1 db1 eff2 db2 ... effn dbn | ||
+ | effx correspond to the effect number and dbx to the degree of belief for this random effect, | ||
+ | In this example 2 is the degree of belief for the 5th effect, and 5 is the degree of belief for the residual.\\ | ||
+ | < | ||
+ | OPTION seed 123 -432 | ||
+ | </ | ||
+ | Two seeds for a random number generator can be specified. | ||
+ | < | ||
+ | OPTION thresholds 0.0 1.0 2.0 | ||
+ | </ | ||
+ | Set the fixed thresholds. No need to set 0 for binary traits. | ||
+ | < | ||
+ | OPTION residual 1 | ||
+ | </ | ||
+ | Set the residual variance = 1 (no need for binary traits). | ||
+ | < | ||
+ | OPTION pos_def x.x | ||
+ | </ | ||
+ | Specify checking pos-def for fixed effects where x.x is a tolerance (default=1d-08). | ||
+ | < | ||
+ | OPTION censored 1 0 | ||
+ | </ | ||
+ | Negative values for the categorical trait in the data set indicate censored records. "1 0" determines that the first categorical trait is censored and the second uncensored. | ||
+ | < | ||
+ | OPTION SNP_file snp | ||
+ | </ | ||
+ | Specify the SNP file name to use genotype data. | ||
- | THRGIBBS1F90 | + | ==== Save intermediate results |
- | involving multiple categorical and linear variables. Thresholds and variances | + | |
- | can be computed or assumed. Another version of thrgibbs1f90b for binary responses is available. The followong options are available: | + | |
- | Parameters | + | OPTION save_halfway_samples n |
- | ---------- | + | |
- | The parameter file is the same as for BLUPF90 except for options. | + | This option can help the 'cold start' (to continue the sampling when the program accidentally stops before completing the run). An integer value //n// is needed. In every //n// rounds, |
- | Options | + | To restart, add '' |
- | ------- | + | |
- | OPTION cat 0 0 2 5 | + | === Tips === |
- | 0s indicate that the first and second traits are linear. | + | * Small //n// will make the program slow because of frequent file writing. The //n// should be a multiple of the interval (the 3rd number you will input in the beginning of the program). |
- | 2 and 5 indicate that the third and fourth traits are categorical with 2 and 5 categories. | + | * If the program stops during burn-in, the restart will fail because '' |
+ | * The cold start may add tiny numerical errors to the samples. Samples from the cold start wouldn' | ||
+ | * If, unfortunately, | ||
- | OPTION fixed_var all | + | === Example === |
- | Store all samples for solutions | + | Put the following option |
- | assuming that (co)variances set in the parameter file are known. | + | |
- | OPTION | + | |
- | Store all samples for solutions in " | + | |
- | OPTION fixed_var mean | + | Run '' |
- | Only posterior means and SD for solutions are calculated for all effects in " | + | |
- | OPTION fixed_var mean 1 2 3 | + | '**** saving halfway samples |
- | Only posterior means and SD for solutions are calculated for effects 1, 2, and 3 in " | + | |
- | OPTION solution all | + | In this case, we assume the number of total samples |
- | Store all samples | + | |
- | OPTION solution all 1 2 3 | + | |
- | Store all samples | + | 3000 0 |
+ | Give n to store every n-th sample? (1 means store all samples) | ||
+ | 10 | ||
- | OPTION solution mean | + | Make sure the intermediate results |
- | Only posterior means and SD for solutions | + | |
- | OPTION solution mean 1 2 3 | + | 100 rounds |
- | Only posterior means and SD for solutions | + | G |
+ | 2758. | ||
+ | 1900. | ||
+ | 2019. | ||
+ | G | ||
+ | 225.5 -91.35 | ||
+ | | ||
+ | | ||
+ | R | ||
+ | 1755. | ||
+ | 868.7 | ||
+ | 817.0 | ||
+ | * Last seeds = 1877469549 | ||
+ | * Number of samples kept = 100 | ||
+ | | ||
+ | solutions stored in file: " | ||
- | OPTION cont 10000 | + | Stop the program. In this case, program |
- | 10000 is the number of samples run previously. | + | |
- | The user can restart the program | + | |
- | OPTION prior 10 | + | |
- | 10 is the degree of belief for the priors specified in the parameter file. | + | |
+ | Image PC Routine | ||
+ | thrgibbs1f90 | ||
+ | thrgibbs1f90 | ||
- | OPTION seed 123 -432 | + | Make sure there are the following 5 files. |
- | Two seeds for a random number generator can be specified. | + | |
- | OPTION thresholds 0.0 1.0 2.0 | + | binary_final_solutions |
- | Set the fixed the thresholds | + | |
- | No need to set 0 for binary traits | + | |
- | OPTION | + | Browse the file '' |
- | Set the residual variance | + | |
+ | Saved on 2017-03-10 10:53:22 | ||
+ | |||
+ | State in the current run: | ||
+ | last round = 800 | ||
+ | sampled in this run | ||
+ | total number of samples = | ||
+ | number of burn-in | ||
+ | interval | ||
+ | |||
+ | Suggestion for the input in next run: | ||
+ | total number of samples = | ||
+ | number of burn-in | ||
+ | interval | ||
+ | |||
+ | When you restart the program, do not forget to put the following option | ||
+ | in your parameter file. | ||
+ | OPTION | ||
+ | |||
+ | Put the option '' | ||
+ | |||
+ | OPTION cont 1 | ||
+ | |||
+ | Run '' | ||
+ | |||
+ | '*** continuous sampling selected *** previous # samples | ||
+ | |||
+ | **NOTE: Although the message may say the previous number of sample is 1, you can ignore it. The program recognizes it is the cold start mode and works correctly.** | ||
+ | |||
+ | Input the three numbers that are shown in '' | ||
+ | |||
+ | | ||
+ | 2200 0 | ||
+ | Give n to store every n-th sample? (1 means store all samples) | ||
+ | 10 | ||
+ | |||
+ | The program will start from the round 801 as expected. | ||
+ | |||
+ | | ||
+ | G | ||
+ | | ||
+ | | ||
+ | | ||
+ | G | ||
+ | | ||
+ | | ||
+ | | ||
+ | R | ||
+ | | ||
+ | | ||
+ | | ||
- | OPTION censored xx | + | Just wait the analysis. You can interrupt |
- | Negative values of the last category in the data set indicate censored records. " | + | |
- | OPTION missing -1 | ||
- | Change the missing value for a continuous trait (default 0). This is not tested yet. | ||
readme.thrgibbs1.txt · Last modified: 2024/03/25 18:22 by 127.0.0.1