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(2400,4700,3700,2900,2800,3000,3100,3700,3000,2000,1900,1900,1800,3400,3800,2800,3100,2100,2000,2500,2400,2500,3300,3100,3700,5600,3700,2900,4000,2900,2400,3300,3800,4400,4000,3100,2700,5200,4600,3700,3200,2400,2200,3200,3100,2300,2500,2900,2700,5000,3500,3000,3800,2800,2400,2700,2800,2700,2600,3100) > 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] 60 > (np <- floor(n / par1)) [1] 5 > 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] 5 5 5 5 5 5 5 5 5 5 5 5 > arr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2400 1800 3700 2700 2700 NA [2,] 4700 3400 5600 5200 5000 NA [3,] 3700 3800 3700 4600 3500 NA [4,] 2900 2800 2900 3700 3000 NA [5,] 2800 3100 4000 3200 3800 NA [6,] 3000 2100 2900 2400 2800 NA [7,] 3100 2000 2400 2200 2400 NA [8,] 3700 2500 3300 3200 2700 NA [9,] 3000 2400 3800 3100 2800 NA [10,] 2000 2500 4400 2300 2700 NA [11,] 1900 3300 4000 2500 2600 NA [12,] 1900 3100 3100 2900 3100 NA > darr [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2300 1600 1900 2500 2300 NA [2,] -1000 400 -1900 -600 -1500 NA [3,] -800 -1000 -800 -900 -500 NA [4,] -100 300 1100 -500 800 NA [5,] 200 -1000 -1100 -800 -1000 NA [6,] 100 -100 -500 -200 -400 NA [7,] 600 500 900 1000 300 NA [8,] -700 -100 500 -100 100 NA [9,] -1000 100 600 -800 -100 NA [10,] -100 800 -400 200 -100 NA [11,] 0 -200 -900 400 500 NA [12,] -100 600 -400 -200 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/rcomp/tmp/1svaf1228488347.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/rcomp/tmp/2jykk1228488347.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/rcomp/tmp/30d2b1228488347.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/rcomp/tmp/4rqoe1228488347.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] [,9] [,10] [,11] [,12] [1,] 2400 4700 3700 2800 2800 2100 2000 2500 2400 2000 1900 2900 [2,] 2400 4700 3700 2900 3100 2400 2200 2700 2800 2300 2500 2900 [3,] 2700 5000 3700 2900 3200 2800 2400 3200 3000 2500 2600 3100 [4,] 2700 5200 3800 3000 3800 2900 2400 3300 3100 2700 3300 3100 [5,] 2700 5600 3800 3000 4000 3000 2400 3700 3100 2700 4000 3100 $n [1] 5 5 5 5 5 5 5 5 5 5 5 5 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 2488.021 4646.701 3629.34 2829.34 2705.382 2446.701 2258.681 2776.042 [2,] 2911.979 5353.299 3770.66 2970.66 3694.618 3153.299 2541.319 3623.958 [,9] [,10] [,11] [,12] [1,] 2788.021 2217.361 2034.722 2958.681 [2,] 3211.979 2782.639 3165.278 3241.319 $out [1] 1800 3700 3400 4600 3500 3700 3100 3800 4400 1900 $group [1] 1 1 2 3 3 4 7 9 10 12 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(2400, 2400, 2700, 2700, 2700, 4700, 4700, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/58tq61228488347.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] [,10] [,11] [,12] [1,] 1600 -1900 -1000 -500 -1100 -500 300 -100 -1000 -400 -900 -400 [2,] 1900 -1500 -900 -100 -1000 -400 500 -100 -800 -100 -200 -300 [3,] 2300 -1000 -800 300 -1000 -200 600 -100 -100 -100 0 -150 [4,] 2300 -600 -800 800 -800 -100 900 100 100 200 400 250 [5,] 2500 400 -800 1100 -800 100 1000 100 600 200 500 600 $n [1] 5 5 5 5 5 5 5 5 5 5 5 4 $conf [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 2017.361 -1635.9377 -870.6597 -335.9377 -1141.3195 -411.97924 317.361 [2,] 2582.639 -364.0623 -729.3403 935.9377 -858.6805 11.97924 882.639 [,8] [,9] [,10] [,11] [,12] [1,] -241.3195 -735.9377 -311.9792 -423.9585 -584.5 [2,] 41.3195 535.9377 111.9792 423.9585 284.5 $out [1] -500 200 -700 500 800 $group [1] 3 5 8 8 10 $names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" Warning message: In bxp(list(stats = c(1600, 1900, 2300, 2300, 2500, -1900, -1500, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/6n5fk1228488347.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] [1,] 1900 1800 2400 2200 2400 NA [2,] 2200 2250 3000 2450 2700 NA [3,] 2950 2650 3700 3000 2800 NA [4,] 3400 3200 4000 3450 3300 NA [5,] 4700 3800 4400 4600 3800 NA $n [1] 12 12 12 12 12 0 $conf [,1] [,2] [,3] [,4] [,5] [,6] [1,] 2402.672 2216.699 3243.893 2543.893 2526.336 NA [2,] 3497.328 3083.301 4156.107 3456.107 3073.664 NA $out [1] 5600 5200 5000 $group [1] 3 4 5 $names [1] "1" "2" "3" "4" "5" NA Warning message: In bxp(list(stats = c(1900, 2200, 2950, 3400, 4700, 1800, 2250, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7sh3q1228488347.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,] 2420 2400 2300 [2,] 2720 2650 2600 [3,] 2940 2950 2950 [4,] 3230 3200 3225 [5,] 3860 3700 3750 $n [1] 12 12 12 $conf [,1] [,2] [,3] [1,] 2707.386 2699.141 2664.933 [2,] 3172.614 3200.859 3235.067 $out [1] 4780 5000 4950 $group [1] 1 2 3 $names [1] "mean" "median" "midrange" Warning message: In bxp(list(stats = c(2420, 2720, 2940, 3230, 3860, 2400, 2650, : some notches went outside hinges ('box'): maybe set notch=FALSE > dev.off() null device 1 > > system("convert tmp/1svaf1228488347.ps tmp/1svaf1228488347.png") > system("convert tmp/2jykk1228488347.ps tmp/2jykk1228488347.png") > system("convert tmp/30d2b1228488347.ps tmp/30d2b1228488347.png") > system("convert tmp/4rqoe1228488347.ps tmp/4rqoe1228488347.png") > system("convert tmp/58tq61228488347.ps tmp/58tq61228488347.png") > system("convert tmp/6n5fk1228488347.ps tmp/6n5fk1228488347.png") > system("convert tmp/7sh3q1228488347.ps tmp/7sh3q1228488347.png") > > > proc.time() user system elapsed 1.179 0.913 1.939