diff --git a/R/binary_to_liability.R b/R/binary_to_liability.R index e885324..0c5736f 100644 --- a/R/binary_to_liability.R +++ b/R/binary_to_liability.R @@ -1,8 +1,9 @@ -#' Convert binary traits to liabilities +#' Convert binary traits to liabilities for low prevalence #' -#' This function implements the conversion of binary traits to liabilties as +#' @description +#' This function implements an approximate conversion of binary traits to liabilties as #' proposed in the LT-MAPIT model (Crawford and Zhou 2018, -#' https://doi.org/10.1101/374983). +#' https://doi.org/10.1101/374983). Note that this is only good for low prevalence. #' To run LT-MAPIT (MAPIT on case-control traits), convert the binary traits to #' liabilities using this function and pass the liabilities to mvmapit as trait. #' diff --git a/man/binary_to_liability.Rd b/man/binary_to_liability.Rd index 00d1f8f..990c5fb 100644 --- a/man/binary_to_liability.Rd +++ b/man/binary_to_liability.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/binary_to_liability.R \name{binary_to_liability} \alias{binary_to_liability} -\title{Convert binary traits to liabilities} +\title{Convert binary traits to liabilities for low prevalence} \usage{ binary_to_liability(case_control_trait, prevalence) } @@ -16,9 +16,9 @@ A trait vector of same length as y with case-control indicators converted to liabilties. } \description{ -This function implements the conversion of binary traits to liabilties as +This function implements an approximate conversion of binary traits to liabilties as proposed in the LT-MAPIT model (Crawford and Zhou 2018, -https://doi.org/10.1101/374983). +https://doi.org/10.1101/374983). Note that this is only good for low prevalence. To run LT-MAPIT (MAPIT on case-control traits), convert the binary traits to -liabilities using this function and pass the liabilities to `mvmapit` as trait. +liabilities using this function and pass the liabilities to mvmapit as trait. } diff --git a/vignettes/tutorial-lt-mapit.Rmd b/vignettes/tutorial-lt-mapit.Rmd index 8302697..fc040f2 100644 --- a/vignettes/tutorial-lt-mapit.Rmd +++ b/vignettes/tutorial-lt-mapit.Rmd @@ -44,7 +44,6 @@ sample_size <- 500 ## Simulate random genotypes Simulate the genotypes such that all variants have minor allele frequency (MAF) > 0.05. -**NOTE:** As in the paper, we center and scale each genotypic vector such that every SNP has mean 0 and standard deviation 1. ```{r random_genotypes, eval = F} maf <- 0.05 + 0.45 * runif(n_snps) @@ -90,6 +89,7 @@ X <- simulated_data$genotype[c(cases, controls), ] To run MAPIT with case-control traits, we need to convert the traits back to liabilities. The function `binary_to_liability` provides this conversion. +**NOTE:** The `binary_to_liability` function is an approximation that is only suited for low prevalence in the disease trait. ```{r mapit, eval = F} y_liabilities <- binary_to_liability(y, disease_prevalence)