Determines the configuration for each individuals based on the family history and assigns a posterior mean genetic liability to each individual.
assign_ltfh_phenotype(pheno_file, output_file = pheno_file, alpha, sibs)
| pheno_file | path to file with information on liabilities, i.e. the file "phenotypes.txt" generated by simulation functions. |
|---|---|
| output_file | path of output file, including file extension ".txt". |
| alpha | significance level used for deciding phenotype status based on liabilities. |
| sibs | optional: number of siblings in the families to be used for calculating posterior mean genetic liabilities. Defaults to using all of an individual's siblings. |
Does not return anything, but writes an output_file to disk,
where configuration, configuration class and posterior mean genetic
liability is appended to the end of pheno_file.
For a more detailed guide of how to read the configuration and configuration
class strings, see vignette("liability-distribution").
The posterior mean genetic liabilities (PMGL) are estimated using Gibbs
sampling. For further explanation on the process, as well as parameters used
in the algorithm, see vignette("gibbs").
Calculation of PMGL is based on which configuration an individual belongs
to. Configurations are determined by phenotype status in the family. Two
different configurations can be equivalent from a theoretical standpoint,
and will belong to the same configuration class, denoted by the `conf_class`
column. Equivalent configurations are assigned the same PMGL.
Note: The `sibs` argument can be used for limiting how many siblings
are taken into consideration when creating configurations. This allows for
different analyses with the same simulation.