snipar.pgs_am module

snipar.pgs_am.alpha_from_alpha(delta, se_delta, alpha, h2f, se_h2f, rk, return_all=True)[source]
snipar.pgs_am.alpha_from_beta(delta, se_delta, beta, h2f, se_h2f, rk, return_all=True)[source]
snipar.pgs_am.check_se_calc(n, delta, delta_se, alpha, alpha_se, h2f, h2f_se, rk, rk_se)[source]
snipar.pgs_am.delta_method(f, x, v_x)[source]

Delta method for estimating standard error of a function of a vector of parameters

Args:

f (_type_): function of vector of parameters x (_type_): vector of parameters v_x (_type_): variance-covariance matrix of parameters

Returns:

_type_: _description_

snipar.pgs_am.estimate_h2eq(delta, se_delta, h2f, se_h2f, rk, return_all=True)[source]
snipar.pgs_am.estimate_k(delta, se_delta, h2f, se_h2f, rk, bound=True)[source]

Estimate k, the fraction of random-mating heritability explained by PGI

Args:

delta (_type_): direct effect estimate se_delta (_type_): standard error of direct effect estimate h2f (_type_): family-based heritability estimate se_h2f (_type_): standard error of family-based heritability estimate rk (_type_): estimated correlation between parents for PGI

Returns:

_type_: _description_

snipar.pgs_am.estimate_r(delta, se_delta, h2f, se_h2f, rk, return_all=True, bound=True, allow_neg_r=False)[source]
snipar.pgs_am.estimate_rho(delta, se_delta, h2f, se_h2f, rk, return_all=True, bound=True)[source]
snipar.pgs_am.h2eq_se(delta, se_delta, h2f, se_h2f, rk, se_rk)[source]
snipar.pgs_am.k_se(delta, se_delta, h2f, se_h2f, rk, se_rk)[source]

Standard error of estimate of k, the fraction of random-mating heritability explained by PGI

Args:

delta (_type_): direct effect estimate se_delta (_type_): standard error of direct effect estimate h2f (_type_): family-based heritability estimate se_h2f (_type_): standard error of family-based heritability estimate rk (_type_): estimated correlation between parents for PGI

Returns:

_type_: _description_

snipar.pgs_am.r_se(delta, se_delta, h2f, se_h2f, rk, se_rk)[source]
snipar.pgs_am.rho_se(delta, se_delta, h2f, se_h2f, rk, se_rk)[source]
snipar.pgs_am.se_alpha_from_alpha(delta, se_delta, alpha, se_alpha, r_delta_alpha, h2f, se_h2f, rk, se_rk)[source]
snipar.pgs_am.se_alpha_from_beta(delta, se_delta, beta, se_beta, r_delta_beta, h2f, se_h2f, rk, se_rk)[source]
snipar.pgs_am.se_check(ests, se_ests)[source]
snipar.pgs_am.se_v_eta_delta(delta, se_delta, ab, se_ab, r_delta_ab, h2f, se_h2f, rk, se_rk, is_beta=False)[source]
snipar.pgs_am.simulate_ests(n, delta, alpha, beta, v_alpha_delta_beta, h2f, h2f_se, rk, rk_se)[source]
snipar.pgs_am.simulation_check(n, h2_eq, r_y, k, N_fam, h2f_se)[source]
snipar.pgs_am.v_eta_delta(delta, se_delta, h2f, se_h2f, rk, alpha=None, beta=None, return_all=True)[source]