get_r_from_pn: Calculate variance explained from p-values and sample size

View source: R/add_rsq.r

get_r_from_pnR Documentation

Calculate variance explained from p-values and sample size

Description

This method is an approximation, and may be numerically unstable. Ideally you should estimate r directly from independent replication samples. Use get_r_from_lor() for binary traits.

Usage

get_r_from_pn(p, n)

Arguments

p

Array of pvals

n

Array of sample sizes

Value

Vector of r values (all arbitrarily positive)


MRCIEU/TwoSampleMR documentation built on Sept. 28, 2024, 6:51 p.m.