Description Usage Arguments Details Value
View source: R/density_estimation.R
Estimate the parameters of the null and alternative density functions using moderated t-statistics.
1 2 | estimate_densities_modT(betas, sds, df, alt_prop, mafs = NULL,
N = NULL)
|
betas |
vector of coefficient estimates. |
sds |
vector of standard errors (for coefficient estimates). |
df |
scalar or vector of first degrees of freedom of the F-distribution (usually, N-p-1). |
alt_prop |
proportion of test statistics from the alternative density. |
mafs |
vector of minor allele frequencies (MAFs) (optional).
If |
N |
scalar or vector of number of subjects (optional).
Should be specified if |
Following Smyth (2004), the function calculates moderated t-statistics using conditional posterior means of the variance. The moderated t-statistics are used to estimate the null density under a t-distribution and the alternative density under a scaled t-distribution, each with moderated degrees of freedom.
A list with the following elements:
Tstat_mod | matrix of moderated t-statistics. |
df_mod | vector of the moderated degrees of freedom. |
scaler | vector of the scaling factors for the moderated t-statistics under the alternative. |
prior_df | scalar of the prior degrees of freedom. |
prior_var | scalar of the prior variance estimator. |
unscaled_var | scalar of the unscaled variance prior on non-zero coefficients. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.