R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-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(564410,658506,574787,611567,565210,638288,524970,505151,605350,517957,510879,622942,459903,486911,545974,481494,492324,609265,573243,524622,540071,564556,465319,458048,492603,606596,776475,749810,832426,895273,643875,348031,301771,411429,350941,425245,447041,449723,514318,445044,532552,469484,442289,532681,524463,590857,487590,612157,598030,577042,755394,697253,476835,510995,527816,482667,531528,628748,472131,445430,551715,561949,769474,583410,480271,576444,550457,534892,541769,741041,482062,586176) > 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] 72 > (np <- floor(n / par1)) [1] 6 > 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 6 6 6 6 6 6 6 6 6 6 6 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 564410 459903 492603 447041 598030 551715 NA [2,] 658506 486911 606596 449723 577042 561949 NA [3,] 574787 545974 776475 514318 755394 769474 NA [4,] 611567 481494 749810 445044 697253 583410 NA [5,] 565210 492324 832426 532552 476835 480271 NA [6,] 638288 609265 895273 469484 510995 576444 NA [7,] 524970 573243 643875 442289 527816 550457 NA [8,] 505151 524622 348031 532681 482667 534892 NA [9,] 605350 540071 301771 524463 531528 541769 NA [10,] 517957 564556 411429 590857 628748 741041 NA [11,] 510879 465319 350941 487590 472131 482062 NA [12,] 622942 458048 425245 612157 445430 586176 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 94096 27008 113993 2682 -20988 10234 NA [2,] -83719 59063 169879 64595 178352 207525 NA [3,] 36780 -64480 -26665 -69274 -58141 -186064 NA [4,] -46357 10830 82616 87508 -220418 -103139 NA [5,] 73078 116941 62847 -63068 34160 96173 NA [6,] -113318 -36022 -251398 -27195 16821 -25987 NA [7,] -19819 -48621 -295844 90392 -45149 -15565 NA [8,] 100199 15449 -46260 -8218 48861 6877 NA [9,] -87393 24485 109658 66394 97220 199272 NA [10,] -7078 -99237 -60488 -103267 -156617 -258979 NA [11,] 112063 -7271 74304 124567 -26701 104114 NA [12,] -163039 34555 21796 -14127 106285 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/1igno1412778088.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/2j6tx1412778088.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/3gq971412778088.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/4il661412778088.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] [1,] 447041 449723.0 514318.0 445044.0 476835 469484.0 524970.0 482667.0 [2,] 459903 486911.0 545974.0 481494.0 480271 510995.0 524970.0 482667.0 [3,] 522159 569495.5 665090.5 597488.5 512438 592854.5 539136.5 514886.5 [4,] 564410 606596.0 769474.0 697253.0 565210 638288.0 573243.0 532681.0 [5,] 598030 658506.0 776475.0 749810.0 565210 638288.0 643875.0 534892.0 [,9] [,10] [,11] [,12] [1,] 524463.0 411429.0 465319.0 425245 [2,] 524463.0 517957.0 465319.0 445430 [3,] 535799.5 577706.5 477096.5 522112 [4,] 541769.0 628748.0 487590.0 612157 [5,] 541769.0 741041.0 510879.0 622942 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 454748.6 492294.8 520925.8 458317 457649.6 510746.4 507998.9 482625.9 [2,] 589569.4 646696.2 809255.2 736660 567226.4 674962.6 570274.1 547147.1 [,9] [,10] [,11] [,12] [1,] 524636.6 506242.7 462731 414567.7 [2,] 546962.4 649170.3 491462 629656.3 $out [1] 832426 895273 442289 348031 605350 301771 350941 $group [1] 5 6 7 8 9 9 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(447041, 459903, 522159, 564410, 598030, 449723, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/52xvr1412778088.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] [1,] -20988 -83719 -69274.0 -220418.0 34160.0 -113318.0 -48621 -46260 -87393 [2,] 2682 59063 -69274.0 -103139.0 34160.0 -113318.0 -48621 -8218 24485 [3,] 18621 117237 -61310.5 -17763.5 67962.5 -31608.5 -32484 11163 81807 [4,] 94096 178352 -26665.0 82616.0 96173.0 -25987.0 -15565 48861 109658 [5,] 113993 207525 36780.0 87508.0 116941.0 16821.0 -15565 100199 199272 [,10] [,11] [,12] [1,] -258979 -26701 -14127 [2,] -156617 -7271 -14127 [3,] -101252 89209 21796 [4,] -60488 112063 34555 [5,] -7078 124567 106285 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -40343.98 40291.74 -88794.68 -137581.5 27962.11 -87939.82 -53806.19 [2,] 77585.98 194182.26 -33826.32 102054.5 107962.89 24722.82 -11161.81 [,8] [,9] [,10] [,11] [,12] [1,] -25654.8 26867.66 -163258.31 12234.72 -12602.58 [2,] 47980.8 136746.34 -39245.69 166183.28 56194.58 $out [1] -186064 -63068 -251398 -295844 90392 -163039 $group [1] 3 5 6 7 7 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-20988, 2682, 18621, 94096, 113993, -83719, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6opb31412778088.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] [1,] 505151.0 458048.0 301771.0 442289.0 445430 480271.0 NA [2,] 521463.5 473406.5 381185.0 448382.0 479751 538330.5 NA [3,] 569998.5 508473.0 549599.5 500954.0 529672 556832.0 NA [4,] 617254.5 555265.0 763142.5 532616.5 613389 584793.0 NA [5,] 658506.0 609265.0 895273.0 612157.0 755394 586176.0 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 526307.6 471136.8 375386.1 462534.1 468718.8 535640.1 NA [2,] 613689.4 545809.2 723812.9 539373.9 590625.2 578023.9 NA $out [1] 769474 741041 $group [1] 6 6 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(505151, 521463.5, 569998.5, 617254.5, 658506, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7dkjh1412778088.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,] 461487.0 477096.5 476615.0 [2,] 513221.2 518499.2 517411.0 [3,] 550281.4 537468.0 540200.4 [4,] 585263.8 585280.5 576817.9 [5,] 656070.3 665090.5 659565.6 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 517422.3 507008.6 513104.6 [2,] 583140.6 567927.4 567296.3 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(461487, 513221.166666667, 550281.416666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1igno1412778088.ps tmp/1igno1412778088.png",intern=TRUE)) character(0) > try(system("convert tmp/2j6tx1412778088.ps tmp/2j6tx1412778088.png",intern=TRUE)) character(0) > try(system("convert tmp/3gq971412778088.ps tmp/3gq971412778088.png",intern=TRUE)) character(0) > try(system("convert tmp/4il661412778088.ps tmp/4il661412778088.png",intern=TRUE)) character(0) > try(system("convert tmp/52xvr1412778088.ps tmp/52xvr1412778088.png",intern=TRUE)) character(0) > try(system("convert tmp/6opb31412778088.ps tmp/6opb31412778088.png",intern=TRUE)) character(0) > try(system("convert tmp/7dkjh1412778088.ps tmp/7dkjh1412778088.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.642 0.445 3.117