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)

