In Excel Application, SmartstatXL serves as an Add-In that facilitates the process of experimental data analysis. One of its standout features is its capability to analyze variance in one-factor Latin Square Design (LSD). Although its primary focus is on balanced designs (Balanced Design), SmartstatXL is not limited to standard designs alone. This Add-In also supports data analysis using various mixed models.
The following are specific features available for one-factor LSD experiments in SmartstatXL:
- LSD: Handles one-factor LSD experiments where each observational unit is measured only once.
- LSD: Sub-Sampling: Designed for repeated measurements, with the ability to draw sub-samples from the same observational unit. For instance, in one observational unit (treatment 3Dok1, repetition 1), there are 10 plants measured.
- LSD: Repeated Measure: For observations made periodically on the same observational unit, such as every 14 days.
- LSD: Multi Location/Season/Year: An appropriate choice for experiments conducted at different locations, seasons, or years.
When treatments show a significant effect, a comparison between the average values of the treatments can be performed using post hoc tests (Post Hoc). In SmartstatXL, you can choose among various post hoc tests such as: Tukey, Duncan, LSD, Bonferroni, Sidak, Scheffe, REGWQ, Scott-Knott, and Dunnet.
Case Example
An experiment has been conducted to determine the impact of gasoline mixing on fuel economy through mileage (km/liter). Due to the limited number of cars available, it was decided to use LSD, extending the duration of the experiment. There are five different car brands: P, M, N, S, and T. The treatments tested amount to 5 types, namely A, B, C, D, and E.
Day (Time) | Car Brand | |||||||||
P | M | N | S | T | ||||||
1 | B | 14 | A | 10 | AND | 11 | C | 12 | D | 10 |
2 | C | 10 | D | 10 | B | 11 | A | 8 | AND | 12 |
3 | AND | 14 | B | 12 | C | 13 | D | 11 | A | 9 |
4 | A | 11 | C | 11 | D | 10 | AND | 10 | B | 13 |
5 | D | 13 | AND | 12 | A | 9 | B | 10 | C | 13 |
Cited from:
Gaspersz, Vincent. 1991. Experimental Design Methods: For Agricultural Sciences, Engineering, and Biology. Bandung: Armico, 1991. p. 42.
Steps for Latin Square Design (LSD) Analysis of Variance
- Ensure the worksheet (Sheet) you wish to analyze is active.
- Place the cursor on the Dataset. (For information on creating a Dataset, please refer to the 'Data Preparation' guide).
- If the active cell (Active Cell) is not on the dataset, SmartstatXL will automatically detect and determine the appropriate dataset.
- Activate the SmartstatXL Tab.
- Click the Menu One Factor > Latin Square Design (LSD).
- SmartstatXL will display a dialog box to ensure whether the Dataset is correct or not (usually, the cell address for the Dataset is automatically selected correctly).
- After confirming that the Dataset is correct, press the Next Button.
- A Anova – Single Factor LSD dialog box will appear next:
- There are three stages in this dialog. In the first stage, choose the Factor and at least one Response you want to analyze.
- When you choose a Factor, SmartstatXL will provide additional information about the number of levels and their names.
- The details of the Anova STAGE 1 dialog box can be seen in the following image:
- After confirming that the Dataset is correct, press the Next Button to proceed to Anova Stage-2 Dialog Box.
- A dialog box for the second stage will appear.
- Adjust the settings according to your research method. In this example, the Post Hoc test used is Duncan's Test.
- To set additional output and default values for subsequent output, press the "Advanced Options…" button.
- Here is the view of the Advanced Options Dialog Box:
- Once the settings are finalized, close the "Advanced Options" dialog box.
- Next, in the Anova Stage 2 dialog box, click the Next button.
- In the Anova Stage 3 dialog box, you will be asked to specify the average table, ID for each Factor, and the rounding of the average values. The details can be seen in the following image:
- As a final step, click "OK"
Analysis Results
Analysis Information
Interpretation and Discussion:
Based on the information presented, the experiment was conducted using the Latin Square Design (LSD) for a single factor. In this experimental design, there are three factors under consideration: Day (or time, represented as rows), Car Brand (represented as columns), and Treatment (type of fuel mixture). All factors have 5 different levels.
LSD is commonly used when there are two known sources of variability that you want to control. In this case, those two sources of variability are Day and Car Brand. Therefore, by using LSD, the variability caused by Day and Car Brand can be controlled, allowing for a more accurate analysis of the Treatment's effect on the response (i.e., mileage in km/liter).
Next, to compare the average differences between treatments, a Duncan Post hoc Test will be used. Duncan's test is one method used to determine which treatment groups significantly differ from the others after the analysis of variance.
With the above information, we can expect an analysis of variance table that will present the variability explained by each factor (Day, Car Brand, and Treatment) and their interaction (if any) on the response. Furthermore, from the Duncan test results, we will be able to identify which treatment results in significant fuel savings compared to the others.
Variance Analysis
Interpretation and Discussion:
The table above is an analysis of variance (ANOVA) table for the measured response, which is "DATA". This table provides statistical summaries of the variability explained by three sources: Day (Rows), Car Brand (Columns), and Treatment.
- Day (Rows) (H):
- The variability explained by the day (rows) has degrees of freedom (DF) of 4 and a total sum of squares (SS) of 7.3600.
- The mean square (MS) for the day is calculated by dividing SS by DF, yielding 1.8400.
- The F-value for the day is 1.308, with a P-value of 0.322. Because the P-value is greater than 0.05 and the F-value is smaller than F-0.05 (3.259), the day's (rows) effect on the response is not significantly different at the 5% significance level.
- Car Brand (Columns) (M):
- The variability explained by the car brand has a DF of 4 and an SS of 13.3600.
- The MS for the car brand is 3.3400.
- The F-value for the car brand is 2.374, with a P-value of 0.110. Because the P-value is greater than 0.05 and the F-value is smaller than F-0.05 (3.259), the car brand's effect on the response is not significantly different at the 5% significance level.
- Treatment (P):
- The variability explained by the treatment has a DF of 4 and an SS of 23.7600.
- The MS for the treatment is 5.9400.
- The F-value for the treatment is 4.223, with a P-value of 0.023. Because the P-value is smaller than 0.05 and the F-value is greater than F-0.05 (3.259), the treatment's effect on the response is significantly different at the 5% significance level.
- Error:
- The variability not explained by the above three sources is called error, with a DF of 12 and an SS of 16.8800.
- The MS for error is 1.4067.
- CV:
- The Coefficient of Variation (CV) is 10.63%, indicating the proportion of total variability explained by the model.
From the above variance analysis, it can be concluded that:
- Day (or time) and Car Brand do not have a significant influence on the response.
- Treatment (type of fuel mixture) has a significant effect on the response at the 5% significance level.
Therefore, based on the existing data, the type of fuel mixture is the main factor affecting mileage in km/liter, while the day and car brand do not have a significant influence.
Post hoc Test
Based on the analysis of variance, the treatment has a significant effect on the response. Subsequent mean differences between treatments are presented in tables and graphs. The table and graph display settings can be adjusted via Advanced Options (refer back to step 15 of the Analysis of Variance Steps).
Independent Effect of Car Brand
The table shows the average DATA for each Car Brand. Although there are differences in the average values between Car Brands, based on the analysis of variance, these differences are not statistically significant at the 0.05 level. Therefore, we cannot claim that one Car Brand is superior to another based on the data provided.
Independent Effect of Treatment
Interpretation and Discussion:
The table above shows the independent effect analysis of Treatment (P) on the response, namely "DATA" (mileage). This analysis aims to compare the average mileage among different Treatment types.
Critical Value:
- "Standard Error" for comparison between two Treatments (P) is 0.5304.
- The "Duncan 0.05" table shows the critical values for comparing averages between various Treatment combinations.
Table of Average Values (mileage):
- The "Treatment (P)" column shows the types of Treatments.
- The "Average ± CI" column shows the average mileage for each Treatment with the corresponding confidence interval (CI).
From the average table, we can observe:
- Treatments B, C, and E have nearly the same average mileage and are followed by the letter "b," indicating that these three treatments are not significantly different from each other.
- Treatment A has the lowest average mileage of 9.40 and is followed by the letter "a," indicating that this treatment is significantly different from Treatments B, C, and E.
- Treatment D has an average of 10.80 and is followed by the letter "ab," meaning this treatment is not significantly different from either Treatment A or Treatments B, C, and E.
From the above analysis, it can be concluded that:
- Treatments B, C, and E yield similar and higher results compared to Treatment A.
- Treatment D yields results that lie between Treatment A and the combination of Treatments B, C, and E.
- Treatment A yields the lowest results of all treatments.
Therefore, based on the existing data, the type of fuel mixture represented by Treatments B, C, and E tends to yield higher mileage compared to the mixture represented by Treatment A. Treatment D yields moderate results.
Assumption Checks for ANOVA
Formal Approach (Statistical Tests)
Interpretation and Discussion:
In Analysis of Variance (ANOVA), there are several key assumptions that need to be met to ensure the validity of the test results. The two main assumptions often checked are the homogeneity of variance (same variance across all groups) and the normality of residuals (residuals are normally distributed).
Levene's Test for Homogeneity of Variance:
- Levene's test evaluates the null hypothesis that the variances in all groups are equal.
- The F-statistic for Levene's test is 0.127 with a P-value of 0.971.
- Since the P-value > 0.05, the null hypothesis is not rejected, indicating that the variances across all groups are homogeneous. Therefore, the homogeneity of variance assumption for ANOVA is met.
Normality Tests:
Several statistical tests are used to check the normality of the distribution of residuals.
- Shapiro-Wilk's: The test statistic is 0.891 with a P-value of 0.012. Since the P-value < 0.05, it indicates that the distribution of residuals is not normal according to Shapiro-Wilk's test.
- Anderson-Darling: The test statistic is 1.010 with a P-value of 0.012. Similar to Shapiro-Wilk's, this result also indicates a violation of the normality assumption.
- D'Agostino Pearson: The test statistic is 3.298 with a P-value of 0.192. Based on this test, the distribution of residuals is considered normal.
- Liliefors: The test statistic is 0.209 with a P-value < 0.01. This result indicates a violation of the normality assumption.
- Kolmogorov-Smirnov: The test statistic is 0.209 with a P-value < 0.20. This result indicates that the distribution of residuals is considered normal.
Thus, out of the 5 normality tests conducted, 3 of them indicate that the distribution of residuals is not normal, while 2 indicate a normal distribution. Therefore, there is an indication of a violation of the normality assumption.
Based on the above results, it can be concluded:
- The assumption of homogeneity of variance is met, making it valid to use ANOVA.
- There is an indication of a violation of the normality assumption of residuals, which may require further consideration, such as data transformation or the use of alternative analysis methods that do not require the assumption of normality.
Visual Approach (Graph Plots)
Normal P-Plot of Residual Data:
The Normal P-Plot is used to check the normality assumption. If the data truly follows a normal distribution, the points on the plot will follow a diagonal line from the bottom-left corner to the upper-right corner. From the graph you uploaded, it seems that the points around the middle follow the diagonal line well, but there are some deviations at both ends, especially at the lower end. This suggests some deviations from normality, consistent with the previous statistical test results.
Residual Data Histogram:
The histogram shows the distribution of residual data. If the histogram appears bell-shaped and symmetrical, it can be considered to meet the normality assumption. From the graph you uploaded, the distribution appears to be slightly skewed to the right (positively skewed), indicating some deviations from a normal distribution.
Residual vs. Predicted Plot:
This plot is used to check the homoscedasticity assumption, which is constant variability of residuals across all levels of the predictor variable. If the residuals are randomly scattered around the horizontal zero line without any specific pattern, then the homoscedasticity assumption is considered met. From the graph you uploaded, it appears that there is no specific pattern and the residuals are randomly scattered, indicating the homoscedasticity assumption is met.
Standard Deviation vs. Mean:
This graph is also used to check the homoscedasticity assumption. If there is no specific pattern and the points are randomly scattered, then the variability (standard deviation) is constant across all levels of the mean, and the homoscedasticity assumption is met. From the graph you uploaded, it appears that there is no specific pattern, indicating the homoscedasticity assumption is met.
Conclusion:
- Based on the Normal P-Plot and Histogram graphs, there is an indication that the normality assumption of residuals might be violated.
- Based on the Residual vs. Predicted and Standard Deviation vs. Mean graphs, the homoscedasticity assumption is met.
Therefore, although the homoscedasticity assumption is met, the violation of the normality assumption may require further consideration in your analysis.
Box-Cox and Residual Data Analysis
Interpretation and Discussion:
Box-Cox Transformation:
- The Box-Cox transformation is used to make non-normally distributed data approximate normal distribution. This is often done when the assumption of residual normality for ANOVA is not met.
- From the analysis, the λ value for the Box-Cox transformation was found to be -0.510, which leads to an inverse square root transformation (λ=−0.5) Y'=1√Y. This means, to achieve normality, the response data should be transformed using this formula.
Residual Values and Outlier Examination:
- The "Data" column shows the original observation values for the combination of Day, Car Brand, and Treatment.
- The "Predicted" column displays values predicted based on the model.
- The "Residual" column is the difference between the original observation values and the predicted values.
- The "Leverage" column measures how extreme predictor (X) values are relative to other values. High leverage values may indicate an extreme or unusual data point in terms of the independent variable.
- The "Studentized Residual" and "Studentized Deleted Residual" columns provide standardized measures of residuals, facilitating outlier identification.
- "Cook's Distance" and "DFITS" are measures of the influence of a specific data point on the overall model. High values for these statistics may indicate a data point with significant impact on the model.
- The "Diagnostic" column provides information on whether the data point is considered an outlier or not.
- The "Box Cox Data" column shows data that has been transformed using Box-Cox transformation.
From these data:
- There are several data points considered outliers based on predetermined criteria, such as the second observation on Day 1, Car Brand 1, with Treatment C. This can be seen from the "Diagnostic" column displaying the label "Outlier".
From the analysis above, it can be concluded:
- There are some data points considered outliers based on predetermined criteria.
- If the ANOVA assumptions are not met, it is recommended to re-examine the outlier data or replace it using missing data formulae.
- Alternatively, data can be transformed using the Box-Cox transformation to attempt to meet the normality assumption. Transformed data is available in the "Box Cox Data" column.
In further analysis, consideration may need to be given to using transformed data or taking other steps to address outliers before proceeding with further analysis.
Transformation
Based on the examination of the normality assumption, there is an indication of violation of residual normality, which may require further consideration such as data transformation or the use of alternative analysis methods that do not require a normality assumption.
For practice, let's try changing the transformation score to 16 so that all normality tests are normally distributed.
The working steps are the same as before, but in the SECOND STEP, change the transformation score to 16 as shown in the following image:
Here are the analysis results after the minimum transformation score is changed:
SmartstatXL successfully found the right transformation, thus satisfying all normality tests, specifically the Inverse Square Root Transformation.
Assumption checking for transformed data:
After transformation, all normality tests indicate that residual values are normally distributed.
Transformed Data Results
In the above image, the original and transformed data are placed side by side. Transformed data is placed in the last column.
Analysis of Variance Table and Post hoc Test
Treatment Effect Table after Transformation
Interpretation and Discussion:
From the analysis you provided, we can compare the effects of Treatment (P) before and after the Inverse Square Root Transformation.
Before Transformation:
- The average values for Treatments B, C, and E are nearly the same, ranging from 11.8 to 12.00. They are all labeled "b," indicating that these three treatments are not significantly different from each other.
- Treatment A has the lowest average of 9.40 and is labeled "a."
- Treatment D has an average of 10.80 and is labeled "ab," indicating that this treatment is not significantly different from either Treatment A or Treatments B, C, and E.
After Transformation:
- The average values for Treatments B, C, E, and D are nearly identical, ranging from 0.29 to 0.31. They are all labeled "a," indicating that these four treatments are not significantly different from each other.
- Treatment A has the highest average of 0.33 and is labeled "b," indicating that this treatment is significantly different from the others.
- From the above analysis, we can conclude:
- Before Transformation: Treatments B, C, and E yield higher results compared to Treatment A, while Treatment D yields results that are between Treatment A and the combination of Treatments B, C, and E.
- After Transformation: Treatment A yields the highest results, while Treatments B, C, E, and D yield similar and lower results compared to Treatment A.
It is important to note that data transformation can alter the interpretation of results. In this case, the transformation led to significant changes in how the treatments affect the response. Therefore, when comparing results before and after transformation, it's crucial to consider how the transformation impacts the interpretation and relevance of the findings in the context of your research.
Presentation of Tables
In presenting research findings, especially when the data has undergone transformation, transparency and clarity are crucial. You want to ensure that readers can easily understand what you have done and why you have done it.
Here's how you can present your results:
Average Treatment Table Before and After Transformation
Treatment | Average | Average | Notation |
A | 9.40 | 0.33 | b |
B | 12.00 | 0.29 | a |
C | 11.80 | 0.29 | a |
D | 10.80 | 0.31 | a |
E | 11.80 | 0.29 | a |
Interpretation and Discussion:
- Average (Original Data): This column displays the average value from the original data before transformation. It provides an overview of the actual response from each treatment.
- Average (Transformation): This column displays the average value after the data underwent an Inverse Square Root transformation. This transformation is performed to meet ANOVA assumptions.
- Notation (Based on Transformation): This notation is based on the post hoc test results after transformation. It provides information on significant differences between treatments based on transformed data.
From the above table, we can conclude:
- Based on the original data, Treatments B, C, and E yield higher results compared to Treatment A, with Treatment D in the middle.
- However, after transformation, Treatment A shows different results compared to Treatments B, C, E, and D.
- The interpretation reverses due to the Inverse Square Root transformation. In this context, we only pay attention to differences among treatments. Interpretation should be reverted back to the original average values, not the transformed averages. Thus, we can interpret that Treatment A is more fuel-efficient compared to other treatments.
Presenting results before and after transformation in one table facilitates the reader in comparing outcomes and understanding the impact of transformation on data. Average values are taken from the original data, whereas notation (or significance interpretation) is drawn from the post hoc test results after transformation since the transformation is done to satisfy the assumptions of the statistical model being used.
Conclusion
- Experimental Design:
- The study was conducted to evaluate the effect of gasoline blending on fuel economy through mileage (km/liter) using five different car brands and five types of treatments.
- A Latin Square Design was used, extending the trial period to five days.
- Analysis of Variance:
- Only the Treatment (P) factor significantly affects mileage at the 5% confidence level. This indicates that the type of gasoline blending has a significant difference in terms of fuel efficiency.
- ANOVA Assumption Checks:
- Before transformation, the normality assumption of residuals was violated, but the homoscedasticity assumption was met.
- The Box-Cox transformation (specifically the Inverse Square Root Transformation) was applied to satisfy the normality assumption.
- After transformation, both the assumption of homogeneity of variances and normality of residuals were met, validating the use of ANOVA on the transformed data.
- Post Hoc Test Results:
- Before transformation, Treatment A showed lower fuel efficiency compared to Treatments B, C, and E, whereas Treatment D fell in between.
- After transformation, Treatment A showed lower fuel efficiency compared to Treatments B, C, D, and E.
- Recommendations:
- When applying the results from this analysis, it's important to consider the impact of transformation on practical interpretation. Even though statistical analysis shows differences among treatments after transformation, the original data also provide important information on the relative fuel efficiency of each treatment.
- Attention should also be given to data points considered as outliers before transformation, as they may have a significant impact on the analysis outcome.
Thus, based on the analysis results, the choice of gasoline blending affects fuel efficiency. However, the practical interpretation of these results should be carried out cautiously, taking into account the differences between the original and transformed data.