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(329.6 + ,327.2 + ,326.3 + ,315.4 + ,308.6 + ,302.6 + ,295.6 + ,291.5 + ,288.1 + ,281.1 + ,282.4 + ,284.9 + ,274.2 + ,265.7 + ,259.7 + ,253.7 + ,249.5 + ,244.6 + ,243 + ,239.2 + ,235.7 + ,231.1 + ,226.7 + ,221.7 + ,219.4 + ,214.2 + ,211.7 + ,207.7 + ,204.7 + ,201.2 + ,199.9 + ,197.8 + ,195.2 + ,194.3 + ,192.8 + ,188.5 + ,183.2 + ,181.4 + ,180.5 + ,180.2 + ,179.2 + ,177.1 + ,174.2 + ,172.1 + ,171.1 + ,169.8 + ,169.5 + ,165.5 + ,167.2 + ,167.6 + ,171.8 + ,175.9 + ,180 + ,184.9 + ,184.6 + ,187.6 + ,191.5 + ,195.5 + ,201.6 + ,203.5 + ,209.1 + ,217.1 + ,227.6 + ,237.2 + ,245.6 + ,253.2 + ,260.5 + ,266.1 + ,273 + ,280.8 + ,284.4 + ,288.5 + ,284.8 + ,288.9 + ,299.6 + ,307.8 + ,311.4 + ,322 + ,317.8 + ,319.1 + ,322.3 + ,323.1 + ,322.8 + ,325 + ,323.2 + ,318.8 + ,328.2 + ,329.2 + ,326.5 + ,330.1 + ,323.8 + ,321.8 + ,319.6 + ,315.5 + ,310.7 + ,306.5 + ,295.1 + ,288 + ,293.9 + ,289.3 + ,287.4 + ,282.6 + ,276.9 + ,272.7 + ,267.9 + ,262.8 + ,256.6 + ,250.7 + ,243.2 + ,235.1 + ,229.6 + ,222.9 + ,217.6 + ,214.1 + ,210.8 + ,208 + ,202.6 + ,199 + ,195.5 + ,192.1 + ,189.4 + ,182.4 + ,179.2 + ,176.5 + ,174 + ,171.7 + ,169.8 + ,168.3 + ,166.4 + ,165.9 + ,166.4 + ,170.6 + ,177.6 + ,183.4 + ,191.9 + ,201.7 + ,210.6 + ,221.6 + ,232.2 + ,240.4 + ,248.4 + ,258.5 + ,265 + ,271.7 + ,273.9 + ,277.8 + ,273.4 + ,270.9 + ,268.3 + ,264.7 + ,264.1 + ,264.5 + ,262.2 + ,258.6 + ,259.4 + ,262.7 + ,264.9 + ,260.5 + ,256.4 + ,254.7 + ,254.8 + ,255.3 + ,256.8 + ,258.7 + ,259.8 + ,261.7 + ,264.7 + ,269.1 + ,279 + ,283.4 + ,285.5 + ,288.2 + ,292.1 + ,295.6 + ,302.4 + ,308.5 + ,314.1 + ,319.8 + ,329.7 + ,339.7) > par1 = '15' > par1 <- '15' > #'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] 180 > (np <- floor(n / par1)) [1] 12 > 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] 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [1,] 329.6 253.7 199.9 169.8 209.1 307.8 323.8 262.8 189.4 201.7 264.1 261.7 [2,] 327.2 249.5 197.8 169.5 217.1 311.4 321.8 256.6 182.4 210.6 264.5 264.7 [3,] 326.3 244.6 195.2 165.5 227.6 322.0 319.6 250.7 179.2 221.6 262.2 269.1 [4,] 315.4 243.0 194.3 167.2 237.2 317.8 315.5 243.2 176.5 232.2 258.6 279.0 [5,] 308.6 239.2 192.8 167.6 245.6 319.1 310.7 235.1 174.0 240.4 259.4 283.4 [6,] 302.6 235.7 188.5 171.8 253.2 322.3 306.5 229.6 171.7 248.4 262.7 285.5 [7,] 295.6 231.1 183.2 175.9 260.5 323.1 295.1 222.9 169.8 258.5 264.9 288.2 [8,] 291.5 226.7 181.4 180.0 266.1 322.8 288.0 217.6 168.3 265.0 260.5 292.1 [9,] 288.1 221.7 180.5 184.9 273.0 325.0 293.9 214.1 166.4 271.7 256.4 295.6 [10,] 281.1 219.4 180.2 184.6 280.8 323.2 289.3 210.8 165.9 273.9 254.7 302.4 [11,] 282.4 214.2 179.2 187.6 284.4 318.8 287.4 208.0 166.4 277.8 254.8 308.5 [12,] 284.9 211.7 177.1 191.5 288.5 328.2 282.6 202.6 170.6 273.4 255.3 314.1 [13,] 274.2 207.7 174.2 195.5 284.8 329.2 276.9 199.0 177.6 270.9 256.8 319.8 [14,] 265.7 204.7 172.1 201.6 288.9 326.5 272.7 195.5 183.4 268.3 258.7 329.7 [15,] 259.7 201.2 171.1 203.5 299.6 330.1 267.9 192.1 191.9 264.7 259.8 339.7 [,13] [1,] NA [2,] NA [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA [13,] NA [14,] NA [15,] NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [1,] -2.4 -4.2 -2.1 -0.3 8.0 3.6 -2.0 -6.2 -7.0 8.9 0.4 3.0 NA [2,] -0.9 -4.9 -2.6 -4.0 10.5 10.6 -2.2 -5.9 -3.2 11.0 -2.3 4.4 NA [3,] -10.9 -1.6 -0.9 1.7 9.6 -4.2 -4.1 -7.5 -2.7 10.6 -3.6 9.9 NA [4,] -6.8 -3.8 -1.5 0.4 8.4 1.3 -4.8 -8.1 -2.5 8.2 0.8 4.4 NA [5,] -6.0 -3.5 -4.3 4.2 7.6 3.2 -4.2 -5.5 -2.3 8.0 3.3 2.1 NA [6,] -7.0 -4.6 -5.3 4.1 7.3 0.8 -11.4 -6.7 -1.9 10.1 2.2 2.7 NA [7,] -4.1 -4.4 -1.8 4.1 5.6 -0.3 -7.1 -5.3 -1.5 6.5 -4.4 3.9 NA [8,] -3.4 -5.0 -0.9 4.9 6.9 2.2 5.9 -3.5 -1.9 6.7 -4.1 3.5 NA [9,] -7.0 -2.3 -0.3 -0.3 7.8 -1.8 -4.6 -3.3 -0.5 2.2 -1.7 6.8 NA [10,] 1.3 -5.2 -1.0 3.0 3.6 -4.4 -1.9 -2.8 0.5 3.9 0.1 6.1 NA [11,] 2.5 -2.5 -2.1 3.9 4.1 9.4 -4.8 -5.4 4.2 -4.4 0.5 5.6 NA [12,] -10.7 -4.0 -2.9 4.0 -3.7 1.0 -5.7 -3.6 7.0 -2.5 1.5 5.7 NA [13,] -8.5 -3.0 -2.1 6.1 4.1 -2.7 -4.2 -3.5 5.8 -2.6 1.9 9.9 NA [14,] -6.0 -3.5 -1.0 1.9 10.7 3.6 -4.8 -3.4 8.5 -3.6 1.1 10.0 NA [15,] -6.0 -1.3 -1.3 5.6 8.2 -6.3 -5.1 -2.7 9.8 -0.6 1.9 NA 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/1rrx61393876379.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/2g1nj1393876379.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/3z4rq1393876379.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/4dnps1393876379.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] [,7] [,8] [,9] [,10] [,11] [1,] 169.80 169.50 165.50 167.20 167.60 171.70 169.80 168.30 166.40 165.9 166.4 [2,] 200.80 204.20 208.40 213.25 213.95 209.05 203.05 199.50 199.50 197.7 197.8 [3,] 257.70 253.05 247.65 243.10 243.00 250.80 259.50 262.75 264.05 264.3 266.3 [4,] 285.95 288.05 294.35 297.20 296.00 294.05 291.65 289.75 291.00 285.2 285.9 [5,] 329.60 327.20 326.30 317.80 319.10 322.30 323.10 322.80 325.00 323.2 318.8 [,12] [,13] [,14] [,15] [1,] 170.60 174.20 172.10 171.10 [2,] 197.05 197.25 198.55 196.65 [3,] 264.35 263.85 262.20 259.75 [4,] 286.70 280.85 280.80 283.75 [5,] 328.20 329.20 329.70 339.70 $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 218.8625 214.8055 208.4476 204.8098 205.5764 212.0309 219.0889 221.5864 [2,] 296.5375 291.2945 286.8524 281.3902 280.4236 289.5691 299.9111 303.9136 [,9] [,10] [,11] [,12] [,13] [,14] [,15] [1,] 222.3162 224.3907 226.117 223.46 225.7195 224.6852 220.0231 [2,] 305.7838 304.2093 306.483 305.24 301.9805 299.7148 299.4769 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" Warning message: In bxp(list(stats = c(169.8, 200.8, 257.7, 285.95, 329.6, 169.5, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5ut6a1393876379.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] [,8] [,9] [,10] [,11] [,12] [1,] -7.00 -5.90 -10.90 -8.10 -6.00 -11.40 -7.10 -5.00 -7.00 -5.20 -5.40 -10.70 [2,] -3.30 -3.60 -4.15 -4.30 -4.25 -6.00 -4.40 -3.45 -2.80 -2.35 -3.45 -3.85 [3,] -1.15 -2.25 -2.15 -0.55 -0.10 -0.55 -1.65 0.65 -1.10 0.30 1.50 -2.70 [4,] 3.30 7.45 5.65 2.85 3.75 3.40 4.00 5.40 0.95 3.30 4.15 2.75 [5,] 8.90 11.00 10.60 8.40 8.00 10.10 6.50 6.90 2.20 6.10 9.40 7.00 [,13] [,14] [,15] [1,] -8.50 -6.00 -6.30 [2,] -3.25 -3.55 -3.90 [3,] -2.35 0.05 -1.30 [4,] 4.95 6.05 3.75 [5,] 9.90 10.70 9.80 $n [1] 12 12 12 12 12 12 12 12 12 12 12 12 12 12 11 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -4.160304 -7.289979 -6.619846 -3.811163 -3.748854 -4.837403 -5.481296 [2,] 1.860304 2.789979 2.319846 2.711163 3.548854 3.737403 2.181296 [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] -3.386544 -2.8104002 -2.277003 -1.966411 -5.7103043 -6.090075 -4.328624 [2,] 4.686544 0.6104002 2.877003 4.966411 0.3103043 1.390075 4.428624 [,15] [1,] -4.944368 [2,] 2.344368 $out [1] 7.8 6.8 $group [1] 9 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" Warning message: In bxp(list(stats = c(-7, -3.30000000000001, -1.15000000000001, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/63x7g1393876379.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] [,7] [,8] [,9] [,10] [,11] [1,] 259.70 201.20 171.10 165.50 209.1 311.40 267.9 192.10 165.90 201.7 254.70 [2,] 281.75 212.95 178.15 169.65 241.4 318.95 285.0 205.30 169.05 236.3 256.60 [3,] 291.50 226.70 181.40 180.00 266.1 322.80 293.9 217.60 174.00 264.7 259.40 [4,] 312.00 241.10 193.55 189.55 284.6 325.75 313.1 239.15 180.80 271.3 262.45 [5,] 329.60 253.70 199.90 203.50 299.6 330.10 323.8 262.80 191.90 277.8 264.90 [,12] [,13] [1,] 261.7 NA [2,] 281.2 NA [3,] 292.1 NA [4,] 311.3 NA [5,] 339.7 NA $n [1] 15 15 15 15 15 15 15 15 15 15 15 15 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 279.1594 215.2161 175.1175 171.8817 248.4764 320.0259 282.4365 203.7907 [2,] 303.8406 238.1839 187.6825 188.1183 283.7236 325.5741 305.3635 231.4093 [,9] [,10] [,11] [,12] [,13] [1,] 169.2065 250.4216 257.0135 279.8206 NA [2,] 178.7935 278.9784 261.7865 304.3794 NA $out [1] 307.8 $group [1] 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" NA Warning message: In bxp(list(stats = c(259.7, 281.75, 291.5, 312, 329.6, 201.2, 212.95, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7q7u11393876379.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,] 246.6667 243.000 237.3750 [2,] 247.3583 251.925 240.1937 [3,] 247.7583 259.750 244.0250 [4,] 248.2667 263.950 250.0812 [5,] 248.6333 266.300 257.1125 $n [1] 15 15 15 $conf [,1] [,2] [,3] [1,] 247.3878 254.8444 239.9914 [2,] 248.1289 264.6556 248.0586 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(246.666666666667, 247.358333333333, 247.758333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1rrx61393876379.ps tmp/1rrx61393876379.png",intern=TRUE)) character(0) > try(system("convert tmp/2g1nj1393876379.ps tmp/2g1nj1393876379.png",intern=TRUE)) character(0) > try(system("convert tmp/3z4rq1393876379.ps tmp/3z4rq1393876379.png",intern=TRUE)) character(0) > try(system("convert tmp/4dnps1393876379.ps tmp/4dnps1393876379.png",intern=TRUE)) character(0) > try(system("convert tmp/5ut6a1393876379.ps tmp/5ut6a1393876379.png",intern=TRUE)) character(0) > try(system("convert tmp/63x7g1393876379.ps tmp/63x7g1393876379.png",intern=TRUE)) character(0) > try(system("convert tmp/7q7u11393876379.ps tmp/7q7u11393876379.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.455 1.099 6.574