R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(10.93,10.92,10.89,10.94,10.98,10.99,11.02,11.04,11.05,11.05,11.02,10.91,11.01,11.02,11.03,11.04,11.06,11.08,11.06,11.06,11.09,11.07,11.06,11.08,11.08,11.08,11.11,11.09,11.08,11.05,11.07,11.06,11.06,11.07,11.02,11.01,11.04,11.02,11.03,11.17,11.19,11.15,11.13,11.06,11.01,11.03,10.99,10.94,11,11.06,11.06,11.05,11.04,11.15,11.2,11.16,11.3,11.23,11.25,11.25,11.12,11.14,11.17,11.25,11.27,11.34,11.39,11.44,11.46,11.49,11.51,11.48,11.49,11.52,11.56,11.58,11.58,11.58,11.6,11.62,11.62,11.64,11.67,11.66,11.72,11.82,11.9,12.04,12.08,12.15,12.19,12.22,12.23,12.25,12.26,12.27,12.34,12.38,12.42,12.43,12.48,12.5,12.5,12.49,12.46,12.45,12.45,12.38,12.42,12.37,12.35,12.35,12.36,12.32,12.32,12.34,12.35,12.34,12.31,12.24) > par1 = '12' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > par1 <- as.numeric(par1) > (n <- length(x)) [1] 120 > (np <- floor(n / par1)) [1] 10 > 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] 10 10 10 10 10 10 10 10 10 10 10 10 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 10.93 11.01 11.08 11.04 11.00 11.12 11.49 11.72 12.34 12.42 NA [2,] 10.92 11.02 11.08 11.02 11.06 11.14 11.52 11.82 12.38 12.37 NA [3,] 10.89 11.03 11.11 11.03 11.06 11.17 11.56 11.90 12.42 12.35 NA [4,] 10.94 11.04 11.09 11.17 11.05 11.25 11.58 12.04 12.43 12.35 NA [5,] 10.98 11.06 11.08 11.19 11.04 11.27 11.58 12.08 12.48 12.36 NA [6,] 10.99 11.08 11.05 11.15 11.15 11.34 11.58 12.15 12.50 12.32 NA [7,] 11.02 11.06 11.07 11.13 11.20 11.39 11.60 12.19 12.50 12.32 NA [8,] 11.04 11.06 11.06 11.06 11.16 11.44 11.62 12.22 12.49 12.34 NA [9,] 11.05 11.09 11.06 11.01 11.30 11.46 11.62 12.23 12.46 12.35 NA [10,] 11.05 11.07 11.07 11.03 11.23 11.49 11.64 12.25 12.45 12.34 NA [11,] 11.02 11.06 11.02 10.99 11.25 11.51 11.67 12.26 12.45 12.31 NA [12,] 10.91 11.08 11.01 10.94 11.25 11.48 11.66 12.27 12.38 12.24 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] -0.01 0.01 0.00 -0.02 0.06 0.02 0.03 0.10 0.04 -0.05 NA [2,] -0.03 0.01 0.03 0.01 0.00 0.03 0.04 0.08 0.04 -0.02 NA [3,] 0.05 0.01 -0.02 0.14 -0.01 0.08 0.02 0.14 0.01 0.00 NA [4,] 0.04 0.02 -0.01 0.02 -0.01 0.02 0.00 0.04 0.05 0.01 NA [5,] 0.01 0.02 -0.03 -0.04 0.11 0.07 0.00 0.07 0.02 -0.04 NA [6,] 0.03 -0.02 0.02 -0.02 0.05 0.05 0.02 0.04 0.00 0.00 NA [7,] 0.02 0.00 -0.01 -0.07 -0.04 0.05 0.02 0.03 -0.01 0.02 NA [8,] 0.01 0.03 0.00 -0.05 0.14 0.02 0.00 0.01 -0.03 0.01 NA [9,] 0.00 -0.02 0.01 0.02 -0.07 0.03 0.02 0.02 -0.01 -0.01 NA [10,] -0.03 -0.01 -0.05 -0.04 0.02 0.02 0.03 0.01 0.00 -0.03 NA [11,] -0.11 0.02 -0.01 -0.05 0.00 -0.03 -0.01 0.01 -0.07 -0.07 NA [12,] 0.10 0.00 0.03 0.06 -0.13 0.01 0.06 0.07 0.04 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/1zmhe1321612828.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/2lvmy1321612828.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/30kvf1321612828.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/4j5xu1321612828.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,] 10.93 10.92 10.89 10.94 10.98 10.990 11.020 11.04 11.01 11.03 10.99 10.910 [2,] 11.01 11.02 11.03 11.05 11.06 11.080 11.070 11.06 11.06 11.07 11.02 11.010 [3,] 11.10 11.11 11.14 11.21 11.23 11.245 11.295 11.30 11.38 11.36 11.38 11.365 [4,] 11.72 11.82 11.90 12.04 12.08 12.150 12.190 12.22 12.23 12.25 12.26 12.240 [5,] 12.42 12.38 12.42 12.43 12.48 12.500 12.500 12.49 12.46 12.45 12.45 12.380 $n [1] 10 10 10 10 10 10 10 10 10 10 10 10 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 10.74526 10.71029 10.70531 10.71536 10.72037 10.71039 10.7354 10.72042 [2,] 11.45474 11.50971 11.57469 11.70464 11.73963 11.77961 11.8546 11.87958 [,9] [,10] [,11] [,12] [1,] 10.79542 10.77042 10.76045 10.75044 [2,] 11.96458 11.94958 11.99955 11.97956 $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(10.93, 11.01, 11.1, 11.72, 12.42, 10.92, 11.02, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/50ca91321612828.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.050 -0.03 -0.020 -0.01 -0.040 -0.02 -0.04 -0.03 -0.020 -0.050 -0.11 [2,] -0.010 0.00 0.000 0.00 -0.030 0.00 -0.01 0.00 -0.010 -0.030 -0.07 [3,] 0.015 0.02 0.015 0.02 0.015 0.02 0.01 0.01 0.005 -0.005 -0.02 [4,] 0.040 0.04 0.080 0.04 0.070 0.04 0.02 0.02 0.020 0.020 0.00 [5,] 0.100 0.08 0.140 0.05 0.110 0.05 0.05 0.03 0.030 0.030 0.02 [,12] [1,] 0.00 [2,] 0.01 [3,] 0.04 [4,] 0.06 [5,] 0.10 $n [1] 10 10 10 10 10 10 10 10 10 10 10 9 $conf [,1] [,2] [,3] [,4] [,5] [1,] -0.009981994 1.440519e-05 -0.02497119 1.440519e-05 -0.03496399 [2,] 0.039981994 3.998559e-02 0.05497119 3.998559e-02 0.06496399 [,6] [,7] [,8] [,9] [,10] [1,] 1.440519e-05 -0.004989196 7.202594e-06 -0.009989196 -0.02998199 [2,] 3.998559e-02 0.024989196 1.999280e-02 0.019989196 0.01998199 [,11] [,12] [1,] -0.05497479 0.01366667 [2,] 0.01497479 0.06633333 $out [1] -0.07 -0.05 0.14 -0.07 -0.13 $group [1] 7 8 8 9 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-0.0500000000000007, -0.00999999999999979, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/6q4f41321612828.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,] 10.890 11.010 11.020 10.940 11.000 11.120 11.49 11.72 12.340 12.310 NA [2,] 10.925 11.035 11.055 11.015 11.055 11.210 11.57 11.97 12.400 12.320 NA [3,] 10.985 11.060 11.070 11.035 11.155 11.365 11.59 12.17 12.450 12.345 NA [4,] 11.030 11.075 11.080 11.140 11.240 11.470 11.63 12.24 12.485 12.355 NA [5,] 11.050 11.090 11.110 11.190 11.300 11.510 11.67 12.27 12.500 12.370 NA $n [1] 12 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 10.93711 11.04176 11.0586 10.97799 11.07062 11.24641 11.56263 12.04685 [2,] 11.03289 11.07824 11.0814 11.09201 11.23938 11.48359 11.61737 12.29315 [,9] [,10] [,11] [1,] 12.41123 12.32904 NA [2,] 12.48877 12.36096 NA $out [1] 11.01 12.42 12.24 $group [1] 3 10 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(10.89, 10.925, 10.985, 11.03, 11.05, 11.01, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/784371321612828.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,] 11.4150 11.1000 11.34000 [2,] 11.4730 11.1750 11.45937 [3,] 11.5265 11.2700 11.55687 [4,] 11.5515 11.3625 11.56813 [5,] 11.5630 11.3800 11.58375 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 11.4907 11.18448 11.50727 [2,] 11.5623 11.35552 11.60648 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(11.415, 11.473, 11.5265, 11.5515, 11.563, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/1zmhe1321612828.ps tmp/1zmhe1321612828.png",intern=TRUE)) character(0) > try(system("convert tmp/2lvmy1321612828.ps tmp/2lvmy1321612828.png",intern=TRUE)) character(0) > try(system("convert tmp/30kvf1321612828.ps tmp/30kvf1321612828.png",intern=TRUE)) character(0) > try(system("convert tmp/4j5xu1321612828.ps tmp/4j5xu1321612828.png",intern=TRUE)) character(0) > try(system("convert tmp/50ca91321612828.ps tmp/50ca91321612828.png",intern=TRUE)) character(0) > try(system("convert tmp/6q4f41321612828.ps tmp/6q4f41321612828.png",intern=TRUE)) character(0) > try(system("convert tmp/784371321612828.ps tmp/784371321612828.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.669 0.359 2.099