R version 2.8.0 (2008-10-20) 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(124.1,124.4,115.7,108.3,102.3,104.6,104,103.5,96,96.6,95.4,92.1,93,90.4,93.3,97.1,111,114.1,113.3,111,107.2,118.3,134.1,139,116.7,112.5,122.8,130,125.6,123.8,135.8,136.4,135.3,149.5,159.6,161.4,175.2,199.5,245,257.8) > par1 = '4' > #'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] 40 > (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 > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 124.1 102.3 96.0 93.0 111.0 107.2 116.7 125.6 135.3 175.2 NA [2,] 124.4 104.6 96.6 90.4 114.1 118.3 112.5 123.8 149.5 199.5 NA [3,] 115.7 104.0 95.4 93.3 113.3 134.1 122.8 135.8 159.6 245.0 NA [4,] 108.3 103.5 92.1 97.1 111.0 139.0 130.0 136.4 161.4 257.8 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [1,] 0.3 2.3 0.6 -2.6 3.1 11.1 -4.2 -1.8 14.2 24.3 NA [2,] -8.7 -0.6 -1.2 2.9 -0.8 15.8 10.3 12.0 10.1 45.5 NA [3,] -7.4 -0.5 -3.3 3.8 -2.3 4.9 7.2 0.6 1.8 12.8 NA [4,] -6.0 -7.5 0.9 13.9 -3.8 -22.3 -4.4 -1.1 13.8 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/www/html/freestat/rcomp/tmp/1ulzj1229176288.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/24g0v1229176288.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/32syi1229176288.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/4rrwj1229176288.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] [1,] 93.00 90.4 93.30 92.1 [2,] 102.30 104.6 104.00 103.5 [3,] 113.85 116.2 119.25 120.5 [4,] 125.60 124.4 135.80 139.0 [5,] 135.30 149.5 159.60 161.4 $n [1] 10 10 10 10 $conf [,1] [,2] [,3] [,4] [1,] 102.2084 106.3071 103.3615 102.7628 [2,] 125.4916 126.0929 135.1385 138.2372 $out [1] 175.2 199.5 245.0 257.8 $group [1] 1 2 3 4 $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(93, 102.3, 113.85, 125.6, 135.3, 90.4, 104.6, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5izno1229176288.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] [1,] -4.20 -8.7 -7.4 -7.5 [2,] -1.80 -0.8 -2.3 -6.0 [3,] 1.45 6.5 1.2 -3.8 [4,] 11.10 12.0 4.9 0.9 [5,] 24.30 15.8 12.8 0.9 $n [1] 10 10 10 9 $conf [,1] [,2] [,3] [,4] [1,] -4.995354 0.1046097 -2.397407 -7.434 [2,] 7.895354 12.8953903 4.797407 -0.166 $out [1] 45.5 13.9 -22.3 13.8 $group [1] 2 4 4 4 $names [1] "1" "2" "3" "4" Warning message: In bxp(list(stats = c(-4.2, -1.80000000000000, 1.45000000000000, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/6t2oi1229176288.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] [,9] [,10] [,11] [1,] 108.30 102.30 92.10 90.40 111.00 107.20 112.50 123.8 135.30 175.20 NA [2,] 112.00 102.90 93.75 91.70 111.00 112.75 114.60 124.7 142.40 187.35 NA [3,] 119.90 103.75 95.70 93.15 112.15 126.20 119.75 130.7 154.55 222.25 NA [4,] 124.25 104.30 96.30 95.20 113.70 136.55 126.40 136.1 160.50 251.40 NA [5,] 124.40 104.60 96.60 97.10 114.10 139.00 130.00 136.4 161.40 257.80 NA $n [1] 4 4 4 4 4 4 4 4 4 4 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 110.2225 102.644 93.6855 90.385 110.017 107.398 110.428 121.694 140.251 [2,] 129.5775 104.856 97.7145 95.915 114.283 145.002 129.072 139.706 168.849 [,10] [,11] [1,] 171.6505 NA [2,] 272.8495 NA $out numeric(0) $group numeric(0) $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" NA Warning message: In bxp(list(stats = c(108.3, 112, 119.9, 124.25, 124.4, 102.3, 102.9, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/750fv1229176288.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,] 118.640 113.850 114.3750 [2,] 121.005 115.025 114.8937 [3,] 127.635 117.725 118.1312 [4,] 132.780 119.875 121.1875 [5,] 133.660 120.500 121.5250 $n [1] 4 4 4 $conf [,1] [,2] [,3] [1,] 118.3328 113.8935 113.1592 [2,] 136.9373 121.5565 123.1033 $out numeric(0) $group numeric(0) $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(118.64, 121.005, 127.635, 132.78, 133.66, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > system("convert tmp/1ulzj1229176288.ps tmp/1ulzj1229176288.png") > system("convert tmp/24g0v1229176288.ps tmp/24g0v1229176288.png") > system("convert tmp/32syi1229176288.ps tmp/32syi1229176288.png") > system("convert tmp/4rrwj1229176288.ps tmp/4rrwj1229176288.png") > system("convert tmp/5izno1229176288.ps tmp/5izno1229176288.png") > system("convert tmp/6t2oi1229176288.ps tmp/6t2oi1229176288.png") > system("convert tmp/750fv1229176288.ps tmp/750fv1229176288.png") > > > proc.time() user system elapsed 1.800 1.459 2.089