source("Table7source-code.R") #scov is the sample covariance matrix from Weston & Gore Jr (2006) #which is re-orderd for convenience scov=scan() 7.511 5.505 5.773 3.413 2.926 2.852 0.243 0.299 0.177 3.260 3.592 2.279 5.505 7.220 5.716 2.518 2.840 2.910 0.281 0.299 0.296 3.070 3.665 2.394 5.773 5.716 6.958 2.630 2.671 2.618 0.256 0.270 0.209 2.596 2.817 2.553 3.413 2.518 2.630 4.590 3.626 3.668 0.260 0.288 0.230 2.976 2.931 2.402 2.926 2.840 2.671 3.626 3.860 3.597 0.225 0.278 0.239 2.743 2.867 2.418 2.852 2.910 2.618 3.668 3.597 4.237 0.260 0.286 0.280 2.764 2.821 2.410 0.243 0.281 0.256 0.260 0.225 0.260 0.072 0.037 0.039 0.257 0.224 0.236 0.299 0.299 0.270 0.288 0.278 0.286 0.037 0.064 0.038 0.336 0.297 0.269 0.177 0.296 0.209 0.230 0.239 0.280 0.039 0.038 0.078 0.280 0.239 0.198 3.260 3.070 2.596 2.976 2.743 2.764 0.257 0.336 0.280 4.811 3.909 3.179 3.592 3.665 2.817 2.931 2.867 2.821 0.224 0.297 0.239 3.909 5.074 3.041 2.279 2.394 2.553 2.402 2.418 2.410 0.236 0.269 0.198 3.179 3.041 3.503 scov=matrix(data = scov, nrow = 12, ncol = 12, byrow = TRUE) #make scov a matrix N=403 #use the function PLS_BA() to w_A and w_Ba, #and estimate the regression coefficients using reg_swc() estimate_BA=PLS_ABa(N,scov)