calc_f_stat: Calculate F-statistic

View source: R/mr.r

calc_f_statR Documentation

Calculate F-statistic

Description

Calculates portion of variance explained and F-statistic. If the data is lacking key information, i.e. allele frequencies, sample size or consists of only one SNP, then the approximate F-statistic will be used instead: F = b ** 2 / SE ** 2.

Usage

calc_f_stat(dat, f_cutoff = 10, force_approx = FALSE, verbose = TRUE)

Arguments

dat

Data.frame from do_mr()

f_cutoff

F-statistic cutoff (Optional)

force_approx

Force to use the approximate F-statistic instead (Optional, boolean)

verbose

Display verbose information (Optional, boolean)

Value

Modified 'dat' data.frame (if f_cutoff > 0 supplied)

See Also

[do_mr()]


jwr-git/mrpipeline documentation built on Oct. 2, 2022, 3:41 p.m.