View source: R/residual_permutation_function.R
permute_resids_trait_cor | R Documentation |
Power Simulations
permute_resids_trait_cor(
pheno,
trait,
covariates_string,
gene_exp,
required_cor,
seed = NULL,
outcome_type = "continuous"
)
pheno |
A data.frame with phenotypes |
trait |
A continuous/ binary variable to permute while preserving association with covariates |
covariates_string |
Covariates to adjust for, as a string used in regression model |
gene_exp |
Selected gene/transcript to simulate as associated with the trait |
required_cor |
Corelations value simulating the strength of association between trait and gene_exp |
seed |
Random seed |
outcome_type |
continuous and binary |
A vector permuted trait that is associated with gene_exp
data(phenotype)
data(ENSG00000000003)
trait<-"Trait.1"; covars="Age+Sex"
permute_resids_trait_cor(pheno= phenotype,trait=trait,
covariates_string=covars, required_cor=0.3,
gene_exp=ENSG00000000003,seed=NULL, outcome_type="continuous")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.