squeezeVar               package:limma               R Documentation

_S_m_o_o_t_h _S_a_m_p_l_e _V_a_r_i_a_n_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Smooth a set of sample variances by computing empirical Bayes
     posterior means.

_U_s_a_g_e:

     squeezeVar(var, df)

_A_r_g_u_m_e_n_t_s:

     var: numeric vector of independent sample variances

      df: numeric vector of degrees of freedom for the sample variances

_D_e_t_a_i_l_s:

     The sample variances 'var' are assumed to follow scaled
     chi-squared distributions. An inverse chi-squared prior is assumed
     for the true variances. The scale and degrees of freedom for the
     prior distribution are estimated from the data.

     The effect of this function is to smooth or shrink the variances
     towards a common value. The smoothed variances have a smaller
     expected mean square error to the true variances than do the
     sample variances themselves.

     This function is called by 'eBayes', but beware a possible
     confusion with the output from that function. The values
     'var.prior' and var.post output by 'squeezeVar' correspond to the
     quantities 's2.prior' and 's2.post' output by 'eBayes', whereas
     'var.prior' output by 'eBayes' relates to a different parameter.

_V_a_l_u_e:

     A list with components 

var.post: numeric vector of posterior variances

var.prior: location of prior distribution

df.prior: degrees of freedom of prior distribution

_A_u_t_h_o_r(_s):

     Gordon Smyth

_R_e_f_e_r_e_n_c_e_s:

     Smyth, G. K. (2004). Linear models and empirical Bayes methods for
     assessing differential expression in microarray experiments.
     _Statistical Applications in Genetics and Molecular Biology_, *3*,
     No. 1, Article 3. <URL:
     http://www.bepress.com/sagmb/vol3/iss1/art3>

_E_x_a_m_p_l_e_s:

     s2 <- rchisq(20,df=5)/5
     squeezeVar(s2, df=5)

