R version 2.7.2 (2008-08-25) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(1379.33,1365.61,1331.11,1260.53,1248.37,1223.08,1222.8,1184.59,1081.56,1090.18,1144.33,1094.98,1059.05,1051.57,939.11,954.99,989.9,998.58,989.09,954.2,1008.75,986.24,974.18,916.98,839.41,828.58,781.59,763.9,812.18,800.4,801.05,755.1,751.1,787.2,835.48,883.97,887.44,891.15,924.65,954.52,965.21,1001.37,1060.2,1068.77,1052.67,1062.62,1023.67,1053.79,1037.15,1017.34,1044.81,1058.99,1115.65,1148.69,1140.22,1162.2,1168.78,1135.95,1136.36,1153.34,1169.6,1195.26,1214.66,1185.77,1220.77,1260.69,1297.82,1301.19,1323.4,1353,1354.89,1286.78,1303.48,1340.18,1358.86,1401.19,1435.91,1475.01,1487.57,1523.5,1490.65,1560.82,1598.75,1603.17,1622.91,1536.3,1582.6,1653.94,1595.07,1594.36,1481.74,1451.66,1423.04,1490.69,1529.13,1457.83,1362.14,1342.63,1258.28) > 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] 99 > (np <- floor(n / par1)) [1] 8 > 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 8 8 8 8 8 8 8 8 8 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 1379.33 1059.05 839.41 887.44 1037.15 1169.60 1303.48 1622.91 1362.14 [2,] 1365.61 1051.57 828.58 891.15 1017.34 1195.26 1340.18 1536.30 1342.63 [3,] 1331.11 939.11 781.59 924.65 1044.81 1214.66 1358.86 1582.60 1258.28 [4,] 1260.53 954.99 763.90 954.52 1058.99 1185.77 1401.19 1653.94 NA [5,] 1248.37 989.90 812.18 965.21 1115.65 1220.77 1435.91 1595.07 NA [6,] 1223.08 998.58 800.40 1001.37 1148.69 1260.69 1475.01 1594.36 NA [7,] 1222.80 989.09 801.05 1060.20 1140.22 1297.82 1487.57 1481.74 NA [8,] 1184.59 954.20 755.10 1068.77 1162.20 1301.19 1523.50 1451.66 NA [9,] 1081.56 1008.75 751.10 1052.67 1168.78 1323.40 1490.65 1423.04 NA [10,] 1090.18 986.24 787.20 1062.62 1135.95 1353.00 1560.82 1490.69 NA [11,] 1144.33 974.18 835.48 1023.67 1136.36 1354.89 1598.75 1529.13 NA [12,] 1094.98 916.98 883.97 1053.79 1153.34 1286.78 1603.17 1457.83 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] -13.72 -7.48 -10.83 3.71 -19.81 25.66 36.70 -86.61 -19.51 [2,] -34.50 -112.46 -46.99 33.50 27.47 19.40 18.68 46.30 -84.35 [3,] -70.58 15.88 -17.69 29.87 14.18 -28.89 42.33 71.34 NA [4,] -12.16 34.91 48.28 10.69 56.66 35.00 34.72 -58.87 NA [5,] -25.29 8.68 -11.78 36.16 33.04 39.92 39.10 -0.71 NA [6,] -0.28 -9.49 0.65 58.83 -8.47 37.13 12.56 -112.62 NA [7,] -38.21 -34.89 -45.95 8.57 21.98 3.37 35.93 -30.08 NA [8,] -103.03 54.55 -4.00 -16.10 6.58 22.21 -32.85 -28.62 NA [9,] 8.62 -22.51 36.10 9.95 -32.83 29.60 70.17 67.65 NA [10,] 54.15 -12.06 48.28 -38.95 0.41 1.89 37.93 38.44 NA [11,] -49.35 -57.20 48.49 30.12 16.98 -68.11 4.42 -71.30 NA [12,] -35.93 -77.57 3.47 -16.64 16.26 16.70 19.74 -95.69 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/www/html/freestat/rcomp/tmp/1jq8a1225648529.ps",horizontal=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/www/html/freestat/rcomp/tmp/26lck1225648529.ps",horizontal=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/www/html/freestat/rcomp/tmp/3i7wj1225648529.ps",horizontal=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/www/html/freestat/rcomp/tmp/45xat1225648529.ps",horizontal=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] [1,] 839.41 828.58 781.59 763.900 812.180 800.400 801.050 755.100 [2,] 1037.15 1017.34 939.11 954.755 977.555 999.975 1024.645 1011.485 [3,] 1169.60 1195.26 1214.66 1122.380 1168.210 1185.885 1181.510 1173.395 [4,] 1362.14 1342.63 1331.11 1330.860 1342.140 1367.850 1389.780 1376.425 [5,] 1622.91 1536.30 1582.60 1653.940 1595.070 1594.360 1487.570 1523.500 [,9] [,10] [,11] [,12] [1,] 751.10 787.200 835.480 883.970 [2,] 1030.71 1024.430 998.925 985.385 [3,] 1125.17 1113.065 1140.345 1124.160 [4,] 1373.22 1421.845 1442.010 1372.305 [5,] 1490.65 1560.820 1598.750 1603.170 $n [1] 9 9 9 8 8 8 8 8 8 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 998.4386 1023.941 1008.207 912.2823 964.5476 980.3847 977.5403 [2,] 1340.7614 1366.579 1421.113 1332.4777 1371.8724 1391.3853 1385.4797 [,8] [,9] [,10] [,11] [,12] [1,] 969.5343 933.839 891.0633 892.8314 908.021 [2,] 1377.2557 1316.501 1335.0667 1387.8586 1340.299 $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(839.41, 1037.15, 1169.6, 1362.14, 1622.91, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/593mf1225648529.ps",horizontal=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] [1,] -19.81 -112.46 -70.58 -58.870 -25.290 -9.490 -45.950 -32.850 -32.830 [2,] -19.51 -46.99 -23.29 -0.735 -6.245 -8.980 -36.550 -30.735 -6.945 [3,] -10.83 18.68 15.03 34.815 20.860 0.185 -13.355 -10.050 19.775 [4,] 3.71 27.47 36.10 41.640 37.630 24.845 15.275 14.395 51.875 [5,] 36.70 46.30 71.34 56.660 39.920 58.830 35.930 54.550 70.170 [,10] [,11] [,12] [1,] -38.950 -71.300 -95.690 [2,] -5.825 -62.655 -56.750 [3,] 19.910 -22.465 -6.585 [4,] 43.360 23.550 16.480 [5,] 54.150 48.490 19.740 $n [1] 9 9 8 8 8 8 8 8 8 8 8 8 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] -23.0592 -20.5356 -18.14611 11.14372 -3.649205 -18.71013 -42.30519 [2,] 1.3992 57.8956 48.20611 58.48628 45.369205 19.08013 15.59519 [,8] [,9] [,10] [,11] [,12] [1,] -35.26027 -13.08270 -7.565447 -70.62035 -47.49233 [2,] 15.16027 52.63270 47.385447 25.69035 34.32233 $out [1] -86.61 -112.62 -103.03 $group [1] 1 6 8 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(-19.8100000000001, -19.51, -10.8299999999999, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6jarv1225648529.ps",horizontal=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,] 1081.560 916.980 751.100 887.440 1017.340 1169.600 1303.480 1423.040 [2,] 1119.655 954.595 772.745 939.585 1051.900 1204.960 1380.025 1469.785 [3,] 1222.940 987.665 800.725 1012.520 1136.155 1273.735 1481.290 1532.715 [4,] 1295.820 1003.665 832.030 1056.995 1151.015 1312.295 1542.160 1594.715 [5,] 1379.330 1059.050 883.970 1068.770 1168.780 1354.890 1603.170 1653.940 [,9] [1,] 1258.280 [2,] 1300.455 [3,] 1342.630 [4,] 1352.385 [5,] 1362.140 $n [1] 12 12 12 12 12 12 12 12 3 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1142.59 965.2838 773.6847 958.9685 1090.948 1224.779 1407.339 1475.734 [2,] 1303.29 1010.0462 827.7653 1066.0715 1181.362 1322.691 1555.241 1589.696 [,9] [1,] 1295.259 [2,] 1390.001 $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" NA Warning message: In bxp(list(stats = c(1081.56, 1119.655, 1222.94, 1295.82, 1379.33, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/712il1225648529.ps",horizontal=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,] 1154.229 1113.065 1125.284 [2,] 1167.688 1124.665 1148.481 [3,] 1178.253 1168.905 1184.726 [4,] 1184.781 1183.697 1197.322 [5,] 1199.599 1214.660 1215.474 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 1170.457 1141.980 1162.449 [2,] 1186.049 1195.830 1207.003 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(1154.22875, 1167.688125, 1178.253125, 1184.78118055556, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1jq8a1225648529.ps tmp/1jq8a1225648529.png") > system("convert tmp/26lck1225648529.ps tmp/26lck1225648529.png") > system("convert tmp/3i7wj1225648529.ps tmp/3i7wj1225648529.png") > system("convert tmp/45xat1225648529.ps tmp/45xat1225648529.png") > system("convert tmp/593mf1225648529.ps tmp/593mf1225648529.png") > system("convert tmp/6jarv1225648529.ps tmp/6jarv1225648529.png") > system("convert tmp/712il1225648529.ps tmp/712il1225648529.png") > > > proc.time() user system elapsed 2.152 1.460 2.406