R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- c(867.887509505211 + ,-2250.28069676838 + ,33618.3570412959 + ,9954.34468238836 + ,354.191730842355 + ,18882.406400463 + ,20229.4310915672 + ,268402.416151187 + ,-113346.926055862 + ,-45016.394227939 + ,35069.861367254 + ,58531.0957290091 + ,-77256.3771198791 + ,-31473.594568955 + ,-52391.0075132882 + ,32854.9847569661 + ,101107.732845397 + ,-176275.960398033 + ,79531.884415102 + ,-176414.251561376 + ,151290.579462589 + ,167731.594163443 + ,143237.122434691 + ,80251.9665265577 + ,118735.726273623 + ,75035.8259037494 + ,19198.3085437346 + ,-36364.5639276314 + ,-36170.5787440905 + ,-109567.395064155 + ,-100783.336097857 + ,-149267.403931369 + ,38947.3510583149 + ,58613.0600994635 + ,16074.4602044407 + ,-41563.0049150659 + ,-15970.5964777959 + ,-47563.9548420802 + ,59595.3577179922 + ,65897.8405390448 + ,-166489.283203891 + ,46312.3269884632 + ,-15952.8722863516 + ,-87780.6523566012 + ,134744.172737777 + ,75232.8122408289 + ,24408.7558471514 + ,-15406.1403381955 + ,-3766.75348767364 + ,27197.2239951006 + ,-46777.2890031503 + ,-82472.8212609495 + ,-35154.7184801844 + ,-46946.870011609 + ,-43641.5364941684 + ,-54920.7084991732 + ,54905.4038222157 + ,-10509.5840707596 + ,-13706.8046976985 + ,-42347.6087628011 + ,-28990.4687708701) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Mean Plot (v1.0.4) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_meanplot.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > # > par1 <- as.numeric(par1) > (n <- length(x)) [1] 61 > (np <- floor(n / par1)) [1] 5 > arr <- array(NA,dim=c(par1,np+1)) > darr <- array(NA,dim=c(par1,np+1)) > ari <- array(0,dim=par1) > dx <- diff(x) > j <- 0 > for (i in 1:n) + { + j = j + 1 + ari[j] = ari[j] + 1 + arr[j,ari[j]] <- x[i] + darr[j,ari[j]] <- dx[i] + if (j == par1) j = 0 + } > ari [1] 6 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 867.8875 -77256.38 118735.73 -15970.60 -3766.753 -28990.47 [2,] -2250.2807 -31473.59 75035.83 -47563.95 27197.224 NA [3,] 33618.3570 -52391.01 19198.31 59595.36 -46777.289 NA [4,] 9954.3447 32854.98 -36364.56 65897.84 -82472.821 NA [5,] 354.1917 101107.73 -36170.58 -166489.28 -35154.718 NA [6,] 18882.4064 -176275.96 -109567.40 46312.33 -46946.870 NA [7,] 20229.4311 79531.88 -100783.34 -15952.87 -43641.536 NA [8,] 268402.4162 -176414.25 -149267.40 -87780.65 -54920.708 NA [9,] -113346.9261 151290.58 38947.35 134744.17 54905.404 NA [10,] -45016.3942 167731.59 58613.06 75232.81 -10509.584 NA [11,] 35069.8614 143237.12 16074.46 24408.76 -13706.805 NA [12,] 58531.0957 80251.97 -41563.00 -15406.14 -42347.609 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] -3118.168 45782.78 -43699.9004 -31593.358 30963.977 NA [2,] 35868.638 -20917.41 -55837.5174 107159.313 -73974.513 NA [3,] -23664.012 85245.99 -55562.8725 6302.483 -35695.532 NA [4,] -9600.153 68252.75 193.9852 -232387.124 47318.103 NA [5,] 18528.215 -277383.69 -73396.8163 212801.610 -11792.152 NA [6,] 1347.025 255807.84 8784.0590 -62265.199 3305.334 NA [7,] 248172.985 -255946.14 -48484.0678 -71827.780 -11279.172 NA [8,] -381749.342 327704.83 188214.7550 222524.825 109826.112 NA [9,] 68330.532 16441.01 19665.7090 -59511.360 -65414.988 NA [10,] 80086.256 -24494.47 -42538.5999 -50824.056 -3197.221 NA [11,] 23461.234 -62985.16 -57637.4651 -39814.896 -28640.804 NA [12,] -135787.473 38483.76 25592.4084 11639.387 13357.140 NA > arr.mean <- array(NA,dim=par1) > arr.median <- array(NA,dim=par1) > arr.midrange <- array(NA,dim=par1) > for (j in 1:par1) + { + arr.mean[j] <- mean(arr[j,],na.rm=TRUE) + arr.median[j] <- median(arr[j,],na.rm=TRUE) + arr.midrange[j] <- (quantile(arr[j,],0.75,na.rm=TRUE) + quantile(arr[j,],0.25,na.rm=TRUE)) / 2 + } > overall.mean <- mean(x) > overall.median <- median(x) > overall.midrange <- (quantile(x,0.75) + quantile(x,0.25)) / 2 > postscript(file="/var/wessaorg/rcomp/tmp/1sk0m1386170273.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,type='b',ylab='mean',main='Mean Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.mean,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2594u1386170273.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.median,type='b',ylab='median',main='Median Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.median,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3vy9j1386170273.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.midrange,type='b',ylab='midrange',main='Midrange Plot',xlab='Periodic Index') > mtext(paste('#blocks = ',np)) > abline(overall.midrange,0) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/4xwaf1386170273.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(arr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [1,] -28990.4688 -47563.955 -52391.01 -82472.821 -36170.5787 -176275.96 [2,] -28990.4688 -31473.595 -46777.29 -36364.564 -36170.5787 -109567.40 [3,] -9868.6750 -2250.281 19198.31 9954.345 -35154.7185 -46946.87 [4,] 867.8875 27197.224 33618.36 32854.985 354.1917 18882.41 [5,] 867.8875 75035.826 59595.36 65897.841 354.1917 46312.33 [,7] [,8] [,9] [,10] [,11] [,12] [1,] -100783.34 -176414.25 38947.35 -45016.39 16074.46 -42347.61 [2,] -43641.54 -149267.40 38947.35 -10509.58 16074.46 -41563.00 [3,] -15952.87 -87780.65 54905.40 58613.06 24408.76 -15406.14 [4,] 20229.43 -54920.71 134744.17 75232.81 35069.86 58531.10 [5,] 79531.88 -54920.71 151290.58 167731.59 35069.86 80251.97 $n [1] 6 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -29128.279 -43706.93 -37609.05 -38956.01 -60963.029 -137709.18 -61083.94 [2,] 9390.929 39206.37 76005.67 58864.70 -9346.408 43815.44 29178.19 [,8] [,9] [,10] [,11] [,12] [1,] -154445.79 -12784.39 -1972.301 10986.65 -86132.38 [2,] -21115.52 122595.20 119198.421 37830.86 55320.10 $out [1] -77256.38 118735.73 101107.73 -166489.28 268402.42 -113346.93 143237.12 [8] -13706.80 $group [1] 1 1 5 5 8 9 11 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-28990.4687708701, -28990.4687708701, -9868.67498273477, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/526cd1386170273.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(t(darr)) > names(z) <- c(1:par1) > (boxplot(z,notch=TRUE,col='grey',xlab='Periodic Index',ylab='Value',main='Notched Box Plots - Differenced Periodic Subseries')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -43699.900 -73974.51 -55562.872 -9600.1530 -73396.82 1347.025 -71827.78 [2,] -31593.358 -55837.52 -35695.532 -9600.1530 -73396.82 1347.025 -71827.78 [3,] -3118.168 -20917.41 -23664.012 193.9852 -11792.15 3305.334 -48484.07 [4,] 30963.977 35868.64 6302.483 47318.1028 18528.21 8784.059 -11279.17 [5,] 45782.783 107159.31 6302.483 68252.7481 18528.21 8784.059 -11279.17 [,8] [,9] [,10] [,11] [,12] [1,] 109826.1 -65414.99 -50824.056 -62985.16 11639.39 [2,] 109826.1 -59511.36 -42538.600 -57637.47 11639.39 [3,] 188214.8 16441.01 -24494.472 -39814.90 13357.14 [4,] 222524.8 19665.71 -3197.221 -28640.80 25592.41 [5,] 327704.8 68330.53 -3197.221 -28640.80 38483.76 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -47321.02 -85716.75 -53339.704 -40024.31 -76746.15 -1949.656 -91267.562 [2,] 41084.69 43881.93 6011.679 40412.28 53161.84 8560.323 -5700.574 [,8] [,9] [,10] [,11] [,12] [1,] 108582.1 -39505.30 -52292.991 -60303.86 3497.97 [2,] 267847.4 72387.33 3304.048 -19325.93 23216.31 $out [1] 85245.99 -232387.12 -277383.69 212801.61 255807.84 -62265.20 [7] 248172.99 -255946.14 -381749.34 80086.26 23461.23 -135787.47 $group [1] 3 4 5 5 6 6 7 7 8 10 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-43699.9003698736, -31593.3583642843, -3118.16820627359, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6fwap1386170273.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(arr) > names(z) <- c(1:np) > (boxplot(z,notch=TRUE,col='grey',xlab='Block Index',ylab='Value',main='Notched Box Plots - Sequential Blocks')) $stats [,1] [,2] [,3] [,4] [,5] [,6] [1,] -45016.3942 -176414.25 -149267.40 -166489.283 -82472.821 -28990.47 [2,] -948.0445 -64823.69 -71173.17 -31767.276 -46862.080 -28990.47 [3,] 14418.3755 56193.43 -10048.06 4501.308 -38751.164 -28990.47 [4,] 34344.1092 122172.43 48780.21 62746.599 -7138.169 -28990.47 [5,] 58531.0957 167731.59 118735.73 134744.173 27197.224 -28990.47 $n [1] 12 12 12 12 12 1 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] -1678.613 -29096.75 -64759.60 -38607.10 -56869.51 -28990.47 [2,] 30515.364 141483.62 44663.48 47609.72 -20632.82 -28990.47 $out [1] 268402.4 -113346.9 54905.4 $group [1] 1 1 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(-45016.394227939, -948.044482963013, 14418.3755414257, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7lcek1386170273.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > z <- data.frame(cbind(arr.mean,arr.median,arr.midrange)) > names(z) <- list('mean','median','midrange') > (boxplot(z,notch=TRUE,col='grey',ylab='Overall Central Tendency',main='Notched Box Plots')) $stats [,1] [,2] [,3] [1,] -53519.0984 -87780.652 -45342.494 [2,] -19696.9085 -25553.795 -15460.665 [3,] 792.6575 -6059.478 -4358.826 [4,] 24454.9703 21803.532 17028.103 [5,] 53308.1162 58613.060 32361.614 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] -19345.31 -27659.47 -19177.17 [2,] 20930.63 15540.52 10459.52 $out [1] -102094.06 86845.76 $group [1] 3 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(-53519.0984169742, -19696.9085223634, 792.657505900878, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1sk0m1386170273.ps tmp/1sk0m1386170273.png",intern=TRUE)) character(0) > try(system("convert tmp/2594u1386170273.ps tmp/2594u1386170273.png",intern=TRUE)) character(0) > try(system("convert tmp/3vy9j1386170273.ps tmp/3vy9j1386170273.png",intern=TRUE)) character(0) > try(system("convert tmp/4xwaf1386170273.ps tmp/4xwaf1386170273.png",intern=TRUE)) character(0) > try(system("convert tmp/526cd1386170273.ps tmp/526cd1386170273.png",intern=TRUE)) character(0) > try(system("convert tmp/6fwap1386170273.ps tmp/6fwap1386170273.png",intern=TRUE)) character(0) > try(system("convert tmp/7lcek1386170273.ps tmp/7lcek1386170273.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.421 1.528 8.908