scieee AI-readable full text Open interactive document viewer

Population Power Curves in ASCA With Permutation Testing

Camacho Páez, José,Sorochan Armstrong, Michael

Abstract

Agencia Estatal de Investigación in Spain, MCIN/AEI/10.13039/501100011033, grant no. PID2020-113462RB-I00

Full text

Journal of Chemometrics, 2024; 0:e3596 https://doi.org/10.1002/cem.3596 1 of 14 Journal of Chemometrics RESEARCH ARTICLE OPEN ACCESS Population Power Curves in ASCA With Permutation Testing JoséCamacho | MichaelSorochanArmstrong Research Centre for Information and Communication Technologies (CITICUGR), University of Granada, Granada, Spain Correspondence: José Camacho ([email protected]) Received: 27 February 2024 | Revised: 24 July 2024 | Accepted: 26 July 2024 Funding: This work was supported by the Agencia Estatal de Investigación in Spain, MCIN/AEI/10.13039/501100011033, grant no. PID2020- 113462RB- I00. Michael Sorochan Armstrong has received funding from the European Union's Horizon Europe research and innovation programme under the Marie Skłodowska- Curie grant agreement no. 101106986. Funding for open access charge: Universidad de Granada/CBUA. Keywords: ANOVA simultaneous component analysis | effect size | multivariate ANOVA | power curves | sample size ABSTRACT In this paper, we revisit the power curves in ANOVA simultaneous component analysis (ASCA) based on permutation testing and introduce the population curves derived from population parameters describing the relative effect among factors and interactions. The relative effect has important practical implications: The statistical power of a given factor depends on the design of other factors in the experiment and not only of the sample size. Thus, understanding the relative power in a specific experimental design can be extremely useful to maximize our capability of success when planning the experiment. In the paper, we derive relative and absolute population curves, where the former represent statistical power in terms of the normalized effect size between structure and noise, and the latter in terms of the sample size. Both types of population curves allow us to make decisions regarding the number and nature (fixed/random) of factors, their relationships (crossed/nested), and the number of levels and replicates, among others, in an multivariate experimental design (e.g., an omics study) during the planning phase of the experiment. We illustrate both types of curves through simulation. 1 | Introduction Prof. Smilde's research group proposed the ANOVA simultaneous component analysis (ASCA) [1], a powerful framework for analyzing the individual influence of different experimental factors and their interactions in experimental designs with a high number of responses. ASCA represents a natural multivariate extension of the analysis of variance (ANOVA). The theory associated to ANOVA is extensive [2], and several of its developments have been incrementally incorporated into the ASCA framework throughout the years [3–5]. Still, ASCA can be considered a developing technique, and many unresolved questions remain regarding best practices [6, 7]. One such questions is how to derive a power analysis in the context of ASCA. Statistical power is a relevant concept in inferential statistics. The power of a test measures the probability that it correctly rejects the null hypothesis ( H0 ) when the alternative hypothesis ( H1 ) is true. The power can be defined as 1−𝛽 for 𝛽 the Type II error (false negative) probability. Power curves are a form of power analysis where power is represented in terms of the sample size, that is, the number of replicates or experimental runs under the same conditions. This is a recommended analysis prior to any multivariate experiment (e.g., a clinical study with omics responses) to determine the required number of subjects and experimental levels for a desired statistical power. In standard univariate ANOVA, or when relatively few responses are considered, it is possible to use analytical methods to derive power curves based on typical assumptions (such as normality) [8]. However, in the context of more than just a few responses, or to assess the violation of any possible statistical assumptions, This is an open access article under the terms of the Creative Commons Attribution-NonCommercial License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited and is not used for commercial purposes. © 2024 The Author(s). Journal of Chemometrics published by John Wiley & Sons Ltd. 2 of 14 Journal of Chemometrics, 2024 numerical methods [9] are a viable alternative. Arguably, the most popular approach for statistical inference in ASCA is permutation testing [9, 10]: a resampling method that transforms ASCA into a distributionfree approach that is more flexible than parametric ANOVA, where inference is based on analytical distributions. The derivation of power curves based on ASCA's permutation testing necessarily requires numerical approaches. In previous work [6], we introduced the simulated power curves in ASCA as a strategy to optimize an ASCA pipeline for a specific experimental design in terms of statistical power. Simulated power curves can be used to find the optimal ASCA model in terms of fixed/random factors, crossed/nested relationships, interactions, test statistic, transformations, and others. Our approach was defined to compare several models in terms of relative power, but it cannot be used to make sample size estimations for an entirely new multivariate experiment. In this paper, we revisit the simulated power curve approach to generalize it. In particular, we make the following contributions: • We generalize ASCA power curves so that any design can be simulated, including complex relationships among factors and their interactions. • We define the population curves, derived from population parameters (standard deviations) describing the relative effect among factors and interactions. • We propose two types of population curves: – Relative population curves (RPCs) represent statistical power in terms of the relative effect size between structure and noise. They are useful to optimize the ASCA pipeline for an analysis at hand. – Absolute population curves (APCs) represent statistical power in terms of the sample size. They are useful to plan ahead the number of replicates and/or levels to use in a designed study. • We illustrate the behavior of the two types of population curves through simulation. • We provide open software for the generation of population curves and for the replication of the results in this paper. RPCs and APCs can be computed with “powercurve” routine in the MEDA Toolbox stable release v1.4.† The rest of the paper is organized as follows: Section2 introduces the ASCA framework. Section3 discusses the concept of power curves from a theoretical perspective. Sections4 and 5 present the algorithms to compute RPCs and APCs, respectively. Section6 discusses simulation results, and Section7 draws the conclusions of the work. 2 | ANOVA Simultaneous Component Analysis ASCA, like ANOVA, is mostly concerned with the analysis of data coming from an experimental design. Following ANOVA, a common ASCA pipeline follows three steps: (1) factorization of the data according to the experimental design; (2) significance testing for factors and interactions; (3) visualization of significant factors' and interactions' effects using principal component analysis (PCA) to understand separability among levels. 2.1 | Factorization of the Data Let X be an N×M data matrix with N the number of experimental runs and M the number of responses in a designed experiment. Without loss of generality, we consider here the case of a design with two crossed factors A and B , their interaction, and an additional factor C(A) nested in A . This is a common configuration in multiple omics experiments [4, 5, 11], useful to correct for the (often large) individual variability ( C(A) ) and so increase the statistical power of the test. The data in X can be decomposed as where 1 is a vector of ones ( N×1 ), m ( M×1 ) denotes a vector containing the intercepts of the M measured variables, XA , XB and XC(A) represent the factor matrices, XAB is the interaction matrix, and E is the residual matrix, all of similar dimensions of X . To compute the factorization, we use the technique referred to as ASCA+ [3] to account for mild unbalancedness in the data. We intentionally avoid ASCA alternatives based on linear mixed models (LMM) [4, 5] due to the large increase of computational demand, prohibitive in the context of power curves. In ASCA+, the decomposition is derived as the least squares solution of a regression problem, where X is regressed onto a coding matrix D as and D is constructed using sum coding [3] or another alternative coding schemes [5] and Θ and E are obtained from The encoding of experimental factors in the design matrix is an especially important consideration, as it affects what information is passed through to variance explained by the model, versus residual variance—this in turn affects the apparent evidence for statistical significance. 2.2 | Statistical Significance Testing In this step, we test the statistical significance of factors and interactions in a similar way as performed in multiway ANOVA. A widely used approach for ASCA inference is permutation testing [9, 10]. Permutation testing can be performed by randomly shuffling the rows of X in Equation(3), yielding a new set of regression coefficients, and so a new factorization: Permutation tests are carried out by comparing a given statistic, computed after the ASCA factorization, with the corresponding statistic computed from hundreds or more permutations of the rows in the observational data, X . The p value is obtained as‡ (1) X =1m T +X A +X B +X C(A) +X AB + E (2) X=DΘ+E=1𝜽+DAΘA+DBΘB+DC(A)ΘC(A)+DABΘAB +E (3) Θ=(DTD)−1DX (4) E=X−DΘ (5) Θ∗=(DTD)−1DTX∗ (6) E∗=X∗−DΘ∗ (7) p = #{S∗ k≥ S;k = 1, … ,K} + 1 K+1 1099128x, 0, Downloaded from https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/10.1002/cem.3596 by Universidad De Granada, Wiley Online Library on [11/09/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License 3 of 14 where S refers to the statistic computed from the true factorization, S∗ k is the statistic corresponding to the k - th random permutation, #{cond} refers to the number of times condition cond is met, and K is the total number of permutations. See [6] for a recent review on the permutation approach and the relevance of the chosen statistic. The permutation approach in the rows of X allows to test all the factors and interactions at the same time. Alternatively, one may be interested in testing an individual factor/interaction, which can be done by permuting the corresponding coding rather than the data [6] or by orthogonalizing the data prior to permutation. Additional considerations may be taken into account for imbalanced designs [12]. 2.3 | Post Hoc Visualization Significance testing in ANOVA/ASCA reveals the statistical significance of factors' and interactions' effects, but not of the specific levels (or combination thereof). To identify significant differences across levels, post hoc tests are typically employed. The equivalent to a posthoc visualization in ASCA is the use of PCA following Zwanenburg etal. [13], where the PCA loadings are computed from the factor/interaction matrix, and score plots are built from the sum of this matrix and the residuals. Following this approach, score plots provide a visual comparison between the main/interaction effects and the natural variability in the residuals. Other approaches besides PCA can also be used [14]. ASCA is a supervised method, and as such, it can suffer of “overfitting” like any other regression and/or classification approaches [15]. ASCA relies in permutation testing to avoid overfitting. Thus, only statistically significant factors/interactions should be visualized post hoc with PCA. 3 | Power Curves Figure1 illustrates the concept of a power curve as a comparison between two distributions: the null distribution P(t|H0) and the alternative distribution P(t|H1) . In the figure, both distributions are assumed to be normal, but in a real situation, this may not be the case. The shaded areas represent the probability of error, associated with an observation incorrectly rejecting the null hypothesis through random chance (type I error), with probability 𝛼 (in blue), versus the probability of an observation incorrectly not rejecting the null hypothesis (type II error), with probability 𝛽 (in red). Larger effect sizes 𝜃 , manifesting as wider separations between both distributions, increase the statistical power 1−𝛽 (reducing the type II error) for a fixed value of 𝛼 . Alternatively, for both fixed 𝛼 and the effect size 𝜃 , increasing the sampling size reduces the variance of the distributions P(t|H0) and P(t|H1) , which leads to a reduction of overlapping areas as 1−𝛽 increases. 4 | RPCs for ASCA RPCs are derived from population parameters describing the standard deviation in factors and interactions and represent statistical power in terms of the relative effect size between structure and noise. To generate RPCs, we generalize the approach by Camacho etal. [6]. We simulate data that progressively increases the relative effect size 𝜃 and therefore the power (Figure1). In the following, we use model(1) to showcase the RPCs, since this model includes crossed relationships, interactions (between A and B ) and nested relationships (between A and C(A) ), so that almost any other model can be derived from it. We can also think of this model as an illustration of factors/interactions organized in different orders (Figure 2), as discussed by Anderson and Ter Braak [9] and in the Hasse diagrams by Marini etal. [16]. Our approach to generate RPCs follows these steps: 0. INPUT: – F the design matrix – H a model hierarchical structure (as illustrated by a Hassel diagram) with information about factors, crossed/nested relationships and their interactions. In this model structure, a factor f can have descendants (nested factors and associated interactions) and ancestors (factors in which f is nested). An interaction i can FIGURE 1 | Illustration of effect size ( f( 𝜃 ) ) versus the probability of a type- I error, 𝛼 , and the probability of a type II error, 𝛽 . Statistical power is defined as 1 − the false negative (type- II) error rate. FIGURE 2 | Ordering structure among factors and interaction in model(1). 1099128x, 0, Downloaded from https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/10.1002/cem.3596 by Universidad De Granada, Wiley Online Library on [11/09/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License 4 of 14 Journal of Chemometrics, 2024 also have descendants (other higherorder interactions) and ancestors (other lowerorder interactions or the factors included in the interaction). In model(1) and Figure2, A is ancestor of C(A) and A and B are ancestors of AB . – M the number of responses – kf for f∈{1. . . F} , ki for i∈{1. . . I} , and ke the coefficients with the standard deviation§ for factors and the interactions, and the residuals – R the number of repetitions to generate a statistically representative RPC – P the number of permutations (in each repetition) – 𝛿 incremental steps in the effect size – 𝛼 the imposed probability of falsely rejecting the null hypothesis (i.e., the significance level) 1. Set powerf(𝜃)=0 and poweri(𝜃)=0 for each factor f and interaction i , respectively, and for 𝜃 from 0 to 10𝛿 in 𝛿 steps; and N is set to the number of rows of F . 2. For each repetition from 1 to R 2.1. Generate random matrices to represent level/cell averages 2.1.1. For each factor f1 of order 1 in H , and so with no ancestors (e.g., A and B in model(1)), count the number of levels Lf1 in matrix F and simulate: where f1 is a pseudorandom number generator (PRNG), potentially based on the normal distribution or other distribution that may deviate moderately (e.g., uniform) or severely (e.g., exp3) from normality [9]. 2.1.2. For each factor f in H with ancestor factor(s) fa , for a=1. . . Af (e.g., C(A) nested on A in model(1)): with rf the number of replicates in each unique combination of levels (cell), and f the chosen PRNG. 2.1.3. For each interaction i in H with ancestor factor(s) fa for a=1…Ai (e.g., AB in model(1)): with i the chosen PRNG. 2.2. Generate background variability for a chosen PRNG: 2.3. Normalize each matrix Xf for each factor f , Xi for each interaction i , and XE so that the Frobenius norm equals the squared root of the number of rows.¶ 2.4. For each observation n from 1 to N : 2.4.1. For each factor f , we build Xf(N,M) from Xf (L f ,M ) and the design matrix F : with xn f the n th row of Xf(N,M) and xl f the l th row of Xf (L f ,M ) , with l determined according to matrix F . 2.4.2. For each interaction i , we build Xi(N,M) from Xi (L i ,M ) and the design matrix F : with xn i the n th row of Xi(N,M) and xl i the l th row of Xi(Li,M) , with l determined according to matrix F . 2.5. Compute the matrices with the structural and residual part with the standard deviation coefficients: 2.6. For 𝜃 from 0 to 10𝛿 in 𝛿 steps: 2.6.1. Yield the simulated data: 2.6.2. Compute ASCA+ partition and the F- ratio for factors and interactions for both the simulated data and P permutations. For (highorder) factors and interactions in H with no descendants: where SS refers to the sum- of- squares (the Frobenius norm) of a factor/interaction/residual matrix in the factorization with ASCA+, and DoFs represents the corresponding degrees of freedom [2]. The DoFs of a factor is the number of levels minus one, the DoFs of an interaction is the product of the DoFs of its factors, and the DoFs of the residuals is the total (number of observations minus 1 in the data) minus the DoFs of all factors and interactions in the model. The ratio between the SS and the DoF is often called the mean sum- of- squares ( MS ). For any factors and interactions in H with descendants: (8) Xf1 (L f1 ,M)∼ f1 (9) L f=rf⋅ A f ∏ a=1 Lf a (10) Xf (L f ,M)∼ f (11) Li= A i ∏ a=1 Li a (12) Xi(Li,M)∼  i (13) XE(N,M)∼E (14) xn f =x l f (15) xn i =x l i (16) X S= ∑ f kfXf+ ∑ i kiX i (17) XE=keXE (18) X=𝜃XS+XE (19) Ff=(SSf∕DoFf)∕(SSE∕DoFE) (20) Fi=(SSi∕DoFi)∕(SSE∕DoFE) (21) F f= (SS f ∕DoF f ) �∑ Df d=1SSfd+ ∑ Di d=1SSid � ∕ �∑ Df d=1DoFfd+ ∑ Di d=1DoFid � 1099128x, 0, Downloaded from https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/10.1002/cem.3596 by Universidad De Granada, Wiley Online Library on [11/09/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License 5 of 14 with descendant factor(s) fd for d=1. . . Df and descendant interaction(s) fi for d=1. . . Di . 2.6.3. For each factor f , if the associated p value computed using Equation(7) is below 𝛼 do: 2.6.4. For each factor i , if the associated p value computed using Equation(7) is below 𝛼 do: 3. Normalize powerf(𝜃)=powerf(𝜃)∕R and poweri(𝜃)= poweri( 𝜃 )∕R for each factor f /interaction i The algorithm works as follows. In step 0, we set the general characteristics of the data simulation. In step 1, the algorithm initializes the values in the RPC. In step 2, we iterate through a number of repetitions to compute the RPC. Each repetition consists on the simulation of a structural part (in XS ) and a residual part (in XE ). The inner loop builds the data for intermediate cases between the absence of effect ( X=XE ) and absence of residuals ( X=XS ), factorizes it with ASCA+ and performs the statistical inference through permutation testing. If the computed significance is below the imposed significance level, the power is increased by one. In step 3, the power is normalized by the number of repetitions. Some alternative configurations for a RPC that are relevant in practice can be straightforwardly implemented by modifying specific parameters or small parts of the algorithm: • Nonbalanced designs can be easily integrated in the design matrix F , see [6]. • By properly choosing E , we can emulate different distributions in the residuals to assess robustness to deviations from normality in the manner of Anderson and Ter Braak [9] but for multivariate responses. We can also generate the level averages using different distributions. • Both fixed and random factors can be simulated in the same manner. • We can integrate complex designs by adding multiple crossed and nested relationships as well as interactions. • We can generate RPCs for a specific factor or interaction in an experimental design, or for all of them. The algorithm provides the solution for a RPC that considers a simultaneous incremental effect in all factors and interactions of the model, but some factors may be deactivated by setting the corresponding standard deviation coefficient to 0. We can also maintain the effect of a significant factor/interaction fixed along the curve by adding its contribution directly in Equation(18), for example: • In a similar way, we can add a covariate Xcv(N,M)∼  cv directly in Equation(18), for example: • We can generate RPCs for alternative statistics to the F- ratio in Equations(19)–(22), see [6]. 5 | APCs for ASCA APCs differ to RPCs in that the power is shown in terms of the sampling size, rather than the relative effect size. APCs have the same applications as the RPCs, but with the additional advantage that they provide information about the number of replicates and/or factor levels that one may use in a multivariate experiment in order to attain a given probability of success, that is, the probability of rejecting the null hypothesis when the alternative hypothesis is true: the power 1−𝛽 . An APC is built by simulating data that progressively enlarges the number of levels in a specific factor or the whole experimental design. The consequence of this enlargement is a reduction of the variance of both the null and the alternative distributions (Figure1), with a subsequent increase of statistical power. For instance, if we take model(1), we can apply APCs to investigate how the statistical power of the factors and the interaction is affected when: • We iteratively enlarge the number of levels in A . Often A is a factor that controls the number of groups of individuals in a clinical study, for example, with a number of disease subtypes. This APC gives useful information about whether incorporating more or less subtypes can impact our probability of success. • We iteratively enlarge the number of levels in B . Often B is a factor with several repeated measures over the same individual, for example, in time or in biological samples. Then, the APC will allow us to investigate the effect of adding more time points/biological samples in our probability of success. • We iteratively enlarge the number of levels in C(A) . Often C(A) models the individual variability. The APC will give us an idea about the number of individuals per group we should choose for a certain probability of success. • We iterative enlarge the whole experiment. The APC will give us an idea about the general number of replicates we should choose for a certain probability of success. This is often a good alternative choice when a factor like C(A) is not in the design. Our approach to generate APCs follows these steps (the algorithm is summarized not to replicate detailed explanations of the RPC algorithm) 0. INPUT: – INPUTs in the RPC algorithm – 𝜃 the fixed effect size – frep the index of the factor that is replicated, or 0 if all the whole experiment is replicated – 𝛿 incremental steps in the sampling size 𝜂 (22) F i= (SS i ∕DoF i ) �∑ Di d=1SSid � ∕ �∑ Di d=1DoFid �� (23) powerf(𝜃)=powerf(𝜃)+1 (24) poweri(𝜃)=poweri(𝜃)+1 (25) X=𝜃XS+XE+kfXf (26) X=𝜃XS+XE+kcvXcv 1099128x, 0, Downloaded from https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/10.1002/cem.3596 by Universidad De Granada, Wiley Online Library on [11/09/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License 6 of 14 Journal of Chemometrics, 2024 1. Set powerf(𝜂)=0 and poweri(𝜂)=0 for each factor f and interaction i , respectively, and for 𝜂 from 1 to 10𝛿 in 𝛿 steps. 2. For each repetition from 1 to R 2.1. For 𝜎 from 1 to 10𝛿 in 𝛿 steps: 2.1.1 Create F𝜃 from F and frep ; and N is set to the number of rows of F . 2.1.2 Generate random matrices to represent level averages in factors and interactions. 2.2.3 Generate background variability for a chosen PRNG. 2.2.4 Normalize each matrix Xf for each factor f , Xi for each interaction i , and XE so that the Frobenius norm equals the squared root of the number of rows. 2.2.5 Compute final factor and interaction matrices of N rows. 2.2.6 Compute the matrices with the structural and residual part with the standard deviation coefficients. 2.2.7 Yield the simulated data. 2.2.8 Compute ASCA+ partition and the F- ratio for factors and interactions for both the simulated data and P permutations. 2.2.9 Update the power of factors and interactions. 3. Normalize powerf( 𝜂 )=powerf( 𝜂 )∕R and poweri( 𝜂 )= poweri( 𝜂 )∕R for each factor f /interaction i The algorithm works as follows: In step 0, we set the general characteristics of the data simulation, and in step 1, the algorithm initializes the values in the APC. In step 2, we iterate through a number of repetitions to compute the APC. Each repetition consists of an inner loop that progressively increases the sampling size by either increasing in one the number of levels of a given factor (for frep >0 ) or by adding one complete set of experimental runs. Subsequently, the same simulation approach as in an RPC is followed to generate the simulated matrix with both structural and residuals parts. This matrix is then factorized using ASCA+ and the statistical inference is performed through permutation testing. If the computed significance is below the imposed significance level, the power is increased in one. In step 3, the power is normalized by the number of repetitions. 6 | Simulation Examples 6.1 | RPCs Figure3 presents an example of the RPCs for model(1) and for a full factorial design with four levels in A , three levels in B and four individuals in each cell of C(A) . The RPCs are shown with 95% confidence intervals computed by bootstrapping. In the example, all standard deviation coefficients are fixed to 1/5 of the standard deviation in the residuals ( kA=kB=kC(A)=kAB =0. 2 and kE=1 ). The behavior of the RPCs is the one expected for a correct power curve [6]: (a) in the absence of effect (i.e., at 𝜃=0 ), all curves adjust to the significance level of 𝛼=0. 05 , and (b) at some given effect size, the curves start gaining power until they reach 1. FIGURE 3 | Example of relative population curve for model (1). The design matrix F contains a full factorial design with four levels in A , three levels in B , and four individuals in each cell of C(A) . Other inputs are M=400 , kA = kB = kC(A) = kAB = 0. 2 , and kE = 1 , R=1000 , P=200 , 𝛿=0. 1 , and 𝛼=0. 05 . We marked 𝜃=0. 5 as a reference for the following figures. FIGURE 4 | Theoretical expected F- ratio (A) and mean simulated F- ratio (B) in terms of the effect size for the RPC in Figure3. (A) (B) 1099128x, 0, Downloaded from https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/10.1002/cem.3596 by Universidad De Granada, Wiley Online Library on [11/09/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License 7 of 14 Interestingly, the order in which the curves in Figure3 start rising and finally reach 1, that is, the relative power of the curves for the different factors and the interaction, is not intuitive given the same standard deviation of 0.2 was used for all of them: A is the most statistically powerful factor, followed by B , and C(A) and AB are the least powerful. We found that the relative power is a complex function of the ordering structure among factors/interactions (as depicted in Figure2) and the number of levels thereof. The relative power has important practical implications, which are wellknown in the area of design of experiments but not so widely understood by some experimenters: the statistical power of a given factor depends on the design of other factors in the experiment. To give an example, our ability to determine biological differences between a disease and a control group (factor A ) depends on the number of individuals we include in the experiment (factor C(A) ), but also on the number of repeated measures we take for each of them (factor B and interaction AB ). Thus, understanding the relative power in a specific experimental design can be extremely useful to maximize our capability of success. Generally speaking, the relative power is complicated to derive mathematically, especially in the presence of complex and varying null distributions across multiple responses, missing data, and other practicalities. Thus, RPCs are an interesting computational alternative for such derivation which can be made as specific to the problem at hand as desired. While the mathematical derivation of multivariate power curves is often hopeless, we can still derive expected values for the variance in factors, interactions and residuals [2], and so of the F- ratios. Appendix A provides such derivation for the example considered in Figure3. Using Equations(A10)–(A13), we can plot the expected F- ratios for the set of values of 𝜃 , as illustrated in Figure4A and compare them to the averaged F- ratios obtained from the 1000 datasets simulated to compute the RPCs in Figure3. These averaged F- ratios are in Figure4B. We can see that the theoretical and numerical results match perfectly, which shows that our simulation approach accurately follows the ANOVA theory. We can also see that the F- ratios alone cannot explain the relative power observed in the RPCs of Figure 3: For instance, the F- ratio profiles of A and B are similar, while the relative power in the RPCs are not. The discrepancy between F- ratio and RPC profiles is caused by the different null distributions of factors and interactions. Actually, it is the complexity to mathematically derive these null distributions which makes our computational approach a suitable tool to compute power curves. We illustrate the null distributions of our example in Figure5, generated with permutation testing for the first of the 1000 simulated datasets in the RPC and for 𝜃=0. 5 . The null distribution of B is significantly wider than the others. Since the p value is obtained by comparing the F- ratio to the null distribution, and A and B show similar F- ratios at 𝜃=0. 5 (Figure4), the wider null distribution in B makes the power curve to rise slower than that in A in Figure3. This is because statistical power is associated to lower p values. The ASCA table for the same simulated dataset in Figure5 is shown in Table1. The F- ratios and the p values in the table are consistent with what we see in Figures4 and 3, respectively, for 𝜃=0. 5 : A and B present larger F- ratios that the others but still close to 1, A is statistically significant while the rest are not. Note that this selected dataset in Figure5 and Table1 is a single instance of the distribution that is averaged in Figures3 and 4, which is the reason why some discrepancy is expected (e.g., B is expected to be statistically significant 80% of times at 𝜃=0. 5 , according to Figure3, but it is not in this example). FIGURE 5 | Null distributions for the first simulated dataset in the RPC in Figure3 and for 𝜃 = 0. 5 . TABLE 1 | ASCA table for the first simulated dataset in the RPC of Figure3 and for 𝜃=0. 5 . SumSq PercSumSq df MeanSq F p value Mean 1.3861 2.7832 11.3861 A 3.4739 6.9757 31.158 1.1096 0.00999 B 2.184 4.3855 21.092 1.0613 0.14585 C(A) 12.6117 25.3243 12 1.051 1.0522 0.023976 AB 6.1738 12.397 61.029 1.0302 0.17582 Residuals 23.9712 48.1342 24 0.9988 Total 49.8006 100 48 1.0375 1099128x, 0, Downloaded from https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/10.1002/cem.3596 by Universidad De Granada, Wiley Online Library on [11/09/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License 8 of 14 Journal of Chemometrics, 2024 Figure6 presents several RPC examples similar to the first one, but where some of the factors or the interaction are deactivated with a null standard deviation. The figure shows that for any case where kB=0 , kC(A)=0 and/or kAB =0 , the corresponding RPC stays at expected type I error of 0.05. This behavior is not found for factor A (so that the RPC does not go to 0.05 even for FIGURE 6 | Examples of relative population curve for model(1). The design matrix F contains a full factorial design with four levels in A , three levels in B and four individuals in each cell of C(A) . Other inputs are M=400 , kE = 1 , R=1000 , P=200 , 𝛿=0. 1 and 𝛼=0. 05 . 1099128x, 0, Downloaded from https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/10.1002/cem.3596 by Universidad De Granada, Wiley Online Library on [11/09/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License 9 of 14 null effect in the factor) because its F- ratio is an approximate test rather than an exact one [2, 9].# These profiles in the RPCs can be explained from the theoretical derivation in Appendix A. Using this derivation, we included in Figure4 the evolution of the expectation for the F- ratio of A and B for a null effect of the corresponding factor, marked with the labels A=0 and B=0 , respectively. We can see that the approximate F- ratio in A does not cancel out for a null variance of the factor, which leads to the misleading RPC of A that shows an unrealistic power. This undesirable behavior in the test of factor A , and so in the corresponding power curve, remains even when the variance of C(A) or AB is also cancelled out (Figure6F,G, respectively), and the power curves only works as expected when both are cancelled or when either C(A) or AB is not considered in the model, so that the F- ratio of A corresponds to an exact test (Figure6H). The RPC is a very useful tool to identify these situations, that is, when an approximate test provides unrealistic statistical power or lack of thereof, allowing us to avoid false negatives in practice: See [6, 17] for an example. 6.2 | APCs Figure7 shows four examples of APCs computed from the same parameters as the RPC in Figure 3 and for 𝜃=0. 5 . The first example of APCs iteratively replicates the whole experiment (Figure7A) and the remaining examples iteratively increase the number of levels of each of the factors (Figure7B–D for factors A , B and C(A) , respectively). For reference, we marked with a red dashed line the same baseline situations in all APCs and the original RPC in Figure3. Thus, the dashed line at 𝜃=0. 5 in Figure3 identifies the same simulation point as at 𝜂=1 in Figure7A, 𝜂=4 (for four levels in A ) in Figure7B, 𝜂=3 (for three levels in B ) in Figure7C, and 𝜂=4 (for four replicates in C(A) , rCA =4 ) in Figure7D. In general, we can see that increasing the replicates enhances the power in all factors and the interaction for all APCs. As discussed in Figure 1, this enhancement is motivated by a reduction in the variance of the null and the alternative distributions of the test. Let us discuss this for each of the four examples. In Figure7A, we duplicate the whole experiment, but all levels of the factors remain the same. This makes all variance coefficients in Equations(A2)–(A5), with the exception of the variance of the error, to be multiplied by a factor of 2 (and in general of 𝜂 if the experiment is duplicated 𝜂 - wise). This makes the expected MSs, and in turn the expected F- ratios, larger. The null distribution of a single instance simulated with this duplication (Figure8A) remains similar to the original one with no duplication in Figure5. However, if we compare the ASCA tables of the case with and without duplication, TablesB1 and 1, respectively, we can see that after duplication all the factors and the interaction are statistically significant as a result of the larger F- ratios. This is correctly depicted by the APC in Figure7A, where power for 𝜂=2 is above 0.8 for all factors and the interaction (which means that in more than 80% of the simulated experiments we get statistically significant differences in the factors and the interaction). FIGURE 7 | Examples of absolute population curve for model(1). The original design matrix F contains a full factorial design with four levels in A , three levels in B , and four individuals in each cell of C(A) . Other inputs are M = 400 , kA = kB = kC(A) = kAB = 0. 2𝜃 for 𝜃 = 0. 5 and kE = 1 , R = 1000 , P=200 , and 𝛼=0. 05 . (A)(B) (C)(D) 1099128x, 0, Downloaded from https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/10.1002/cem.3596 by Universidad De Granada, Wiley Online Library on [11/09/2024]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License