Skip to content
Snippets Groups Projects
Commit 911021e1 authored by hjulienne's avatar hjulienne
Browse files

testing stats_model

parent fa8b3139
No related branches found
No related tags found
No related merge requests found
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):
"""
Argument:
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 = np.dot(Sig_i_t, np.dot(Sig_t_inv, Zt))
return({"Var":Var, "mu":mu})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment