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(0.69,0.69,0.68,0.66,0.65,0.65,0.65,0.65,0.65,0.66,0.68,0.72,0.73,0.75,0.69,0.65,0.64,0.64,0.64,0.64,0.65,0.65,0.67,0.7,0.69,0.7,0.71,0.69,0.69,0.69,0.69,0.69,0.7,0.7,0.7,0.74,0.72,0.74,0.69,0.66,0.66,0.66,0.66,0.66,0.66,0.67,0.7,0.72,0.71,0.7,0.71,0.67,0.7,0.69,0.69,0.69,0.69,0.69,0.71,0.75,0.74,0.75,0.72,0.64,0.65,0.64,0.64,0.64,0.64,0.65,0.66,0.7,0.68,0.69,0.68,0.67,0.68,0.68,0.68,0.68,0.68,0.7,0.69,0.75) > 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] 84 > (np <- floor(n / par1)) [1] 7 > 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] 7 7 7 7 7 7 7 7 7 7 7 7 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 0.69 0.73 0.69 0.72 0.71 0.74 0.68 NA [2,] 0.69 0.75 0.70 0.74 0.70 0.75 0.69 NA [3,] 0.68 0.69 0.71 0.69 0.71 0.72 0.68 NA [4,] 0.66 0.65 0.69 0.66 0.67 0.64 0.67 NA [5,] 0.65 0.64 0.69 0.66 0.70 0.65 0.68 NA [6,] 0.65 0.64 0.69 0.66 0.69 0.64 0.68 NA [7,] 0.65 0.64 0.69 0.66 0.69 0.64 0.68 NA [8,] 0.65 0.64 0.69 0.66 0.69 0.64 0.68 NA [9,] 0.65 0.65 0.70 0.66 0.69 0.64 0.68 NA [10,] 0.66 0.65 0.70 0.67 0.69 0.65 0.70 NA [11,] 0.68 0.67 0.70 0.70 0.71 0.66 0.69 NA [12,] 0.72 0.70 0.74 0.72 0.75 0.70 0.75 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 0.00 0.02 0.01 0.02 -0.01 0.01 0.01 NA [2,] -0.01 -0.06 0.01 -0.05 0.01 -0.03 -0.01 NA [3,] -0.02 -0.04 -0.02 -0.03 -0.04 -0.08 -0.01 NA [4,] -0.01 -0.01 0.00 0.00 0.03 0.01 0.01 NA [5,] 0.00 0.00 0.00 0.00 -0.01 -0.01 0.00 NA [6,] 0.00 0.00 0.00 0.00 0.00 0.00 0.00 NA [7,] 0.00 0.00 0.00 0.00 0.00 0.00 0.00 NA [8,] 0.00 0.01 0.01 0.00 0.00 0.00 0.00 NA [9,] 0.01 0.00 0.00 0.01 0.00 0.01 0.02 NA [10,] 0.02 0.02 0.00 0.03 0.02 0.01 -0.01 NA [11,] 0.04 0.03 0.04 0.02 0.04 0.04 0.06 NA [12,] 0.01 -0.01 -0.02 -0.01 -0.01 -0.02 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/fisher/rcomp/tmp/1kgdh1382037530.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/fisher/rcomp/tmp/2xsog1382037530.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/fisher/rcomp/tmp/3e6gp1382037530.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/fisher/rcomp/tmp/4mb481382037530.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] [,12] [1,] 0.680 0.690 0.680 0.640 0.640 0.640 0.640 0.640 0.640 0.650 0.660 0.700 [2,] 0.690 0.695 0.685 0.655 0.650 0.645 0.645 0.645 0.650 0.655 0.675 0.710 [3,] 0.710 0.700 0.690 0.660 0.660 0.660 0.660 0.660 0.660 0.670 0.690 0.720 [4,] 0.725 0.745 0.710 0.670 0.685 0.685 0.685 0.685 0.685 0.695 0.700 0.745 [5,] 0.740 0.750 0.720 0.690 0.700 0.690 0.690 0.690 0.700 0.700 0.710 0.750 $n [1] 7 7 7 7 7 7 7 7 7 7 7 7 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.6890986 0.6701408 0.6750704 0.6510422 0.6390986 0.6361126 0.6361126 [2,] 0.7309014 0.7298592 0.7049296 0.6689578 0.6809014 0.6838874 0.6838874 [,8] [,9] [,10] [,11] [,12] [1,] 0.6361126 0.6390986 0.6461126 0.6750704 0.6990986 [2,] 0.6838874 0.6809014 0.6938874 0.7049296 0.7409014 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0.68, 0.69, 0.71, 0.725, 0.74, 0.69, 0.695, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/5pebu1382037530.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] [1,] -0.010 -6.000000e-02 -0.04 -0.010 -0.010 0 0 0.000 0.00 -0.010 0.030 [2,] 0.005 -4.000000e-02 -0.04 -0.005 -0.005 0 0 0.000 0.00 0.005 0.035 [3,] 0.010 -1.000000e-02 -0.03 0.000 0.000 0 0 0.000 0.01 0.020 0.040 [4,] 0.015 5.551115e-17 -0.02 0.010 0.000 0 0 0.005 0.01 0.020 0.040 [5,] 0.020 1.000000e-02 -0.01 0.030 0.000 0 0 0.010 0.02 0.030 0.040 [,12] [1,] -0.02 [2,] -0.02 [3,] -0.01 [4,] -0.01 [5,] -0.01 $n [1] 7 7 7 7 7 7 7 7 7 7 7 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.004028161 -0.03388735 -0.04194368 -0.008957758 -0.002985919 0 0 [2,] 0.015971839 0.01388735 -0.01805632 0.008957758 0.002985919 0 0 [,8] [,9] [,10] [,11] [,12] [1,] -0.002985919 0.004028161 0.01104224 0.03701408 -0.016450323 [2,] 0.002985919 0.015971839 0.02895776 0.04298592 -0.003549677 $out [1] -0.08 0.02 0.06 0.01 $group [1] 3 11 11 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.01, 0.00499999999999995, 0.01, 0.015, 0.02, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/69wwd1382037530.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] [1,] 0.650 0.640 0.690 0.660 0.670 0.64 0.67 NA [2,] 0.650 0.640 0.690 0.660 0.690 0.64 0.68 NA [3,] 0.660 0.650 0.695 0.665 0.695 0.65 0.68 NA [4,] 0.685 0.695 0.700 0.710 0.710 0.71 0.69 NA [5,] 0.720 0.750 0.710 0.740 0.710 0.75 0.70 NA $n [1] 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 0.6440363 0.6249141 0.6904389 0.6421947 0.6858779 0.6180725 0.6754389 NA [2,] 0.6759637 0.6750859 0.6995611 0.6878053 0.7041221 0.6819275 0.6845611 NA $out [1] 0.74 0.75 0.75 $group [1] 3 5 7 $names [1] "1" "2" "3" "4" "5" "6" "7" NA Warning message: In bxp(list(stats = c(0.65, 0.65, 0.66, 0.685, 0.72, 0.64, 0.64, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/fisher/rcomp/tmp/7ynus1382037530.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,] 0.6628571 0.660 0.66250 [2,] 0.6642857 0.660 0.66500 [3,] 0.6707143 0.665 0.67125 [4,] 0.7028571 0.695 0.70250 [5,] 0.7257143 0.720 0.72750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 0.6531216 0.6490363 0.654146 [2,] 0.6883070 0.6809637 0.688354 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(0.662857142857143, 0.664285714285714, 0.670714285714286, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1kgdh1382037530.ps tmp/1kgdh1382037530.png",intern=TRUE)) character(0) > try(system("convert tmp/2xsog1382037530.ps tmp/2xsog1382037530.png",intern=TRUE)) character(0) > try(system("convert tmp/3e6gp1382037530.ps tmp/3e6gp1382037530.png",intern=TRUE)) character(0) > try(system("convert tmp/4mb481382037530.ps tmp/4mb481382037530.png",intern=TRUE)) character(0) > try(system("convert tmp/5pebu1382037530.ps tmp/5pebu1382037530.png",intern=TRUE)) character(0) > try(system("convert tmp/69wwd1382037530.ps tmp/69wwd1382037530.png",intern=TRUE)) character(0) > try(system("convert tmp/7ynus1382037530.ps tmp/7ynus1382037530.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.133 0.545 3.671