binomial_sigma_G: Function for deriving the estimated standard deviation of the...

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Function for deriving the estimated standard deviation of the genetic variants from the first-order and second-order statistics, assuming these are binomially distributed.

Usage

1
binomial_sigma_G(SS, n = 2)

Arguments

SS

Numeric matrix of first-order and second-order statistics.

n

Integer number of alleles (trials) for the binomial genetic variables.

Value

Numeric vector containing the standard deviations of the genetic variants.

Examples

1
2
3
4
J <- 5 # number of instruments
par <- random_Gaussian_parameters(J)
dat <- generate_data_MASSIVE_model(N = 1000, n = 2, p = rep(0.3, J), par)
binomial_sigma_G(dat$SS)

igbucur/MASSIVE documentation built on Oct. 26, 2020, 1:26 a.m.