View source: R/residual_permutation_function.R
permute_resids_trait | R Documentation |
Residual permutation
permute_resids_trait(
pheno,
trait,
covariates_string,
seed = NULL,
outcome_type = "continuous"
)
pheno |
A data.frame of phenotypes/variables |
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 |
seed |
Random seed |
outcome_type |
continuous and binary, default is continuous |
Vector of trait values after residual permuted
data(phenotype)
trait<-"Trait.1"; covars="Age+Sex"
permute_resids_trait(pheno=phenotype, trait=trait,
covariates_string=covars,
seed = NULL, outcome_type="continuous")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.