Bayesian estimation of explained variance in ANOVA designs

We propose to use the squared multiple correlation coefficient as an effect size measure for experimental analysis‐of‐variance designs and to use Bayesian methods to estimate its posterior distribution. We provide the expressions for the squared multiple, semipartial, and partial correlation coefficients corresponding to four commonly used analysis‐of‐variance designs and illustrate our contribution with two worked examples.

Despite the continued interest in ES interval estimation, we have two concerns as to their development for the analysis of variance (ANOVA) model, which is arguably the most often applied statistical model across the empirical sciences. Our first concern is that ES measures for ANOVA models are often defined in a somewhat ad hoc manner and follow what Kelley and Preacher (2012, p. 139) call a definition-by-example approach, making it difficult to generalize the ES measures beyond the specific examples given. One case in point is the 2 measure for the two-way ANOVA (Hays, 1963, p. 406) and the subsequent difficulty of generalizing it to a partial 2 measure (Keren & Lewis, 1979). Similar issues have been reported for the commonly used 2 measure (Cohen, 1973;Kennedy, 1970;Levine & Hullet, 2002;Pierce, Block, & Aguinis, 2004). Thus, what is lacking is a general framework within which ES measures such as 2 and 2 can be derived.
Our second concern is that ES interval estimation for ANOVA models has been treated almost exclusively from a classical perspective. Despite their popularity, classical confidence intervals (CIs) are often misunderstood and misinterpreted (Hoekstra, Morey, Rouder, & Wagenmakers, 2014;Morey, Hoekstra, Rouder, Lee, & Wagenmakers, 2016). Furthermore, Morey et al. (2016) demonstrated that current CI procedures for 2 are particularly problematic, as they can produce empty intervals and involve post hoc manual truncation at the boundary of the parameter space. In contrast to the classical CIs, Bayesian credible intervals are more straightforward to interpret . In addition, credible intervals do not have the anomalies that beset some of the classical ES intervals for ANOVA designs. Despite their added value, however, Bayesian methods of ES estimation for ANOVA models have so far received little attention.
In light of these concerns, our goals are twofold. Our primary goal is to show that the theory on squared multiple correlations 2 -well established for linear regression models-also provides a unifying framework for ES measures in ANOVA designs. Several ES measures that are commonly reported in the ANOVA literature (e.g., 2 , 2 , partial 2 , and partial 2 ) will be shown to be special cases of 2 . Although the connection between ES measures such as 2 and 2 for the ANOVA model and the squared multiple correlations 2 for the linear regression model has been noted before (e.g., Keren & Lewis, 1979;Maxwell, Camp, & Arvey, 1981;Sechrest & Yeaton, 1982;Cohen, Cohen, West, & Aiken, 2003), little is known about the assumptions that underpin this relation. We will detail these assumptions and indicate the relation for several commonly used ANOVA designs, thereby providing a formal basis for the development of ES measures for the ANOVA model.
Our secondary goal is to estimate the squared multiple correlations using Bayesian methods. Although the issue of Bayesian estimation of multiple correlations has received considerable attention in the context of linear regression (see, for instance, Geisser, 1965;Press & Zellner, 1978;Tiwari, Chib, & Jammalamadaka, 1989;Gross, 2000), it has received almost no attention in the context of ANOVA models. One notable exception is the work of Gelman and Pardoe (2006), which focused on hierarchical extensions of the classical ANOVA model (see also Gelman, 2005). While the approach of Gelman and Pardoe (2006) was based on a sample definition of 2 (i.e., R 2 ), we instead derive the population expressions for 2 . The resulting expressions are found to be functions of the ANOVA model parameters, such that 2 can be estimated from the posterior distribution of the ANOVA model parameters.
Below, we first discuss the general background, followed by a more targeted treatment of four popular ANOVA designs. We end by presenting two worked examples.

GENERAL BACKGROUND
Let ( , x T ) T denote a (column) vector of variables with covariance matrix We will refer to variable y as a dependent variable and the (vector of) variable(s) x as the independent variable(s). Given the covariance matrix , we can express the relation between the dependent variable y and the independent variables x using the squared multiple correlation coefficient (Tate, 1966;Cohen, 1982;Mudholkar, 2014), as follows: provided that the covariance matrix = Var(x) is nonsingular and that Ψ = Var( y) > 0. The squared multiple correlation coefficient 2 is the maximum squared correlation that can be obtained between a single dependent variable y and any linear combination of the set of independent variables x (e.g., Anderson, 1958, p. 88).
Similar to most of the ES measures that have been proposed for the ANOVA model, the squared multiple correlation coefficient 2 , as defined in Equation (2), is a so-called proportional reduction in error (PRE) measure (Reynolds, 1977). In general, a PRE measure expresses the proportion of the variance in an outcome y that is attributed to the independent variables x. Here, we treat the assignment in a design  as a random variable, and we decompose the variance of the dependent variable as follows: Because the ANOVA model assumes homoscedasticity, the design affects only the conditional expectations (means) of the dependent variable y. In other words, Var(E( y | x)) is the variance that can be attributed to random assignment in the design, and E(Var( y | x)) is the residual variation that is constant across the cells in the design . As a result, we can reexpress Equation (3) as ) denotes the design (or assignment) variance and 2 E = E(Var( | x)) denotes the error variance. In this form, Equation (3) is used in the ANOVA literature to define PRE measures as ANOVA ES measures defined in this manner include 2 (Hays, 1963, p. 382), 2 (Hays, 1963, p. 547), and the intraclass correlation coefficient 2 I (Hays, 1963, p. 424). In case of an ANOVA design with a single fixed factor, both 2 and 2 specify or estimate 2  as the sum of squares that are attributed uniquely to the fixed factor and 2 E as the residual variance (see Analysis I). When the factor is random, 2  can be taken to be the variance of the random factor to define 2 I (see Analysis IV).
The definition of 2 in Equation (2) is of the same form as Equation (4)-note that 2 Y = Ψ and 2  = T −1 . In order to apply Equation (2) to ANOVA, we have to define the joint model p( y, x), with x encoding the ANOVA design, from which we can derive . To this aim, we first specify the ANOVA model as an ordinary linear regression model, utilizing dummy variables to encode the fixed effects (Jennings, 1967;Cohen, 1968). That is, for the fixed effects, we introduce indicator variables x i , with We then have that the ANOVA model is a conditional normal distribution p( y | x) that is of the same form as that used by Olkin and Tate (1961) to express correlations between discrete and continuous variables (see also Tate, 1954Tate, , 1966. To complete their model, Olkin and Tate (1961) specified a categorical (or multinomial) distribution for the indicator variables, that is, where i expresses the probability that a subject is assigned to a group i. With this multinomial distribution, we are able to cover many designs. In the derivation of 2 , Hays (1963) assumed that the probabilities i are uniform for every cell in the design, and expressions for 2 typically generalize this assumption to incorporate unbalanced designs. To foreshadow our later results, note that posterior inference on the parameters of the ANOVA model will be unaffected by a particular choice of model p(x) for the design/indicator variables whenever the design model p(x) does not depend on the parameters of the ANOVA model. Before we analyze four common ANOVA designs, we first define two correlation measures that are closely related to the squared multiple correlation: the semipartial correlation coefficient (also known as the part correlation coefficient) and the partial correlation coefficient. Suppose that we wish to express the contribution of some subset x A of the design variables is then defined as (Cohen, 1982, p. 308 where 2 x B is the squared multiple correlation coefficient between y and the (sub)set x B (i.e., the correlation obtained by removing any columns and rows in that correspond to the set x A ). The squared semipartial correlation 2 expresses the proportion of the variance in the outcome y that can be uniquely attributed to the subset x A . It is the population value of the R 2 -change statistic that is commonly used in multiple linear regression. Consequently, the squared partial correlation coefficient is defined as (Cohen, 1982, p. 308 where 1 − 2 x B denotes the proportion of variance in y that is not explained by x B . From this expression, we see that the squared semipartial correlation 2 expresses the proportion of the variance that can be attributed to the subset x A after the unique contribution of x B has been completely removed.

ANALYSIS I: AN ANOVA DESIGN WITH ONE FIXED FACTOR
Consider an ANOVA design with a single fixed factor consisting of n levels, that is, where x i is an indicator variable, with such that 0 + i is the expectation of y in group i, and it is assumed that the (residual) variance 2 is constant within each group. For completeness, we note here that the parameters in the conditional model p( y | x) are not identified due to the use of dummy variables for the conditions. To identify the model parameters, we impose the sum-to-zero constraint 1 + · · · + n = 0. Upon assuming the multinomial distribution in Equation (5) for the indicator variables, it is then easy to confirm that we obtain the matrix with the following elements: where we have used to denote the weighted average ∑ i i i . For the definition of the squared multiple correlation coefficient in Equation (2), we require the inverse of Without loss of generality, however, we can omit the contribution of one of the x i 's (c.f. Olkin & Tate, 1960). Let denote the matrix with the ith row and column removed, and let̃denote the vector with the i entry removed. In the Appendix, we omit the contribution of x n and show that Consequently, the expression for the squared multiple correlation coefficient is which is equation (3.12) from Olkin and Tate (1961). In Equation (9), we see that the multinomial probabilities weigh the individual contributions from each group. In a balanced design, we assume that the weights (probabilities) are the same for each group (i.e., i = n −1 ), and in that case, Equation (9) simplifies to This is the expression for 2 given by Hays (1963, p. 382). Furthermore, replacing the cell probabilities with observed cell proportions gives 2 . Gelman and Pardoe (2006) replace , that is, the posterior expectation of the sample variance of the category parameters i , which does not conform to an expression based on a multinomial distribution as the cell weights do not add to one. As a result, the factor contribution can be overestimated for designs with factors that have a small number of levels.

ANALYSIS II: AN ANOVA DESIGN WITH TWO FIXED FACTORS
In this section, we analyze an ANOVA design with two fixed factors. First, we consider a model with the two main effects but without the interaction, as this model is a direct extension of the single fixed factor discussed in the previous section. Second, we investigate the complete, full-factorial model that includes both the two main effects as well as the interaction.

Two main effects model
Consider an ANOVA model with two fixed factors consisting of n 1 and n 2 levels, respectively, and no interaction effects, that is, where 0 + 1i + 2j is the expectation of y in cell (i, j) of the n 1 × n 2 design matrix, and x f i are indicator variables, with and it is assumed that the (residual) variance 2 is constant across all cells. Upon assuming independent multinomial distributions for the indicator variables of each factor (i.e., assuming that the manipulated factors are orthogonal), we obtain the matrix with the following elements: where we have used f to denote the weighted average ∑ i i i . To compute the squared multiple correlation coefficient using (2), we require the inverse of where f is the covariance matrix of the indicator variables for factor f as defined in Equation (8).
Since is a block-diagonal matrix, we only require −1 1 and −1 2 to express −1 . Using the results from the Appendix, wherẽdenotes the matrix f with the final column and row removed, for f = 1, 2, we obtain which is similar to the single-fixed-factor case that we have analyzed earlier.
We will now consider the semipartial and partial correlation for the unique contribution of the first factor after the contribution of the second factor has been partialed out. From the definition in Equation (6), we readily find the semipartial correlation 2 x and we can confirm that 2 x = 2 . Similarly, we can find the partial correlation 2 which is identical to the expression for the multiple squared correlation in a single-fixed-factor design.

Full-factorial model
Next, consider the ANOVA model with both main effects and the interaction, that is, where 0 + 1i + 2 j + 3i j is the expectation of y in a cell (i, j) of the n 1 × n 2 design matrix, and x 3i j are indicator variables, with To identify the model, we again adopt the sum-to-zero constraint as follows: By assuming that the indicator variables encoding the main effects have independent multinomial distributions for each factor, we find that the indicator variables encoding the interaction effects also have a multinomial distribution, that is, where the latter provides shorthand notation that is useful later on.
With the two-main-effects-only model, we could use the results from the Appendix and omit a row and column in and for each of the main effects, that is, rows and columns that correspond to x 1n 1 and x 2n 2 , to express̃T̃− 1̃. This is not the case for the full-factorial design, however, since even after omitting the rows corresponding to x 1n 1 and x 2n 2 (and x 3n 3 ), the inversẽ− 1 does not exist. We can think of two possible solutions to this problem. The first is to remove the contributions of x 1n 1 and x 2n 2 altogether, that is, remove a single row and column from both 1 and First, we will study the model implied by only using the indicator variables encoding the interaction x 3 and ignore the {x 1 , x 2 } variables. That is, we will first use = Var(x 3 ) and = Cov(x 3 , y) for . Second, we will ignore x 3 and study the contribution of the main effects using = Var({x 1 , x 2 }) and = Cov({x 1 , x 2 }, y) for . Here, we can isolate the unique contribution of the main effects. By combining the two approaches, we can subsequently isolate the unique contributions of main effects and interaction and express these contributions in the form of semipartial and partial correlations. Thus, the solution comprises several steps that will be detailed below.
In the first step, we consider the use of x 3 encoding the interaction and ignore the {x 1 , x 2 } variables. It is easy to confirm that for this situation, has the elements where we have used the shorthand notation from Equation (10), that is, i j to denote 1i + 2 j + 3i j , to denote 1 + 2 + 3 , and 3 to denote the weighted average Since is the covariance matrix of a single multinomial random variable, we have that (e.g., omitting x n as in Thus, the squared multiple correlation coefficient can be expressed as which, however, does not partition into separate terms for the main effects and the interaction when the cell probabilities i j are not uniform. When the cell probabilities are uniform, that is, which does partition into separate terms for the main effects and the interaction. However, that the total sum of squares partitions in this manner is insufficient to partial out an effect. We therefore now turn to the model implied by {x 1 , x 2 }.
In the second step, we consider the covariance matrix that is implied by ignoring the indicator variables encoding the interaction and only consider the indicator variables for the main effects, that is, {x 1 , x 2 }. It is easy to confirm that, for this situation, the covariance matrix has the elements where the covariance matrix is identical to the covariance matrix for the two main effects analysis that we considered before. As a result, we find the squared multiple correlation coefficient, as follows: which does not simplify further in the case of nonuniform cell probabilities . Assuming uniform cell probabilities, that is, 1i = n −1 1 and 2 = n −1 2 , we observe that this expression of the squared multiple correlation simplifies to n 1 ×n 2 , from which one can also recognize a semipartial correlation, as the contribution of the interaction effect has been removed from the numerator but not from the denominator.
We can now consider the semipartial and partial correlations that express the contribution of the first main effect. Since we have seen that 2 As a result, we find the following expression for the squared semipartial correlation for the first main effect: Note that when the cell probabilities are assumed to be uniform, this expression simplifies to 2 From here, we can find the squared partial correlation as 2 which is again simply the expression for the multiple squared correlation in a single-fixed-factor design.
We have shown how to express the semipartial and partial correlation (ES) measures that correspond to an ANOVA design with two fixed factors. In particular, we have seen simple expressions for the case with uniform cell probabilities, since, in that case, the total sum of squares 2  decomposes into distinct terms for the main effects and the interaction (c.f. Equation (11)), that is, 2  = 2 A + 2 B + 2 A×B , with the terms denoting the contribution of the main effect from a factor A, factor B, and the interaction between A and B, respectively. As a result, we see that the semipartial correlation 2 x 1 |{x 2 , x 3 } expresses the unique contribution of the first factor, that is, For a long time, this expression was proposed as a "partial-2 "/"partial-2 " in the extension of 2 and 2 measures for single-factor designs (Kerlinger, 1964;Kennedy, 1970) and consequently used by statistical software packages such as SPSS (Levine & Hullet, 2002;Pierce et al., 2004). Others suggested a different expression (e.g., Cohen, 1968Cohen, , 1973Keren & Lewis, 1979), that is, since it "can be shown that in the same way 2 is a squared multiple correlation (12) is a squared partial correlation, with the artificial predictor variables designating B and the AB interaction partialled out" (Keren & Lewis, 1979, p. 123). However, this is true only for the particular case of uniform cell probabilities (e.g., 2 ), since, for the nonuniform case (e.g., 2 ), the partial correlation is found to be ∑ i 1i and it is clear that we cannot completely partial out the interaction. That is, the (semi)partial measures do not express unique contributions in the nonuniform case.

ANALYSIS III: AN ANOVA DESIGN WITH ONE FIXED FACTOR AND ONE COVARIATE
Consider an ANOVA design with a single fixed factor consisting of n levels and a (set of m) covariate(s), that is, where 0 + 1i + ∑ m =1 2 x 2 is the expectation of y for a subject in group i with covariate (vector) x 2 . As before, we assume that the indicator variables are multinomial random variables and that the distribution of the indicator variables is independent of that of the covariates, that is, p(x 1 , x 2 ) = p(x 1 )p(x 2 ). For the specification of the covariance matrix, we have to specify the covariance matrix 2 = Var(x 2 ), which depends on the choice of p(x 2 ). The work of Olkin and Tate (1961) focused on the case where p(x 2 ) is a multivariate normal that depends on x 1 .
We consider here the case of a single covariate, which allows us to provide an analytic expression for the squared correlation coefficient in the general case requiring only that we are able to specify Var(x 2 ), since it is easy to confirm that the covariance matrix has the elements If one is willing to assume that the distribution of the covariate is normal with mean and variance 2 , for instance, then we may replace Var(x 2 ) with 2 . Similarly, one could use the observed variance. By assuming that the indicator variables and the covariate(s) are independent, we observe that the covariance matrix is (block-)diagonal, such that we can apply the results from the Appendix to obtain From here, it is simple to find the semipartial correlation for the covariate as and, similarly, the partial correlation as When more than one covariate is used, it is clear that the expressions above depend on the covariance structure 2 . This is illustrated in the next analysis, where we consider a bivariate normal distribution for the random effects, which is one specific generalization of the results that we obtained here.

ANALYSIS IV: AN ANOVA DESIGN WITH ONE FIXED AND TWO CORRELATED RANDOM FACTORS
Consider an ANOVA design with a single fixed factor of n levels and a (set of m) random effect(s), that is, x 2 is the mean (expected) value of y for a subject in group i with random effect (values) x 2 . In typical applications, it is assumed that the random effects have a (multivariate) normal distribution with a zero-mean vector (for identification) and covariance matrix . We consider here the situation for two random effects.
We assume that the distribution of the indicator variables for the manipulated factor (x 1 ) is a multinomial distribution (independent from the random effects) and that the distribution of the random effects is (bivariate) normal, with covariance matrix where denotes the correlation between the two random effects. It is easy to confirm that the covariance matrix has the elements As before, we have assumed that the manipulated factors are independent of other variables, so that the covariance matrix is block-diagonal. Applying the results from the Appendix to 1 and from observing that we find the squared correlation coefficient as follows: which explicitly uses the covariance between the random effects.
We can now consider semipartial and partial correlations for the first random effect. The semipartial correlation (i.e., removing the contribution of the fixed factor and the second random effect) describing the contribution of the first random effect is equal to 2 x 21 |{x 1 , , which was to be expected, as (1 − 2 ) 2 1 is the variance of x 21 after conditioning on x 22 . That is, the partial correlation coefficient 2 is the intraclass correlation coefficient (Hays, 1963, p. 424).

BAYESIAN INFERENCE ON 2
The correlation coefficients discussed in this paper are functions of the parameters from the correlation model where p( y | x, , ) denotes the ANOVA model that depends on cell means and the residual variance 2 , and p(x | ) is the distribution that we assume for the design variables and depends on the parameter vector (e.g., cell probabilities and the population parameters of any random effects or covariates). By assigning prior probabilities p( , ) and p( ) independently to the parameters { , } and , we observe that conditional upon the observed data X and Y, the parameters { , } and are conditionally independent, that is, This factorization confirms that posterior inference on { , } is unaffected by a specific choice of model p(x| ).
Posterior inference on the correlation coefficients proceeds by simulation: Generate * and * as a sample from p( , | X, Y) and * as a sample from p( | X). Given a simulated draw for each parameter of the joint model, that is, * , * , and * , we can compute the correlation measure of interest. Repeating this procedure many times produces samples from the posterior of the correlation coefficient that we may use to produce Monte Carlo estimates of quantities of interest, such as posterior medians, means, credible intervals, etc. When the prior distributions p( , ) and p( ) are proper probability distributions, one can evaluate the prior distribution on the correlation measure in a similar way: Generate * , * , and * from the prior distributions and use these values to compute the correlation measure as a sample from the prior.
Further elaboration of the design model and its parameter offers an interesting avenue for further study, for instance, in the case of targeted, unbalanced, or multistage experiments. However, in regular experimental analyses, we are usually not interested in (except perhaps in the case of random effects), and we can simply use the observed values (i.e., cell proportions, means, and covariances of the covariates). We therefore only require draws from the posterior distributions of the ANOVA model parameters { , }. Procedures to sample from these posterior distributions are described in many publications (see, for instance, Gelman et al., 2014;Gelman, 2005) and oftentimes use Markov chain Monte Carlo methods. A convenient tool is the BayesFactor package that is available for GNU-R and works for many of the commonly used ANOVA designs (Morey & Rouder, 2015).

Example I: Incorporating prior information in a single-fixed-factor design
To illustrate the use of our approach to 2 x , we consider data from an experiment performed by Gibson, Losee, and Vitiello (2014), which was part of a special issue "Replications of important results in social psychology" (Nosek & Lakens, 2013. In this experiment, Gibson et al. (2014) attempted to replicate the results of Shih, Pittinsky, and Ambady (1999) on stereotype susceptibility. Shih et al. (1999) had investigated the performance of Asian American women on a math test after the women had been surreptitiously attented to either their Asian identity (i.e., high maths ability stereotype), or their female identity (i.e., low maths ability stereotype), or have not been primed as such (control condition). The original results of Shih et al. (1999) suggested a relation between stereotype priming and maths performance: Subjects in the Asian identity condition outperformed subjects in the female identity and control conditions, and subjects in the control group outperformed subjects in the female identity condition.
In their replication attempt, Gibson et al. (2014) collected N = 158 participants: 52 in the Asian identity condition, 54 in the female identity condition, and 52 in the control condition. (The data for this example are available at https://osf.io/vnaqq/.) We analyzed the Gibson data as a single-fixed-factor design using a setup similar to that of Rouder, Morey, Speckman, and Province (2012), using noninformative Jeffreys priors on 0 and 2 and g-priors for 1 , 2 , and 3 with the restriction that ∑ i i = 0, where we use 1 , 2 , and 3 to refer to the departure of the overall mean for the Asian identity, female identity, and control conditions, respectively. For the squared correlation coefficient, we have used expression (9) and simply replaced the cell probabilities with the observed proportions.
In Table 1, we summarize the posterior distributions of the model parameters and the squared multiple correlation coefficient in terms of the posterior means, standard deviations, and the 2.5%, 50%, and 97.5% quantiles. Note that there is little variability in the mean departures between the three groups, indicating that the effect of the manipulation is small. This can also be observed from the posterior median of 2 indicating that less than 2% of the total variance is attributed to the variability between conditions, with a small margin of uncertainty as indicated by the narrow 95% central credible interval that ranges from .001 to .062.  Note. SD = standard deviation.
Note that Gibson et al. (2014) had available prior information from the original experiment of Shih et al. (1999). In particular, the original results suggested that the Asian identity group outperformed both the female identity and control groups and that the control group outperformed the female identity group. This information is easily incorporated into the prior distribution of the model parameters using the order constraint 2 < 3 < 1 . It should be clear that when the prior constraint aligns with the observed data, we obtain an estimate of 2 that is at least as high as the estimate of 2 obtained without including prior constraints, but we would obtain a lower estimate when the prior constraint does not align with the observed data.
In Table 2, we show the posterior means, standard deviations, and the 2.5%, 50%, and 97.5% quantiles for the parameters and the multiple correlation using the prior constraint 2 < 3 < 1 . From Table 2, we see that including the prior constraint increased the variability of the group mean discrepancies, whereas the error variability 2 remained the same. That is, 2 increased. This was to be expected since the posterior results in Table 1 aligned with the hypothesis.
An advantage of a Bayesian approach to interval estimation, as opposed to a classical approach, is that the intervals and related statistics are derived from the posterior distribution. In Figure 1, we show histograms of 100,000 posterior samples for 2 , with the top panel showing the posterior distribution of 2 without the prior constraint and the bottom panel showing the posterior distribution with the prior constraint. Since the posterior is a probability distribution, we can ask questions such as: "What is the (posterior) probability that 2 > 0.05?" From Figure 1, it should be obvious that this probability is smaller for the estimated posterior distribution shown in the top panel than in the estimated posterior distribution in the bottom panel. To wit, the probability that 2 > .05 equaled approximately 5% for the estimated posterior distribution in the top panel and approximately 12% for the one shown in the bottom panel. Observe that with the improper Jeffreys prior on 2 , the prior distribution on 2 x is also improper. In fact, it will have all its mass placed at zero. This would mean that, in this case, the prior probability that 2 x > 0.05 is zero.

Example II: An illustration of 2 -change in a repeated-measures design
To illustrate the use of the semipartial correlation coefficient as 2 -change (Cohen, 1982), we consider data from Žeželj and Jokić (2014), which was also part of the Social Psychology special issue. (The data for this example are available at https://osf.io/z5te6/.) Žeželj and Jokić (2014) aimed at an exact replication of the results from Eyal, Liberman, and Trope (2008) that "people would judge immoral acts more harshly if presented to them as temporally distant rather than presented as temporally close" (Žeželj & Jokić, 2014, p. 225). The following experiment was conducted: Subjects were presented with three stories on morally offensive behaviors (eating one's dead pet, sexual intercourse with sibling, and dusting with the national flag) and were asked to imagine that the story would either happen the next day (near future) or the next year (distant future), after which participants were asked to judge the wrongness of these actions. Žeželj and Jokić (2014) collected data from N = 116 students, which were analyzed using a mixed-ANOVA design with temporal distance and moral vignettes as between-subject factors, that is, a 2 × 3 repeated-measures design. We analyzed the data using the BayesFactor package (Morey & Rouder, 2015), using the main effects of temporal distance (fixed factor 1) and the moral vignettes (fixed factor 2), and a random participant factor. Table 3 shows the posterior means, standard deviations, and the 2.5%, 50%, and 97.5% quantiles for the model parameters for this example. From Table 3, we see that there is little variability for the group mean deviations for the first factor-11 and 12 -but that there is nonnegligible variation in the mean deviations for the second factor-21 , 22 , and 23 -and the contribution of the effect-2 . We will study their contributions, in turn, using semipartial correlations. For this example, the squared semipartial correlations are defined as 2 where 2 is the variance of the random effect (i.e., subjects). The squared multiple correlation is defined as the sum of these three semipartial correlations, that is, From the posterior samples of the model parameters that we described in Table 3  In Table 4, we summarize the posterior distributions of the squared semipartial correlations in terms of the posterior means, standard deviations, and the 2.5%, 50%, and 97.5% quantiles. As can be seen from Table 4 and was argued above, the amount of variation that can be attributed to the first fixed factor is very small, but the variation that can be uniquely attributed to the second fixed factor and the random factor is nonnegligible, with the posterior medians indicating  x 3 ), that is, 2 x that approximately 0.1%, 37.4%, and 22.2% of the total variance can be uniquely attributed to the first, second, and random factors, respectively, totaling approximately 60% of the variance being explained. While the 95% credible intervals for the semipartial correlations of the second factor (moral vignettes) and the random participant factor covered more than 10% of the total range, indicating that we are still uncertain about their exact values, the credible interval of the first factor (temporal distance) covered less than 2% of the total range, indicating here that we are fairly certain that temporal distance does not explain much variance. The unique contributions of each of the three factors are visualized in Figure 2 as a 2 -change, using 100,000 draws from the posterior distribution of each of the semipartial correlations. That is, in Figure 2, we show the amount of variance that is uniquely explained by the first fixed factor in the top panel, by the first and second fixed factors in the middle panel, and, finally, by the contribution for all three factors combined in the bottom panel.

DISCUSSION
In this paper, we have shown that the theory on squared multiple correlation coefficients provides a useful framework for deriving ES measures for the ANOVA model, and we have analyzed several aspects that are commonly encountered in experimental designs. This allowed us to detail some expressions for the correlation coefficients and consequently clarify its underlying assumptions. As a result, we have shown that squared correlation measures encompass many of the existing ES measures that are now used for ANOVA, such as 2 and 2 , which are found to be special cases of the multiple correlation coefficient. Once the correlation expression is obtained, we note that it is easily evaluated using available software when the parameters of the design model are assumed fixed. In this manner, posterior interval estimates are simple to compute, which we have illustrated using two real-data examples. Furthermore, we have shown in our examples how prior information can be included in the evaluation of the correlation coefficient and illustrated a Bayesian 2 -change for the ANOVA model.
The analysis of the two-way ANOVA design was complicated by the functional relation between the indicator variables for the main effects and the indicator variables encoding the interaction. We have solved this complication by combining two different approaches: one in which we only use the indicator variables encoding the interactions and one in which we only use the indicator variables that correspond to the main effects. In this manner, we were able to partial out the (unique) contribution of the main effects and the interaction in the particular case of uniform cell probabilities. Although not explicitly considered here, we believe that this approach will extend to situations involving more factors and interaction effects and to situations involving higher-order interactions.