R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(374 + ,572 + ,402 + ,589 + ,507 + ,628 + ,698 + ,451 + ,694 + ,0 + ,488 + ,526 + ,343 + ,494 + ,447 + ,0 + ,470 + ,366 + ,517 + ,483 + ,485 + ,530 + ,308 + ,481 + ,437 + ,468 + ,502 + ,408 + ,479 + ,436 + ,410 + ,451 + ,344 + ,411 + ,0 + ,427 + ,454 + ,365 + ,499 + ,416 + ,430 + ,470 + ,325 + ,452 + ,442 + ,488 + ,446 + ,523 + ,594 + ,439 + ,588 + ,503 + ,444 + ,525 + ,375 + ,472 + ,436 + ,458 + ,514 + ,0 + ,472 + ,360 + ,450 + ,549 + ,361 + ,466 + ,387 + ,457 + ,470 + ,396 + ,471 + ,422 + ,404 + ,414 + ,342 + ,459 + ,379 + ,0 + ,410 + ,319 + ,411 + ,371 + ,365 + ,429 + ,333 + ,392 + ,469 + ,432 + ,534 + ,379 + ,436 + ,448 + ,358 + ,492 + ,387 + ,529 + ,475 + ,439 + ,459 + ,361 + ,0 + ,0 + ,394 + ,425 + ,341 + ,455 + ,403 + ,471 + ,523 + ,389 + ,531 + ,468 + ,398 + ,446 + ,355 + ,435 + ,353 + ,0 + ,400 + ,332 + ,389 + ,355 + ,384 + ,406 + ,356 + ,336 + ,351 + ,278 + ,265 + ,229 + ,387 + ,435 + ,317 + ,490 + ,472 + ,440 + ,429 + ,350 + ,489 + ,494 + ,436 + ,436 + ,375 + ,429 + ,0 + ,434 + ,472 + ,362 + ,440 + ,433 + ,400 + ,442 + ,316 + ,432 + ,401 + ,434 + ,488 + ,377 + ,484 + ,377 + ,0 + ,0 + ,300 + ,389 + ,337 + ,376 + ,377 + ,331 + ,339 + ,356 + ,280 + ,249 + ,196 + ,268 + ,379 + ,401 + ,404 + ,397 + ,419 + ,421 + ,407 + ,296 + ,468 + ,475 + ,422 + ,456 + ,339 + ,446 + ,419 + ,346 + ,327 + ,326 + ,403 + ,359 + ,358 + ,421 + ,322 + ,367 + ,394 + ,356 + ,418 + ,344 + ,372 + ,358 + ,373 + ,379 + ,0 + ,348 + ,369 + ,341 + ,390 + ,279 + ,325 + ,354 + ,346 + ,358 + ,296 + ,356 + ,337 + ,360 + ,474 + ,362 + ,440 + ,443 + ,435 + ,429 + ,341 + ,434 + ,329 + ,416 + ,430 + ,307 + ,408 + ,322 + ,0 + ,324 + ,303 + ,369 + ,328 + ,258 + ,372 + ,298 + ,376 + ,306 + ,359 + ,418 + ,311 + ,355 + ,335 + ,345 + ,318 + ,291 + ,340 + ,0 + ,356 + ,419 + ,296 + ,361 + ,371 + ,392 + ,383 + ,286 + ,362 + ,358) > 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] 264 > (np <- floor(n / par1)) [1] 66 > arr <- array(NA,dim=c(par1,np)) > j <- 0 > k <- 1 > for (i in 1:(np*par1)) + { + j = j + 1 + arr[j,k] <- x[i] + if (j == par1) { + j = 0 + k=k+1 + } + } > arr [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 374 507 694 343 470 485 437 479 344 454 430 442 594 444 [2,] 572 628 0 494 366 530 468 436 411 365 470 488 439 525 [3,] 402 698 488 447 517 308 502 410 0 499 325 446 588 375 [4,] 589 451 526 0 483 481 408 451 427 416 452 523 503 472 [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [1,] 436 472 361 470 404 379 411 333 534 358 475 0 [2,] 458 360 466 396 414 0 371 392 379 492 439 0 [3,] 514 450 387 471 342 410 365 469 436 387 459 394 [4,] 0 549 457 422 459 319 429 432 448 529 361 425 [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38] [1,] 341 523 398 353 389 356 265 317 429 436 0 440 [2,] 455 389 446 0 355 336 229 490 350 436 434 433 [3,] 403 531 355 400 384 351 387 472 489 375 472 400 [4,] 471 468 435 332 406 278 435 440 494 429 362 442 [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [,50] [1,] 316 488 0 337 339 196 404 407 422 419 403 322 [2,] 432 377 0 376 356 268 397 296 456 346 359 367 [3,] 401 484 300 377 280 379 419 468 339 327 358 394 [4,] 434 377 389 331 249 401 421 475 446 326 421 356 [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [,61] [,62] [1,] 418 373 369 325 296 474 435 329 408 303 372 359 [2,] 344 379 341 354 356 362 429 416 322 369 298 418 [3,] 372 0 390 346 337 440 341 430 0 328 376 311 [4,] 358 348 279 358 360 443 434 307 324 258 306 355 [,63] [,64] [,65] [,66] [1,] 335 340 296 383 [2,] 345 0 361 286 [3,] 318 356 371 362 [4,] 291 419 392 358 > arr.mean <- array(NA,dim=np) > arr.sd <- array(NA,dim=np) > arr.range <- array(NA,dim=np) > for (j in 1:np) + { + arr.mean[j] <- mean(arr[,j],na.rm=TRUE) + arr.sd[j] <- sd(arr[,j],na.rm=TRUE) + arr.range[j] <- max(arr[,j],na.rm=TRUE) - min(arr[,j],na.rm=TRUE) + } > arr.mean [1] 484.25 571.00 427.00 321.00 459.00 451.00 453.75 444.00 295.50 433.50 [11] 419.25 474.75 531.00 454.00 352.00 457.75 417.75 439.75 404.75 277.00 [21] 394.00 406.50 449.25 441.50 433.50 204.75 417.50 477.75 408.50 271.25 [31] 383.50 330.25 329.00 429.75 440.50 419.00 317.00 428.75 395.75 431.50 [41] 172.25 355.25 306.00 311.00 410.25 411.50 415.75 354.50 385.25 359.75 [51] 373.00 275.00 344.75 345.75 337.25 429.75 409.75 370.50 263.50 314.50 [61] 338.00 360.75 322.25 278.75 355.00 347.25 > arr.sd [1] 111.94158 112.35954 298.40688 223.10685 65.08968 97.88769 40.43410 [8] 28.83285 200.25401 56.88878 64.92752 38.30905 74.08554 62.46599 [15] 236.95288 77.77050 51.75181 37.06189 48.18973 188.49049 31.00538 [22] 58.22084 64.01758 81.95324 50.52722 236.76342 58.68276 65.45927 [29] 41.15418 183.05441 21.20535 35.85503 97.80252 77.95886 67.17390 [36] 29.51836 216.20052 19.55121 55.27130 62.95236 202.18865 24.66272 [43] 50.04664 96.26006 11.64403 82.83518 53.11858 43.97348 31.75295 [50] 29.80352 32.10400 183.82419 48.21048 14.70544 29.27314 47.71006 [57] 45.90842 61.54944 180.18047 46.46504 41.72929 43.92702 23.62731 [64] 188.93628 41.40048 42.27982 > arr.range [1] 215 247 694 494 151 222 94 69 427 134 145 81 155 150 514 189 105 75 117 [20] 410 64 136 155 171 114 425 130 142 91 400 51 78 206 173 144 61 472 42 [39] 118 111 389 46 107 205 24 179 117 93 63 72 74 379 111 33 64 112 94 [58] 123 408 111 78 107 54 419 96 97 > (lm1 <- lm(arr.sd~arr.mean)) Call: lm(formula = arr.sd ~ arr.mean) Coefficients: (Intercept) arr.mean 234.6819 -0.3997 > (lnlm1 <- lm(log(arr.sd)~log(arr.mean))) Call: lm(formula = log(arr.sd) ~ log(arr.mean)) Coefficients: (Intercept) log(arr.mean) 11.955 -1.321 > (lm2 <- lm(arr.range~arr.mean)) Call: lm(formula = arr.range ~ arr.mean) Coefficients: (Intercept) arr.mean 477.0900 -0.7843 > postscript(file="/var/www/html/rcomp/tmp/10nav1243891245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,arr.sd,main='Standard Deviation-Mean Plot',xlab='mean',ylab='standard deviation') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2md8h1243891245.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(arr.mean,arr.range,main='Range-Mean Plot',xlab='mean',ylab='range') > dev.off() null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Standard Deviation-Mean Plot',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Section',header=TRUE) > a<-table.element(a,'Mean',header=TRUE) > a<-table.element(a,'Standard Deviation',header=TRUE) > a<-table.element(a,'Range',header=TRUE) > a<-table.row.end(a) > for (j in 1:np) { + a<-table.row.start(a) + a<-table.element(a,j,header=TRUE) + a<-table.element(a,arr.mean[j]) + a<-table.element(a,arr.sd[j] ) + a<-table.element(a,arr.range[j] ) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3bk151243891245.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Regression: S.E.(k) = alpha + beta * Mean(k)',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'alpha',header=TRUE) > a<-table.element(a,lm1$coefficients[[1]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'beta',header=TRUE) > a<-table.element(a,lm1$coefficients[[2]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,summary(lm1)$coefficients[2,2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,summary(lm1)$coefficients[2,3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'p-value',header=TRUE) > a<-table.element(a,summary(lm1)$coefficients[2,4]) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4adah1243891245.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Regression: ln S.E.(k) = alpha + beta * ln Mean(k)',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'alpha',header=TRUE) > a<-table.element(a,lnlm1$coefficients[[1]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'beta',header=TRUE) > a<-table.element(a,lnlm1$coefficients[[2]]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,summary(lnlm1)$coefficients[2,2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,summary(lnlm1)$coefficients[2,3]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'p-value',header=TRUE) > a<-table.element(a,summary(lnlm1)$coefficients[2,4]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Lambda',header=TRUE) > a<-table.element(a,1-lnlm1$coefficients[[2]]) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/5mvx11243891245.tab") > > system("convert tmp/10nav1243891245.ps tmp/10nav1243891245.png") > system("convert tmp/2md8h1243891245.ps tmp/2md8h1243891245.png") > > > proc.time() user system elapsed 0.573 0.295 0.907