R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 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(74.16,73.21,77.14,80.9,82.76,83.33,81.94,82.38,82.81,83.17,84.07,87.33,90.75,92.82,97.78,99.32,98.33,98.66,98.13,97.8,99.36,100.37,103.22,101.68,104.39,103.99,106.71,106.06,103.5,100.17,101.1,105.93,108.09,107.27,104.9,102.7,102.06,103.05,102.08,100.13,97.56,97.38,99.66,99.58,102.7,98.92,97.85,99.01,97.71,97.95,97.24,96.69,96.41,96.99,98.36,97.8,96.79,94.73,92.67,87.15,79.54,82.35,86.38,84.75,87.54,86.73,84.74,80.75,79.28,78.52,78.54,77.33) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.327 (Mon, 30 Nov 2015 07:01:18 +0000) > #Author: root > #To cite this work: Wessa P., (2015), Mean Plot (v1.0.5) 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) > x <- na.omit(x) > (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,] 74.16 90.75 104.39 102.06 97.71 79.54 NA [2,] 73.21 92.82 103.99 103.05 97.95 82.35 NA [3,] 77.14 97.78 106.71 102.08 97.24 86.38 NA [4,] 80.90 99.32 106.06 100.13 96.69 84.75 NA [5,] 82.76 98.33 103.50 97.56 96.41 87.54 NA [6,] 83.33 98.66 100.17 97.38 96.99 86.73 NA [7,] 81.94 98.13 101.10 99.66 98.36 84.74 NA [8,] 82.38 97.80 105.93 99.58 97.80 80.75 NA [9,] 82.81 99.36 108.09 102.70 96.79 79.28 NA [10,] 83.17 100.37 107.27 98.92 94.73 78.52 NA [11,] 84.07 103.22 104.90 97.85 92.67 78.54 NA [12,] 87.33 101.68 102.70 99.01 87.15 77.33 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.95 2.07 -0.40 0.99 0.24 2.81 NA [2,] 3.93 4.96 2.72 -0.97 -0.71 4.03 NA [3,] 3.76 1.54 -0.65 -1.95 -0.55 -1.63 NA [4,] 1.86 -0.99 -2.56 -2.57 -0.28 2.79 NA [5,] 0.57 0.33 -3.33 -0.18 0.58 -0.81 NA [6,] -1.39 -0.53 0.93 2.28 1.37 -1.99 NA [7,] 0.44 -0.33 4.83 -0.08 -0.56 -3.99 NA [8,] 0.43 1.56 2.16 3.12 -1.01 -1.47 NA [9,] 0.36 1.01 -0.82 -3.78 -2.06 -0.76 NA [10,] 0.90 2.85 -2.37 -1.07 -2.06 0.02 NA [11,] 3.26 -1.54 -2.20 1.16 -5.52 -1.21 NA [12,] 3.42 2.71 -0.64 -1.30 -7.61 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/1maz51489658858.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/2vejt1489658858.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/3vk091489658858.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/4do1j1489658858.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] [1,] 74.16 73.210 77.14 80.900 82.760 83.330 81.940 80.75 79.280 [2,] 79.54 82.350 86.38 84.750 87.540 86.730 84.740 82.38 82.810 [3,] 94.23 95.385 97.51 98.005 96.985 97.185 98.245 97.80 98.075 [4,] 102.06 103.050 102.08 100.130 98.330 98.660 99.660 99.58 102.700 [5,] 104.39 103.990 106.71 106.060 103.500 100.170 101.100 105.93 108.090 [,10] [,11] [,12] [1,] 78.520 78.54 77.33 [2,] 83.170 84.07 87.15 [3,] 96.825 95.26 93.17 [4,] 100.370 103.22 101.68 [5,] 107.270 104.90 102.70 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 79.70387 82.03283 87.38299 88.0844 90.0251 89.48976 88.62112 [2,] 108.75613 108.73717 107.63701 107.9256 103.9449 104.88024 107.86888 [,8] [,9] [,10] [,11] [,12] [1,] 86.70544 85.24531 85.73044 82.90763 83.79768 [2,] 108.89456 110.90469 107.91956 107.61237 102.54232 $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(74.16, 79.54, 94.23, 102.06, 104.39, 73.21, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5v6uk1489658858.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.950 -0.970 -1.95 -2.570 -0.810 -1.99 -0.560 -1.470 -3.78 -2.370 -5.520 [2,] -0.400 -0.710 -1.63 -2.560 -0.810 -1.39 -0.560 -1.010 -2.06 -2.060 -2.200 [3,] 0.615 3.325 -0.60 -0.635 0.075 0.20 -0.205 0.995 -0.79 -0.525 -1.375 [4,] 2.070 4.030 1.54 1.860 0.570 1.37 0.440 2.160 0.36 0.900 1.160 [5,] 2.810 4.960 3.76 2.790 0.580 2.28 0.440 3.120 1.01 2.850 3.260 [,12] [1,] -1.30 [2,] -1.30 [3,] -0.64 [4,] 2.71 [5,] 3.42 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -0.9782298 0.2675469 -2.644752 -3.486043 -0.8151446 -1.580289 -0.8500323 [2,] 2.2082298 6.3824531 1.444752 2.216043 0.9651446 1.980289 0.4400323 [,8] [,9] [,10] [,11] [,12] [1,] -1.049752 -2.3509782 -2.434296 -3.5423085 -3.473456 [2,] 3.039752 0.7709782 1.384296 0.7923085 2.193456 $out [1] -3.33 4.83 -3.99 -7.61 $group [1] 5 7 7 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.950000000000003, -0.400000000000006, 0.615000000000002, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6o9mg1489658858.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,] 73.21 97.780 100.170 97.380 92.670 77.330 NA [2,] 79.02 97.790 103.100 98.385 95.570 78.910 NA [3,] 82.57 98.495 104.645 99.620 96.890 81.550 NA [4,] 83.25 99.865 106.385 102.070 97.755 85.565 NA [5,] 87.33 101.680 108.090 103.050 98.360 87.540 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 80.64067 97.54858 103.1467 97.93925 95.89341 78.51461 NA [2,] 84.49933 99.44142 106.1433 101.30075 97.88659 84.58539 NA $out [1] 90.75 92.82 103.22 87.15 $group [1] 2 2 2 5 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(73.21, 79.02, 82.57, 83.25, 87.33, 97.78, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7cu3g1489658858.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,] 91.43500 93.1700 92.68500 [2,] 93.03750 95.3225 93.20250 [3,] 93.93250 97.0850 93.82438 [4,] 94.45250 97.9025 94.06688 [5,] 94.83833 98.2450 95.05000 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 93.28711 95.90824 93.43013 [2,] 94.57789 98.26176 94.21862 $out [1] 91.6575 $group [1] 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(91.435, 93.0375, 93.9325, 94.4525, 94.8383333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1maz51489658858.ps tmp/1maz51489658858.png",intern=TRUE)) character(0) > try(system("convert tmp/2vejt1489658858.ps tmp/2vejt1489658858.png",intern=TRUE)) character(0) > try(system("convert tmp/3vk091489658858.ps tmp/3vk091489658858.png",intern=TRUE)) character(0) > try(system("convert tmp/4do1j1489658858.ps tmp/4do1j1489658858.png",intern=TRUE)) character(0) > try(system("convert tmp/5v6uk1489658858.ps tmp/5v6uk1489658858.png",intern=TRUE)) character(0) > try(system("convert tmp/6o9mg1489658858.ps tmp/6o9mg1489658858.png",intern=TRUE)) character(0) > try(system("convert tmp/7cu3g1489658858.ps tmp/7cu3g1489658858.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.712 0.195 2.972