p_act: Generalized P-Act Function

View source: R/p_act.R

p_actR Documentation

Generalized P-Act Function

Description

P_act was designed for correction of GWAS analysis. Here, the code has been modified for the following generalized scenario: dpdt_var ~ ind_var + covariates Where: dpdt_vars is a set of correlated outcomes/traits; ind_vars is a set of potentially correlated exposures/metabolites/genes/etc..; and covariates is a set of covariates for the analysis. This function can not handle more than 1,000 corrections.

Usage

p_act(p_values, x_vars, y_vars = NA, covariates, alpha = 0.05)

Arguments

p_values

Data frame with 3 columns. File should contain one row for each test. Missingness is not allowed.

Column 1: dpdt_var names (outcomes)

Column 2: ind_var names

Column 3: The p-value from each test

x_vars

metabolite.txt/outcomes.txt: One column for each metabolite score. One row for each individual plus a header row of metabolite labels. Missing values must be coded as NA. Not necessary if only one marker is considered.

y_vars

traits.txt: Not necessary if only one trait is considered. One column for each trait. One row for each individual plus header row of trait names. If covariates are used, need trait values residualized on covariates. Missing values coded as NA. Must have same # of individuals as metabolite.txt.

covariates

Data frame with one column for each covariate, and one row for each individual. Column names should be the names of the covariates. Not necessary if no covariates used; Not necessary if only one independent variable is considered. Missing values are ok. Must have same # of individuals as @x_vars.

alpha

Used to determine when to stop sequential testing. If not specified, default value of .05 is used.

Value

a data frame containing 4 columns: y_vars, x_vars, original p values, and p-act corrected p values.


JAGoodrich/jag2 documentation built on May 16, 2024, 12:13 a.m.