Calculate matrix of error correlations using p-value threshold method.
R_pt.Rd
Calculate matrix of error correlations using p-value threshold method.
Usage
R_pt(
B_hat,
S_hat,
p_val_thresh = 0.05,
return_cor = TRUE,
make_well_conditioned = TRUE,
cond_num = 1e+05
)
Arguments
- B_hat
Matrix of effect size estimates
- S_hat
Matrix of standard errors
- p_val_thresh
P-value threshold
- return_cor
Return matrix as correlation matrix (apply cov2cor), recommended
- cond_num
Condition number if using make_well_conditioned
- max_well_conditioned
Project matrix to nearest well conditioned positive definite matrix using Matrix::nearPD