Latin Square Design Anova Table Examples - R Programming

Anova table for Latin square design is made by R language and R Studio. We create a excel sheet including all data and it is imported to R and analyzed it using R functions. Anova table is constructed for following Latin square design.





Example 1:

A scientist is investigating the effect of four testing methods (A, B, C, D) on the assembly time for a automated mechanical system for automobile plant. Four different operators are selected for the study and the engineer knows that each assembly method produces such fatigue that the time required for the last assembly may be greater than the time required for the first, regardless of the method. That is, a trend develops in the required assembly time.

data table - Latin square design table anova table - R program

R Program for Latin Square Design Anova Table

  1. ## Question 1
  2. ## setup framework for rows,columns and treatments
  3. row<-c(rep("A1",4),rep("A2",4),rep("A3",4),rep("A4",4))
  4. col<-c(rep(c("O1","O2","O3","O4"),4))
  5. assembly_method<-c("C","D","A","B","B","C","D","A","A","B","C","D","D","A","B","C")
  6. ##Assign data to variable "assemble_time"
  7. assembly_time<-c(10,14,7,8,7,18,11,8,5,10,11,9,10,10,12,14)
  8. y<-data.frame(col,row,assembly_method,assembly_time)
  9. matrix(y$assembly_method,4,4,byrow = T)
  10. matrix(y$assembly_time,4,4,byrow = T)
  11. ## Apply a linear model
  12. yfit<-lm(assembly_time~row+assembly_method+col,y)
  13. ## Compute the analysis of variance table
  14. anova(yfit)


Results of Latin Square Design Anova Table

results of - Latin square design table anova table - R program

Question:

An experimenter is studying the effects of five different formulations of an explosive mixture used to manufacture of dynamite on the observed explosive force.Each formulation is mixed from a batch of row material that is only large enough for five formulations to be tested. Furthermore, the formulations are prepared by several operators, and there may be substantial differences in the skills and experience of the operators. Design the ANOVA table.

latin square design table structure

Next, construct the excel worksheet and save it as 'Data'. Download the worksheet

Download Worksheet

Then, import it into the R Studio.


Constructing ANOVA table

First we build the ANOVA table for Explosive force, Material, and Operator. Type below codes and press enter.
>anova=aov(Explosive_force~Material+Operators,data=Data)
>summary(anova)


Next we build the ANOVA table for Explosive force, Material, and Formulation. Type below codes and press enter.
>anova=aov(Explosive_force~Material+Formulation,data=Data)
>summary(anova)

Anova table

Qualitative Analysis for anions and cations

Emission of gases Identify ammonium salts identify d block cations by ammonia solution Identify halides Identify carbonate ions identify chromium compounds Testing for thiosulfate (S2O32-) Testing for phosphate ion