Commit 911021e1 authored by hjulienne's avatar hjulienne
Browse files

testing stats_model

parent fa8b3139
import impute_jass.ld_matrix as LD
import impute_jass.stat_models as model
function for SNP imputation
import numpy as np
def ImpG_model(Zt, Sig_t, Sig_i_t):
Zt : (vector) the vector of known Z scores
np.fill_diagonal(Sig_t.values, 1.01)
Sig_t.fillna(0, inplace=True)
Sig_t_inv =np.linalg.inv(Sig_t)
Var = np.diag(Sig_t)[0] - np.einsum('ij,jk,ki->i', Sig_i_t, Sig_t_inv ,Sig_i_t.transpose())
mu =,, Zt))
return({"Var":Var, "mu":mu})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment