Content Disclaimer Copyright @2020. All Rights Reserved. 
Links : Home Index (Subjects) Contact StatsToDo 
Explanation
Javascript Program
R Codes
D
E
F
The Marascuilo Procedure is used to compare proportions when there
are more than two groups with binary outcomes (yes/no). It firstly performs a test of overall homogeneity for a large
contingency table, using the standard Chi Square Test. This is followed by multiple post hoc comparisons between pairs of groups in the data.
The Mascuilo's procedure is simpler and replaces using multiple comparisons of two groups with a Bonferroni's correction for multiple comparisons, so it is preferred when there are multiple groups to be compared at the same time. An Example : We wish to study academic achievements in 3 social groups of students.
An initial analysis using the Chi Squares Test indicates that the rates of under achievement are significantly different in the 3 groups (Chi Sq = 38.04, df=2, α<0.001). Using the Marascuilo procedure to perform post hoc analysis, we found that group 1 is significantly different to group 2 (difference = 35%, α<0.001), and to group 3 (difference = 43.3%, α<0.001). However, the difference between groups 2 and 3 (difference = 8.3%, α=0.47) is not statistically significant. ReferencesMarascuilo,L. A. 1966: Largesample multiple comparison. Psychological Bulletin 65: p. 280  290. Daniel,W. W. 1990: Applied nonparametric statistics. 2nd ed. Boston PWS Kent Zwick,R. and L.A.Marascuilo. (1984) Selection of pairwise multiple comparison procedures for parametric and nonparametric analysis of variance models. Psychological Bulletin, 95(1): 148155. https://www.itl.nist.gov/div898/handbook/prc/section4/prc464.htm Algoritm by NIST
# MultiProp.R Marascuilo's Procedure # Part 1 : Data Input dat = (" NPos NNeg 60 40 20 60 10 50 ") df < read.table(textConnection(dat),header=TRUE) # conversion to data frame #df # optional display of input data # Part 2: initial overall chi sq Test df$RowTot < df$NPos + df$NNeg # row total df$Prop < df$NPos / df$RowTot # proportion positives ColTot < c(sum(df[, 1]),sum(df[, 2])) # col total total = sum(arColTot) degFdm = nrow(df)  1 chiSq = 0 for(i in 1 : nrow(df)) { for(j in 1:2) { e = df$RowTot[i] * ColTot[j] / total o = df[i,j] chiSq = chiSq + (e  o)^2 / e; } } p = 1  pchisq(chiSq, df=degFdm) df # data frame with probability added c(chiSq, degFdm, p) # Chi Square, degrees of freedom, and Probability of Type I Error pThe initial results are as follows. Prob is the proportion of positives > df # data frame with probability added NPos NNeg RowTot Prop 1 60 40 100 0.6000000 2 20 60 80 0.2500000 3 10 50 60 0.1666667 > c(chiSq, degFdm, p) # Chi Square, degrees of freedom, and Probability of Type I Error p [1] 3.804444e+01 2.000000e+00 5.479663e09Part 3: Post hoc comparison between rows #Part 3: Post hoc comparison between rows GrpA < vector() GrpB < vector() Diff < vector() ChiSq < vector() P < vector() ii = nrow(df)  1 jj = nrow(df) c(ii,jj) i = 1 while(i<=ii) { j = i + 1 while(j<=jj) { print(c(i,j)) p1 < df$Prop[i] GrpA < append(GrpA,i) p2 < df$Prop[j] GrpB < append(GrpB,j) diff = p1  p2 Diff < append(Diff,diff) chiSq = diff^2 / (p1*(1  p1) / df$RowTot[i] + p2 * (1  p2) / df$RowTot[j]) ChiSq < append(ChiSq,chiSq) p = 1  pchisq(chiSq, df=degFdm) P < append(P,p) j = j + 1 } i = i + 1 } dfR < data.frame(GrpA, GrpB, Diff, ChiSq, P) dfR # display resultsThe results are as follows
> dfR # display results GrpA GrpB Diff ChiSq P 1 1 2 0.35000000 25.823452 2.468929e06 2 1 3 0.43333333 39.827180 2.247180e09 3 2 3 0.08333333 1.490683 4.745722e01 >
Contents of D:3
Contents of E:4
Contents of F:5
