Package 'corrmeta'

Title: Correlated Meta-Analysis (corrmeta)
Description: Performs Correlated Meta-Analysis (corrmeta) across multiple OMIC scans, accounting for hidden non-independencies between elements of the scans due to overlapping samples, related samples, or other information.
Authors: Woo Seok Jung <[email protected]>, Michael Province <[email protected]>
Maintainer: Woo Seok Jung <[email protected]>
License: MIT + file LICENSE
Version: 1.0.0
Built: 2024-10-06 03:02:59 UTC
Source: https://github.com/wsjung/corrmeta

Help Index


Calculate Fisher's method p-value and meta-analysis statistics

Description

Calculate Fisher's method p-value and meta-analysis statistics

Usage

fishp(df, vars, df_sigma, sum_sigma)

Arguments

df

data frame with "markname" and study names as column names.

vars

character vector of study names to include in the meta-analysis.

df_sigma

data frame of tetrachoric correlations.

sum_sigma

sum of tetrachoric correlations.

Value

A data frame with columns 'markname', 'sum_chisq', 'sum_z', 'sum_sigma_var', 'pvalue', 'meta_z', 'meta_p', 'meta_nlog10p'

Examples

data(snp_example)
  head(snp_example)
  varlist <- c("trt1","trt2","trt3")
  tc <- tetracorr(snp_example, varlist)
  fishp(snp_example, varlist, tc$sigma, tc$sum_sigma)

Generates a list of random p-values with mixed significant and nonsignificant values

Description

Generates a list of random p-values with mixed significant and nonsignificant values

Usage

generate_random_p_values(n, ratio_significant)

Arguments

n

number of samples

ratio_significant

fraction of p-values to be significant


Calculate Polychoric Correlations

Description

This function calculates the polychoric correlations between pairs of variables in a given data frame. It returns a data frame with the row and column names of the variables, the polychoric correlation coefficient, and its standard error.

Usage

polycorr(data, varlist)

Arguments

data

data frame with "markname" and study names as column names.

varlist

character vector of study names to include in the meta-analysis.

Value

data frame with polychoric correlation coefficients and standard errors

Author(s)

Woo Jung

See Also

polychor

Examples

data(snp_example)
  varlist <- c("trt1","trt2","trt3")
  polycorr(snp_example, varlist)

Convert P-values to Z-scores

Description

This function takes a data frame of p-values and converts them to Z-scores using the quantile function for the standard normal distribution.

Usage

pvalues_to_zscores(df_pvalues)

Arguments

df_pvalues

data frame containing p-values

Value

data frame containing Z-scores

Author(s)

Woo Jung

See Also

qnorm

Examples

data(snp_example)
  head(snp_example)
  pvalues_to_zscores(snp_example)

Example SNP summary dataset

Description

This data set provides 3 simulated 19-sample SNP-trait association p-values

Usage

snp_example

Format

A dataframe containing 19 observations across 3 SNP scans


Example SNP summary dataset with missing values

Description

This data set provides 3 simulated 19-sample SNP-trait association p-values where some samples are removed to reflect missing values.

Usage

snp_example_missing

Format

A dataframe containing 19 observations across 3 SNP scans


Calculate Tetrachoric Correlations

Description

This function calculates the tetrachoric correlations between pairs of variables in a given data frame. It returns a list containing a data frame with the tetrachoric correlation coefficients, and the sum of the tetrachoric correlations if the input variable was in p-value form.

Usage

tetracorr(data, varlist)

Arguments

data

data frame with "markname" and study names as column names.

varlist

character vector of study names to include in the meta-analysis.

Value

list containing a data frame with tetrachoric correlation coefficients, and the sum of the tetrachoric correlations if the input variable was in p-value form.

Author(s)

Woo Jung

See Also

polychor

Examples

data(snp_example)
  head(snp_example)
  varlist <- c("trt1","trt2","trt3")
  tetracorr(snp_example, varlist)