Testing Parallelism for Several Lines (See Section 9.5 in text (attributed to Sen, Adichie)) See the comments in ParallelSlopes.m and ParallelSlopes.txt (``Approach I``) for a discussion of the method EXAMPLE: Test of cloud seeding of cyclones kk=2 samples: Seeded and not seeded (in that order) Y_ij = measure of precipitation X_ij = meridional circulation index for cyclones Sample sizes n1=11 (seeded) and n2=10 (unseeded) See Table 9.5 page 436 in text (Problem 28) K=2 groups with sizes N1=11 and N2=10 Data: Seeded (n=11): Y: 0.180 0.175 0.178 0.021 0.260 0.715 0.441 0.205 0.417 0.498 0.603 X: 24 28 30 37 43 47 52 57 71 87 115 Unseeded (n=10): Y: 0.138 0.081 0.072 0.188 0.075 0.435 0.423 0.339 0.519 0.738 X: -7 10 17 25 44 51 53 63 75 90 The H_0 model is Y_ij = beta X_ij + mu_i + error_ij. As in ParallelSlopes.m, minimizing over the mu_i for fixed leads to the system Y_ij - Ybar_i = beta (X_ij - Xbar_i) + error_ij (4) Let beta be the overall least-squares estimate of beta in (4) for all (i,j) pairs (1 le i le kk, 1 le j le nn_i) Overall beta (beta_bar) = 0.005735 Beta values within groups: 0.004999 0.006413 Aligned observations Ystar_ij = Y_ij - betabar X_ij: Seeded (n=11): 0.042 0.014 0.006 -0.191 0.013 0.445 0.143 -0.122 0.010 -0.001 -0.057 Unseeded (n=10): 0.178 0.024 -0.025 0.045 -0.177 0.143 0.119 -0.022 0.089 0.222 Within-group ranks: Seeded: 9.0 8.0 5.0 1.0 7.0 11.0 10.0 2.0 6.0 4.0 3.0 Unseeded: 10.0 5.0 3.0 6.0 1.0 9.0 8.0 4.0 7.0 11.0 Within-group Ti=Sum_j Xc(i,j)*Rank(i,j)/(n_i+1) and Ci2=Sum(j=1,nn_i) (X_ij - Xbar_i)^2: Seeded: T1=-29.00 C1^2=7722.182 Unseeded: T2= 16.42 C2^2=8378.900 Sen-Adichie test: X=1.6929 P=0.1932 (df=1) Compare with a permutation test of within-group ranks: (Friedman-like permutations.) Initializing the random-number generator at 12345678 Carrying out ns=10000 sets of within-group permutations: Observed Vscore = 0.141078 Number of simulations with values >= Tscore and total number: 4491 10000 95% CI for true P-value bracketing estimate of true pvalue: (Since H and Fscore >= 0, P-values are inherently two-sided.) 0.4394 0.4491 0.4588