R version 3.2.2 (2015-08-14) -- "Fire Safety" Copyright (C) 2015 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(92.44,94.36,93.42,92.97,94.83,91.47,88.42,86.36,86.01,87.87,89.81,88.41,86.33,89.64,89.53,88.3,99.49,98.81,90.97,92.58,92.98,95,92.47,88.65,84.81,88.6,89.31,92.34,91.53,96.95,95.44,89.59,89.86,91.66,92.7,90.54,86.17,89.15,89.73,91.07,93.36,96.27,95,94.72,97.16,100.92,98.66,95.87,94.6,98.41,98.05,99.82,106.96,107.45,100.25,99.28,101.38,101,97.43,95.38,95.17,94.13,96.43,105.38,98.39,99.8,94.43,90.16,85.49,90.57,88.22,89.66) > 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,] 92.44 86.33 84.81 86.17 94.60 95.17 NA [2,] 94.36 89.64 88.60 89.15 98.41 94.13 NA [3,] 93.42 89.53 89.31 89.73 98.05 96.43 NA [4,] 92.97 88.30 92.34 91.07 99.82 105.38 NA [5,] 94.83 99.49 91.53 93.36 106.96 98.39 NA [6,] 91.47 98.81 96.95 96.27 107.45 99.80 NA [7,] 88.42 90.97 95.44 95.00 100.25 94.43 NA [8,] 86.36 92.58 89.59 94.72 99.28 90.16 NA [9,] 86.01 92.98 89.86 97.16 101.38 85.49 NA [10,] 87.87 95.00 91.66 100.92 101.00 90.57 NA [11,] 89.81 92.47 92.70 98.66 97.43 88.22 NA [12,] 88.41 88.65 90.54 95.87 95.38 89.66 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.92 3.31 3.79 2.98 3.81 -1.04 NA [2,] -0.94 -0.11 0.71 0.58 -0.36 2.30 NA [3,] -0.45 -1.23 3.03 1.34 1.77 8.95 NA [4,] 1.86 11.19 -0.81 2.29 7.14 -6.99 NA [5,] -3.36 -0.68 5.42 2.91 0.49 1.41 NA [6,] -3.05 -7.84 -1.51 -1.27 -7.20 -5.37 NA [7,] -2.06 1.61 -5.85 -0.28 -0.97 -4.27 NA [8,] -0.35 0.40 0.27 2.44 2.10 -4.67 NA [9,] 1.86 2.02 1.80 3.76 -0.38 5.08 NA [10,] 1.94 -2.53 1.04 -2.26 -3.57 -2.35 NA [11,] -1.40 -3.82 -2.16 -2.79 -2.05 1.44 NA [12,] -2.08 -3.84 -4.37 -1.27 -0.21 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/1ivoo1445625917.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/2udas1445625917.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/3igq61445625917.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/46hjc1445625917.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] [1,] 84.810 88.600 89.310 88.300 91.53 91.47 88.420 86.36 85.49 87.87 [2,] 86.170 89.150 89.530 91.070 93.36 96.27 90.970 89.59 86.01 90.57 [3,] 89.385 91.885 91.575 92.655 96.61 97.88 94.715 91.37 91.42 93.33 [4,] 94.600 94.360 96.430 99.820 99.49 99.80 95.440 94.72 97.16 100.92 [5,] 95.170 98.410 98.050 105.380 106.96 99.80 100.250 99.28 101.38 101.00 [,11] [,12] [1,] 88.220 88.41 [2,] 89.810 88.65 [3,] 92.585 90.10 [4,] 97.430 95.38 [5,] 98.660 95.87 $n [1] 6 6 6 6 6 6 6 6 6 6 6 6 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 83.94738 88.52438 87.12428 87.01097 92.65595 95.60304 91.83171 88.06098 [2,] 94.82262 95.24562 96.02572 98.29903 100.56405 100.15696 97.59829 94.67902 [,9] [,10] [,11] [,12] [1,] 84.22789 86.65392 87.66985 85.75893 [2,] 98.61211 100.00608 97.50015 94.44107 $out [1] 107.45 $group [1] 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(84.81, 86.17, 89.385, 94.6, 95.17, 88.6, 89.15, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5gutx1445625917.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,] 1.920 -0.940 -1.230 -6.990 -3.36 -7.84 -5.850 -0.350 -0.38 -3.570 -3.820 [2,] 1.920 -0.360 -0.450 -0.810 -0.68 -7.20 -4.270 -0.350 1.80 -2.530 -2.790 [3,] 3.145 0.235 1.555 2.075 0.95 -4.21 -1.515 0.335 1.94 -2.305 -2.105 [4,] 3.790 0.710 3.030 7.140 2.91 -1.51 -0.280 2.100 3.76 1.040 -1.400 [5,] 3.810 2.300 3.030 11.190 5.42 -1.27 1.610 2.440 5.08 1.940 -1.400 [,12] [1,] -4.37 [2,] -3.84 [3,] -2.08 [4,] -1.27 [5,] -0.21 $n [1] 6 6 6 6 6 6 6 6 6 6 6 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1.93879 -0.4551846 -0.6897124 -3.053007 -1.365666 -7.8802338 -4.088679 [2,] 4.35121 0.9251846 3.7997124 7.203007 3.265666 -0.5397662 1.058679 [,8] [,9] [,10] [,11] [,12] [1,] -1.245329 0.6757367 -4.607765307 -3.001595 -3.8959555 [2,] 1.915329 3.2042633 -0.002234693 -1.208405 -0.2640445 $out [1] -1.04 8.95 -4.67 1.44 $group [1] 1 3 8 11 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1.92, 1.92, 3.145, 3.78999999999999, 3.81, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6ozg21445625917.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,] 86.010 86.33 88.600 86.170 94.60 85.49 NA [2,] 88.140 89.09 89.450 90.400 97.74 89.91 NA [3,] 90.640 91.72 91.035 94.860 99.55 94.28 NA [4,] 93.195 93.99 92.520 96.715 101.19 97.41 NA [5,] 94.830 99.49 96.950 100.920 101.38 105.38 NA $n [1] 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 88.33438 89.48508 89.63475 91.97969 97.97643 90.8592 NA [2,] 92.94562 93.95492 92.43525 97.74031 101.12357 97.7008 NA $out [1] 84.81 106.96 107.45 $group [1] 3 5 5 $names [1] "1" "2" "3" "4" "5" "6" NA Warning message: In bxp(list(stats = c(86.01, 88.14, 90.64, 93.195, 94.83, 86.33, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/736em1445625917.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,] 89.92000 89.3850 90.13500 [2,] 92.13083 91.3950 91.66563 [3,] 92.98000 92.2350 92.99500 [4,] 94.74167 94.0225 94.94437 [5,] 98.45833 97.8800 97.99625 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 91.78918 91.03658 91.49954 [2,] 94.17082 93.43342 94.49046 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(89.92, 92.1308333333333, 92.98, 94.7416666666667, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1ivoo1445625917.ps tmp/1ivoo1445625917.png",intern=TRUE)) character(0) > try(system("convert tmp/2udas1445625917.ps tmp/2udas1445625917.png",intern=TRUE)) character(0) > try(system("convert tmp/3igq61445625917.ps tmp/3igq61445625917.png",intern=TRUE)) character(0) > try(system("convert tmp/46hjc1445625917.ps tmp/46hjc1445625917.png",intern=TRUE)) character(0) > try(system("convert tmp/5gutx1445625917.ps tmp/5gutx1445625917.png",intern=TRUE)) character(0) > try(system("convert tmp/6ozg21445625917.ps tmp/6ozg21445625917.png",intern=TRUE)) character(0) > try(system("convert tmp/736em1445625917.ps tmp/736em1445625917.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.692 0.448 3.170