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(1220,1250,1350,1380,1310,1350,1360,1230,1330,1330,1380,1340,1220,1230,1400,1320,1320,1380,1340,1220,1310,1280,1330,1350,1240,1260,1340,1270,1330,1440,1350,1220,1310,1350,1300,1410,1260,1210,1410,1240,1360,1420,1310,1360,1260,1410,1330,1400,1240,1280,1460,1250,1340,1440,1170,1420,1250,1390,1260,1390,1290,1310,1540,1250,1320,1430,1080,1370,1290,1380,1260,1400,1250,1290,1550,1200,1320,1500,1060,1220,1260,1270,1280,1350,1320,1350,1530,1150,1270,1460,1000,1290,1330,1180,1350,1300,1350,1350,1540,1180,1280,1520,960,1420,1370,1210,1320,1260) > 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] 108 > (np <- floor(n / par1)) [1] 9 > 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] 9 9 9 9 9 9 9 9 9 9 9 9 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1220 1220 1240 1260 1240 1290 1250 1320 1350 NA [2,] 1250 1230 1260 1210 1280 1310 1290 1350 1350 NA [3,] 1350 1400 1340 1410 1460 1540 1550 1530 1540 NA [4,] 1380 1320 1270 1240 1250 1250 1200 1150 1180 NA [5,] 1310 1320 1330 1360 1340 1320 1320 1270 1280 NA [6,] 1350 1380 1440 1420 1440 1430 1500 1460 1520 NA [7,] 1360 1340 1350 1310 1170 1080 1060 1000 960 NA [8,] 1230 1220 1220 1360 1420 1370 1220 1290 1420 NA [9,] 1330 1310 1310 1260 1250 1290 1260 1330 1370 NA [10,] 1330 1280 1350 1410 1390 1380 1270 1180 1210 NA [11,] 1380 1330 1300 1330 1260 1260 1280 1350 1320 NA [12,] 1340 1350 1410 1400 1390 1400 1350 1300 1260 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 30 10 20 -50 40 20 40 30 0 NA [2,] 100 170 80 200 180 230 260 180 190 NA [3,] 30 -80 -70 -170 -210 -290 -350 -380 -360 NA [4,] -70 0 60 120 90 70 120 120 100 NA [5,] 40 60 110 60 100 110 180 190 240 NA [6,] 10 -40 -90 -110 -270 -350 -440 -460 -560 NA [7,] -130 -120 -130 50 250 290 160 290 460 NA [8,] 100 90 90 -100 -170 -80 40 40 -50 NA [9,] 0 -30 40 150 140 90 10 -150 -160 NA [10,] 50 50 -50 -80 -130 -120 10 170 110 NA [11,] -40 20 110 70 130 140 70 -50 -60 NA [12,] -120 -110 -150 -160 -100 -150 -30 50 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/19ht31312379103.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/2oqcu1312379103.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/3tgsy1312379103.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/45e3z1312379103.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,] 1220 1210 1340 1150 1280 1380 960 1220 1250 1180 1260 1260 [2,] 1240 1250 1400 1200 1310 1420 1060 1220 1260 1270 1280 1340 [3,] 1250 1280 1460 1250 1320 1440 1170 1290 1310 1330 1320 1350 [4,] 1290 1310 1540 1270 1330 1460 1340 1370 1330 1380 1330 1400 [5,] 1350 1350 1550 1320 1360 1520 1360 1420 1370 1410 1380 1410 $n [1] 9 9 9 9 9 9 9 9 9 9 9 9 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 1223.667 1248.4 1386.267 1213.133 1309.467 1418.933 1022.533 1211 1273.133 [2,] 1276.333 1311.6 1533.733 1286.867 1330.533 1461.067 1317.467 1369 1346.867 [,10] [,11] [,12] [1,] 1272.067 1293.667 1318.4 [2,] 1387.933 1346.333 1381.6 $out [1] 1380 1270 1350 $group [1] 4 5 6 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1220, 1240, 1250, 1290, 1350, 1210, 1250, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/5fkbj1312379103.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] [,12] [1,] 0 170 -380 0 40 -560 -130 -170 -160 -130 -60 -160 [2,] 10 170 -350 60 60 -440 -120 -80 -30 -80 -40 -150 [3,] 20 180 -210 90 110 -270 160 40 10 10 70 -115 [4,] 30 200 -80 120 180 -90 290 90 90 50 110 -65 [5,] 40 230 30 120 240 10 460 100 150 170 140 50 $n [1] 9 9 9 9 9 9 9 9 9 9 9 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 9.466667 164.2 -352.2 58.4 46.8 -454.33333 -55.93333 -49.53333 -53.2 [2,] 30.533333 195.8 -67.8 121.6 173.2 -85.66667 375.93333 129.53333 73.2 [,10] [,11] [,12] [1,] -58.46667 -9 -162.48222 [2,] 78.46667 149 -67.51778 $out [1] -50 100 80 260 -70 $group [1] 1 2 2 2 4 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(0, 10, 20, 30, 40, 170, 170, 180, 200, 230, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/68fzc1312379103.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] [1,] 1220 1220 1220 1210 1170 1250 1200 1150 1180 NA [2,] 1280 1255 1265 1260 1250 1275 1235 1225 1235 NA [3,] 1335 1320 1320 1345 1310 1315 1275 1310 1335 NA [4,] 1355 1345 1350 1405 1405 1390 1335 1350 1395 NA [5,] 1380 1400 1440 1420 1460 1540 1350 1530 1540 NA $n [1] 12 12 12 12 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1300.792 1278.95 1281.231 1278.865 1239.303 1262.548 1229.389 1252.987 [2,] 1369.208 1361.05 1358.769 1411.135 1380.697 1367.452 1320.611 1367.013 [,9] [,10] [1,] 1262.023 NA [2,] 1407.977 NA $out [1] 1080 1550 1500 1060 1000 960 $group [1] 6 7 7 7 8 9 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" NA Warning message: In bxp(list(stats = c(1220, 1280, 1335, 1355, 1380, 1220, 1255, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/7i0y41312379103.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,] 1181.111 1170 1200.0 [2,] 1273.333 1265 1272.5 [3,] 1308.333 1315 1300.0 [4,] 1336.111 1340 1347.5 [5,] 1355.556 1440 1440.0 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1279.700 1280.792 1265.792 [2,] 1336.967 1349.208 1334.208 $out [1] 1457.778 1437.778 1460.000 1470.000 $group [1] 1 1 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(1181.11111111111, 1273.33333333333, 1308.33333333333, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > try(system("convert tmp/19ht31312379103.ps tmp/19ht31312379103.png",intern=TRUE)) character(0) > try(system("convert tmp/2oqcu1312379103.ps tmp/2oqcu1312379103.png",intern=TRUE)) character(0) > try(system("convert tmp/3tgsy1312379103.ps tmp/3tgsy1312379103.png",intern=TRUE)) character(0) > try(system("convert tmp/45e3z1312379103.ps tmp/45e3z1312379103.png",intern=TRUE)) character(0) > try(system("convert tmp/5fkbj1312379103.ps tmp/5fkbj1312379103.png",intern=TRUE)) character(0) > try(system("convert tmp/68fzc1312379103.ps tmp/68fzc1312379103.png",intern=TRUE)) character(0) > try(system("convert tmp/7i0y41312379103.ps tmp/7i0y41312379103.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.596 0.329 1.923