Learn R Programming

ashr (version 1.0.12)

calc_loglik: Compute loglikelihood for data from ash fit

Description

Return the log-likelihood of the data betahat, with standard errors betahatsd, for a given g() prior on beta, or an ash object containing that

Usage

calc_loglik(g, betahat, betahatsd, df, model = c("EE", "ET"), alpha = 0)

Arguments

g
the fitted g, or an ash object containing g
betahat
the data
betahatsd
the observed standard errors
df
appropriate degrees of freedom for (t) distribution of betahat/sebetahat
model
indicates whether you want the likelihood under the EE or ET model
alpha
a scalar performing transformation on betahat and sebetahat, such that the model is $\beta_j / s_j^alpha ~ g()$,and eqnbetahat_j / s_j^alpha ~ N(0,(sebetahat^(1-alpha))^2) or student t distribution. When $alpha=0$ we have the EE model, when $alpha=1$, we have the ET model. $alpha$ should be in between 0 and 1, inclusively. Default is alpha=0.

Details

See example in CompareBetahatvsZscoreAnalysis.rmd