R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), 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 a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("crossdes-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('crossdes') Loading required package: AlgDesign Loading required package: gtools Loading required package: MASS > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "MOLS" > > ### * MOLS > > flush(stderr()); flush(stdout()) > > ### Name: MOLS > ### Title: Construction of Complete Sets of Mutually Orthogonal Latin > ### Squares > ### Aliases: MOLS > ### Keywords: design > > ### ** Examples > > MOLS(7,1) # 6 mutually orthogonal latin squares of order 7 , , 1 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 2 3 4 5 6 7 [2,] 2 3 4 5 6 7 1 [3,] 3 4 5 6 7 1 2 [4,] 4 5 6 7 1 2 3 [5,] 5 6 7 1 2 3 4 [6,] 6 7 1 2 3 4 5 [7,] 7 1 2 3 4 5 6 , , 2 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 2 3 4 5 6 7 [2,] 3 4 5 6 7 1 2 [3,] 5 6 7 1 2 3 4 [4,] 7 1 2 3 4 5 6 [5,] 2 3 4 5 6 7 1 [6,] 4 5 6 7 1 2 3 [7,] 6 7 1 2 3 4 5 , , 3 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 2 3 4 5 6 7 [2,] 4 5 6 7 1 2 3 [3,] 7 1 2 3 4 5 6 [4,] 3 4 5 6 7 1 2 [5,] 6 7 1 2 3 4 5 [6,] 2 3 4 5 6 7 1 [7,] 5 6 7 1 2 3 4 , , 4 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 2 3 4 5 6 7 [2,] 5 6 7 1 2 3 4 [3,] 2 3 4 5 6 7 1 [4,] 6 7 1 2 3 4 5 [5,] 3 4 5 6 7 1 2 [6,] 7 1 2 3 4 5 6 [7,] 4 5 6 7 1 2 3 , , 5 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 2 3 4 5 6 7 [2,] 6 7 1 2 3 4 5 [3,] 4 5 6 7 1 2 3 [4,] 2 3 4 5 6 7 1 [5,] 7 1 2 3 4 5 6 [6,] 5 6 7 1 2 3 4 [7,] 3 4 5 6 7 1 2 , , 6 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 2 3 4 5 6 7 [2,] 7 1 2 3 4 5 6 [3,] 6 7 1 2 3 4 5 [4,] 5 6 7 1 2 3 4 [5,] 4 5 6 7 1 2 3 [6,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5 6 [6,] 8 7 6 5 4 3 2 1 [7,] 4 3 2 1 8 7 6 5 [8,] 7 8 5 6 3 4 1 2 , , 6 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1 2 3 4 5 6 7 8 [2,] 7 8 5 6 3 4 1 2 [3,] 8 7 6 5 4 3 2 1 [4,] 2 1 4 3 6 5 8 7 [5,] 6 5 8 7 2 1 4 3 [6,] 4 3 2 1 8 7 6 5 [7,] 3 4 1 2 7 8 5 6 [8,] 5 6 7 8 1 2 3 4 , , 7 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1 2 3 4 5 6 7 8 [2,] 8 7 6 5 4 3 2 1 [3,] 6 5 8 7 2 1 4 3 [4,] 3 4 1 2 7 8 5 6 [5,] 2 1 4 3 6 5 8 7 [6,] 7 8 5 6 3 4 1 2 [7,] 5 6 7 8 1 2 3 4 [8,] 4 3 2 1 8 7 6 5 > > > > cleanEx(); ..nameEx <- "all.combin" > > ### * all.combin > > flush(stderr()); flush(stdout()) > > ### Name: all.combin > ### Title: Balanced Row-Column Design with all Possible Treatment Orders > ### Aliases: all.combin > ### Keywords: design > > ### ** Examples > > # Design for 4 treatments assigned in 3 periods. > # All possible treatment orders occur. > all.combin(4,3) [,1] [,2] [,3] [1,] 1 2 3 [2,] 1 2 4 [3,] 1 3 2 [4,] 1 3 4 [5,] 1 4 2 [6,] 1 4 3 [7,] 2 1 3 [8,] 2 1 4 [9,] 2 3 1 [10,] 2 3 4 [11,] 2 4 1 [12,] 2 4 3 [13,] 3 1 2 [14,] 3 1 4 [15,] 3 2 1 [16,] 3 2 4 [17,] 3 4 1 [18,] 3 4 2 [19,] 4 1 2 [20,] 4 1 3 [21,] 4 2 1 [22,] 4 2 3 [23,] 4 3 1 [24,] 4 3 2 > > > > cleanEx(); ..nameEx <- "analyze.rand" > > ### * analyze.rand > > flush(stderr()); flush(stdout()) > > ### Name: analyze.rand > ### Title: Analysis of a Simulation Study to Asses the Validity of a > ### Randomization Procedure > ### Aliases: analyze.rand > ### Keywords: design > > ### ** Examples > > ## Not run: > ##D # First create a data set to analyze: > ##D d <- matrix(c(1:4,2:4,1,4,1:3,3,4,1,2),ncol=4) > ##D rand.design.RC( d, rnorm(16), -1, 1, 1000, "D:\mytest.txt" ) > ##D # Now do the analysis: > ##D analyze.rand( "D:\mytest.txt" ) > ##D analyze.rand( "D:\mytest.txt", fig=TRUE, ref=TRUE, > ##D refval=c(0, -1, 0, -1, -.25, -1.25) ) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "balmin.RMD" > > ### * balmin.RMD > > flush(stderr()); flush(stdout()) > > ### Name: balmin.RMD > ### Title: Function to construct the balanced minimal repeated measurements > ### designs of Afsarinejad (1983) > ### Aliases: balmin.RMD > ### Keywords: design > > ### ** Examples > > balmin.RMD(10,30,4) # a balanced minimal RMD [,1] [,2] [,3] [,4] [1,] 1 10 2 9 [2,] 2 1 3 10 [3,] 3 2 4 1 [4,] 4 3 5 2 [5,] 5 4 6 3 [6,] 6 5 7 4 [7,] 7 6 8 5 [8,] 8 7 9 6 [9,] 9 8 10 7 [10,] 10 9 1 8 [11,] 9 3 8 4 [12,] 10 4 9 5 [13,] 1 5 10 6 [14,] 2 6 1 7 [15,] 3 7 2 8 [16,] 4 8 3 9 [17,] 5 9 4 10 [18,] 6 10 5 1 [19,] 7 1 6 2 [20,] 8 2 7 3 [21,] 4 7 5 6 [22,] 5 8 6 7 [23,] 6 9 7 8 [24,] 7 10 8 9 [25,] 8 1 9 10 [26,] 9 2 10 1 [27,] 10 3 1 2 [28,] 1 4 2 3 [29,] 2 5 3 4 [30,] 3 6 4 5 > balmin.RMD(11,22,6) # another balanced minimal RMD [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1 11 3 9 5 7 [2,] 2 1 4 10 6 8 [3,] 3 2 5 11 7 9 [4,] 4 3 6 1 8 10 [5,] 5 4 7 2 9 11 [6,] 6 5 8 3 10 1 [7,] 7 6 9 4 11 2 [8,] 8 7 10 5 1 3 [9,] 9 8 11 6 2 4 [10,] 10 9 1 7 3 5 [11,] 11 10 2 8 4 6 [12,] 7 5 9 3 11 1 [13,] 8 6 10 4 1 2 [14,] 9 7 11 5 2 3 [15,] 10 8 1 6 3 4 [16,] 11 9 2 7 4 5 [17,] 1 10 3 8 5 6 [18,] 2 11 4 9 6 7 [19,] 3 1 5 10 7 8 [20,] 4 2 6 11 8 9 [21,] 5 3 7 1 9 10 [22,] 6 4 8 2 10 11 > > > > cleanEx(); ..nameEx <- "biertest.d4" > > ### * biertest.d4 > > flush(stderr()); flush(stdout()) > > ### Name: biertest.d4 > ### Title: Experimental Design for the Beer Testing Data in Kunert (1998) > ### Aliases: biertest.d4 > ### Keywords: datasets > > ### ** Examples > > data(biertest.d4) > > > > cleanEx(); ..nameEx <- "biertest.dat" > > ### * biertest.dat > > flush(stderr()); flush(stdout()) > > ### Name: biertest.dat > ### Title: The Beer Testing Data in Kunert (1998) > ### Aliases: biertest.dat > ### Keywords: datasets > > ### ** Examples > > data(biertest.dat) > > > > cleanEx(); ..nameEx <- "biertest.f2" > > ### * biertest.f2 > > flush(stderr()); flush(stdout()) > > ### Name: biertest.f2 > ### Title: Experimental Design for the Beer Testing Data in Kunert (1998) > ### Aliases: biertest.f2 > ### Keywords: datasets > > ### ** Examples > > data(biertest.f2) > > > > cleanEx(); ..nameEx <- "des.MOLS" > > ### * des.MOLS > > flush(stderr()); flush(stdout()) > > ### Name: des.MOLS > ### Title: Construction of Designs Based on Mutually Orthogonal Latin > ### Squares > ### Aliases: des.MOLS > ### Keywords: design > > ### ** Examples > > des.MOLS(7,7) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 2 3 4 5 6 7 [2,] 2 3 4 5 6 7 1 [3,] 3 4 5 6 7 1 2 [4,] 4 5 6 7 1 2 3 [5,] 5 6 7 1 2 3 4 [6,] 6 7 1 2 3 4 5 [7,] 7 1 2 3 4 5 6 [8,] 1 3 5 7 2 4 6 [9,] 2 4 6 1 3 5 7 [10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5 4 8 7 [26,] 2 6 3 7 8 [27,] 3 7 2 6 5 [28,] 4 8 1 5 6 [29,] 5 1 8 4 3 [30,] 6 2 7 3 4 [31,] 7 3 6 2 1 [32,] 8 4 5 1 2 [33,] 1 6 2 5 3 [34,] 2 5 1 6 4 [35,] 3 8 4 7 1 [36,] 4 7 3 8 2 [37,] 5 2 6 1 7 [38,] 6 1 5 2 8 [39,] 7 4 8 3 5 [40,] 8 3 7 4 6 [41,] 1 7 8 2 6 [42,] 2 8 7 1 5 [43,] 3 5 6 4 8 [44,] 4 6 5 3 7 [45,] 5 3 4 6 2 [46,] 6 4 3 5 1 [47,] 7 1 2 8 4 [48,] 8 2 1 7 3 [49,] 1 8 6 3 2 [50,] 2 7 5 4 1 [51,] 3 6 8 1 4 [52,] 4 5 7 2 3 [53,] 5 4 2 7 6 [54,] 6 3 1 8 5 [55,] 7 2 4 5 8 [56,] 8 1 3 6 7 > > > > cleanEx(); ..nameEx <- "find.BIB" > > ### * find.BIB > > flush(stderr()); flush(stdout()) > > ### Name: find.BIB > ### Title: Generation of Balanced Incomplete Block Designs Using the > ### Package AlgDesign > ### Aliases: find.BIB > ### Keywords: design > > ### ** Examples > > find.BIB(10,30,4) # BIBD [,1] [,2] [,3] [,4] [1,] 1 2 4 9 [2,] 3 4 7 10 [3,] 3 4 5 6 [4,] 4 7 8 10 [5,] 2 5 9 10 [6,] 1 8 9 10 [7,] 2 3 5 7 [8,] 1 2 7 10 [9,] 5 6 8 9 [10,] 1 4 5 7 [11,] 1 3 6 10 [12,] 6 7 8 10 [13,] 2 5 8 10 [14,] 5 6 7 9 [15,] 2 3 7 8 [16,] 1 2 6 8 [17,] 3 5 9 10 [18,] 1 4 7 9 [19,] 3 4 6 8 [20,] 2 4 5 8 [21,] 2 6 7 9 [22,] 1 4 5 8 [23,] 1 3 5 10 [24,] 1 2 3 6 [25,] 1 3 8 9 [26,] 3 7 8 9 [27,] 2 4 6 10 [28,] 4 6 9 10 [29,] 1 5 6 7 [30,] 2 3 4 9 > find.BIB(3,3,3) # BIBD [,1] [,2] [,3] [1,] 1 2 3 [2,] 1 2 3 [3,] 1 2 3 > find.BIB(5,5,3, 100) # There is no BIBD for these parameters [,1] [,2] [,3] [1,] 1 2 5 [2,] 1 3 4 [3,] 2 4 5 [4,] 1 3 5 [5,] 2 3 4 > # isGYD(find.BIB(5,5,3, 100)) > > > > cleanEx(); ..nameEx <- "get.plan" > > ### * get.plan > > flush(stderr()); flush(stdout()) > > ### Name: get.plan > ### Title: Menu-Driven Construction of Carryover Balanced Experimental > ### Designs > ### Aliases: get.plan > ### Keywords: design > > ### ** Examples > > ## Not run: > ##D get.plan(10,4,60) > ##D # "williams.BIB" or "balmin.RMD" > ##D get.plan(7,7,7000) > ##D # "all.combin", "williams" or "des.MOLS", "williams" requires > ##D # only 14 subjects, "all.combin" requires 5040. > ##D get.plan(5,5,5) > ##D # Increase maxsub > ## End(Not run) > > > > cleanEx(); ..nameEx <- "isCbalanced" > > ### * isCbalanced > > flush(stderr()); flush(stdout()) > > ### Name: isCbalanced > ### Title: Checking Block Designs for Carryover Balance > ### Aliases: isCbalanced > ### Keywords: design > > ### ** Examples > > d1 <- matrix( c(1,2,3,4,1,1,1,1), 4,2) > d2 <- matrix( c(1:4,2:4,1,4,1:3,3,4,1,2),ncol=4) > d3 <- matrix( rep(1:3,each=2), ncol=2) > isCbalanced(d1) The design is not (first order) carry-over balanced. Left neighbour incidence matrix M_ij (i is left neighbour of j) [,1] [,2] [,3] [,4] [1,] 1 0 0 0 [2,] 1 0 0 0 [3,] 1 0 0 0 [4,] 1 0 0 0 > isCbalanced(d1,TRUE) The design is not (first order) carry-over balanced. Left neighbour incidence matrix M_ij (i is left neighbour of j) [,1] [,2] [,3] [,4] [1,] 2 1 1 1 [2,] 1 0 0 0 [3,] 1 0 0 0 [4,] 1 0 0 0 > isCbalanced(d2) The design is (first order) carry-over balanced. Left neighbour incidence matrix M_ij (i is left neighbour of j) [,1] [,2] [,3] [,4] [1,] 0 1 1 1 [2,] 1 0 1 1 [3,] 1 1 0 1 [4,] 1 1 1 0 > isCbalanced(d3,TRUE) The design is (first order) carry-over balanced. Left neighbour incidence matrix M_ij (i is left neighbour of j) [,1] [,2] [,3] [1,] 0 1 1 [2,] 1 0 1 [3,] 1 1 0 > > > > cleanEx(); ..nameEx <- "isGYD" > > ### * isGYD > > flush(stderr()); flush(stdout()) > > ### Name: isGYD > ### Title: Checking Simple Block and Row-Column Designs for Balance > ### Aliases: isGYD > ### Keywords: design > > ### ** Examples > > d1 <- matrix( c(1,2,3,4,1,1,1,1), 4,2) > # d1 is not balanced > d2 <- matrix( c(1:4,2:4,1,4,1:3,3,4,1,2),ncol=4) > # d2 is a latin square > d3 <- matrix( rep(1:3,each=2), ncol=2) > # d3 is a balanced incomplete block design. > d1 [,1] [,2] [1,] 1 1 [2,] 2 1 [3,] 3 1 [4,] 4 1 > isGYD(d1,tables=TRUE) [1] The design is neither balanced w.r.t. rows nor w.r.t. columns. $"Number of occurrences of treatments in d" 1 2 3 4 5 1 1 1 $"Row incidence matrix of d" 1 2 3 4 1 2 1 1 1 2 0 1 0 0 3 0 0 1 0 4 0 0 0 1 $"Column incidence matrix of d" 1 2 1 1 4 2 1 0 3 1 0 4 1 0 $"Concurrence w.r.t. rows" 1 2 3 4 1 7 1 1 1 2 1 1 0 0 3 1 0 1 0 4 1 0 0 1 $"Concurrence w.r.t. columns" 1 2 3 4 1 17 1 1 1 2 1 1 1 1 3 1 1 1 1 4 1 1 1 1 > d2 [,1] [,2] [,3] [,4] [1,] 1 2 4 3 [2,] 2 3 1 4 [3,] 3 4 2 1 [4,] 4 1 3 2 > isGYD(d2,tables=TRUE) [1] The design is a latin square. $"Number of occurrences of treatments in d" 1 2 3 4 4 4 4 4 $"Row incidence matrix of d" 1 2 3 4 1 1 1 1 1 2 1 1 1 1 3 1 1 1 1 4 1 1 1 1 $"Column incidence matrix of d" 1 2 3 4 1 1 1 1 1 2 1 1 1 1 3 1 1 1 1 4 1 1 1 1 $"Concurrence w.r.t. rows" 1 2 3 4 1 4 4 4 4 2 4 4 4 4 3 4 4 4 4 4 4 4 4 4 $"Concurrence w.r.t. columns" 1 2 3 4 1 4 4 4 4 2 4 4 4 4 3 4 4 4 4 4 4 4 4 4 > d3 [,1] [,2] [1,] 1 2 [2,] 1 3 [3,] 2 3 > isGYD(d3,tables=TRUE) [1] The design is a balanced incomplete block design w.r.t. rows. $"Number of occurrences of treatments in d" 1 2 3 2 2 2 $"Row incidence matrix of d" 1 2 3 1 1 1 0 2 1 0 1 3 0 1 1 $"Column incidence matrix of d" 1 2 1 2 0 2 1 1 3 0 2 $"Concurrence w.r.t. rows" 1 2 3 1 2 1 1 2 1 2 1 3 1 1 2 $"Concurrence w.r.t. columns" 1 2 3 1 4 2 0 2 2 2 2 3 0 2 4 > > > > cleanEx(); ..nameEx <- "rand.design.RC" > > ### * rand.design.RC > > flush(stderr()); flush(stdout()) > > ### Name: rand.design.RC > ### Title: Simulation Study to Asses the Validity of a Randomization > ### Procedure > ### Aliases: rand.design.RC > ### Keywords: design > > ### ** Examples > > ## Not run: > ##D > ##D # First create a data set to analyze: > ##D d <- matrix(c(1:4,2:4,1,4,1:3,3,4,1,2),ncol=4) > ##D rand.design.RC( d, rnorm(16), -1, 1, 1000, "D:\mytest.txt" ) > ##D # Now do the analysis: > ##D analyze.rand( "D:\mytest.txt", fig=TRUE, ref=TRUE, > ##D refval=c(0, -1, 0, -1, -.25, -1.25) ) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "rand.design.azais" > > ### * rand.design.azais > > flush(stderr()); flush(stdout()) > > ### Name: rand.design.azais > ### Title: Simulation Study to Asses the Validity of a Randomization > ### Procedure > ### Aliases: rand.design.azais > ### Keywords: design > > ### ** Examples > > ## Not run: > ##D > ##D # First create a data set to analyze: > ##D d <- matrix(c(1,1,1,2,2,3,4,4,3,4,2,3),ncol=3) > ##D rand.design.azais( d, rnorm(12), -1, 1, 1000, "D:\mytest.txt" ) > ##D # Now do the analysis: > ##D analyze.rand( "D:\mytest.txt", fig=TRUE, ref=TRUE, > ##D refval=c(0, -1, 0, -1, -.5, -1.5) ) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "williams.BIB" > > ### * williams.BIB > > flush(stderr()); flush(stdout()) > > ### Name: williams.BIB > ### Title: Construction of Carryover Balanced Designs Based on Balanced > ### Incomplete Block Designs > ### Aliases: williams.BIB > ### Keywords: design > > ### ** Examples > > d <- matrix( rep(1:3,each=2), ncol=2) > # # check for balance > # isGYD(d) > williams.BIB(d) [,1] [,2] [1,] 1 2 [2,] 2 1 [3,] 1 3 [4,] 3 1 [5,] 2 3 [6,] 3 2 > > > > cleanEx(); ..nameEx <- "williams" > > ### * williams > > flush(stderr()); flush(stdout()) > > ### Name: williams > ### Title: Construction of Williams Designs > ### Aliases: williams > ### Keywords: design > > ### ** Examples > > williams(3) [,1] [,2] [,3] [1,] 1 2 3 [2,] 2 3 1 [3,] 3 1 2 [4,] 3 2 1 [5,] 1 3 2 [6,] 2 1 3 > williams(10) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] 1 2 10 3 9 4 8 5 7 6 [2,] 2 3 1 4 10 5 9 6 8 7 [3,] 3 4 2 5 1 6 10 7 9 8 [4,] 4 5 3 6 2 7 1 8 10 9 [5,] 5 6 4 7 3 8 2 9 1 10 [6,] 6 7 5 8 4 9 3 10 2 1 [7,] 7 8 6 9 5 10 4 1 3 2 [8,] 8 9 7 10 6 1 5 2 4 3 [9,] 9 10 8 1 7 2 6 3 5 4 [10,] 10 1 9 2 8 3 7 4 6 5 > > > > ### *