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("SIN-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('SIN') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "ambition" > > ### * ambition > > flush(stderr()); flush(stdout()) > > ### Name: ambition > ### Title: Ambition and Attainment > ### Aliases: ambition > ### Keywords: datasets > > ### ** Examples > > data(ambition) > ambition$means X1 X2 X3 X4 X5 X6 X7 0 0 0 0 0 0 0 > ambition$stddev X1 X2 X3 X4 X5 X6 X7 1 1 1 1 1 1 1 > ambition$corr X1 X2 X3 X4 X5 X6 X7 X1 1.000 0.611 -0.108 0.250 0.248 0.410 0.331 X2 0.611 1.000 -0.152 0.277 0.294 0.446 0.303 X3 -0.108 -0.152 1.000 -0.100 -0.105 -0.213 -0.153 X4 0.250 0.277 -0.100 1.000 0.572 0.489 0.335 X5 0.248 0.294 -0.105 0.572 1.000 0.597 0.478 X6 0.410 0.446 -0.213 0.489 0.597 1.000 0.651 X7 0.331 0.303 -0.153 0.335 0.478 0.651 1.000 > ambition$n [1] 767 > > > > cleanEx(); ..nameEx <- "anxietyanger" > > ### * anxietyanger > > flush(stderr()); flush(stdout()) > > ### Name: anxietyanger > ### Title: Anxiety and Anger > ### Aliases: anxietyanger > ### Keywords: datasets > > ### ** Examples > > data(anxietyanger) > anxietyanger$means Anxiety st Anger st Anxiety tr Anger tr 18.87 15.23 21.20 23.42 > anxietyanger$stddev Anxiety st Anger st Anxiety tr Anger tr 18.87 15.23 21.20 23.42 > anxietyanger$corr Anxiety st Anger st Anxiety tr Anger tr Anxiety st 1.00 0.61 0.62 0.39 Anger st 0.61 1.00 0.47 0.50 Anxiety tr 0.62 0.47 1.00 0.49 Anger tr 0.39 0.50 0.49 1.00 > anxietyanger$n [1] 684 > > > > cleanEx(); ..nameEx <- "blauduncan" > > ### * blauduncan > > flush(stderr()); flush(stdout()) > > ### Name: blauduncan > ### Title: Blau and Duncan's data on the American occupational structure > ### Aliases: blauduncan > ### Keywords: datasets > > ### ** Examples > > data(blauduncan) > blauduncan$means Y W U X V 0 0 0 0 0 > blauduncan$stddev Y W U X V 1 1 1 1 1 > blauduncan$corr Y W U X V Y 1.000 0.541 0.596 0.405 0.322 W 0.541 1.000 0.538 0.417 0.332 U 0.596 0.538 1.000 0.438 0.453 X 0.405 0.417 0.438 1.000 0.516 V 0.322 0.332 0.453 0.516 1.000 > blauduncan$n [1] 20700 > > > > cleanEx(); ..nameEx <- "bloodpressure" > > ### * bloodpressure > > flush(stderr()); flush(stdout()) > > ### Name: bloodpressure > ### Title: Blood Pressure > ### Aliases: bloodpressure > ### Keywords: datasets > > ### ** Examples > > data(bloodpressure) > bloodpressure$means f e d c b a 0 0 0 0 0 0 > bloodpressure$stddev f e d c b a 1 1 1 1 1 1 > bloodpressure$corr f e d c b a f 1.000 0.738 0.034 -0.012 0.351 0.270 e 0.738 1.000 -0.059 -0.042 0.371 0.139 d 0.034 -0.059 1.000 0.135 -0.101 -0.058 c -0.012 -0.042 0.135 1.000 0.211 0.283 b 0.351 0.371 -0.101 0.211 1.000 0.390 a 0.270 0.139 -0.058 0.283 0.390 1.000 > bloodpressure$n [1] 98 > > > > cleanEx(); ..nameEx <- "bodyfat" > > ### * bodyfat > > flush(stderr()); flush(stdout()) > > ### Name: bodyfat > ### Title: Body Fat > ### Aliases: bodyfat > ### Keywords: datasets > > ### ** Examples > > data(bodyfat) > bodyfat$means Density Body Fat Age Weight Height Neck Chest Abdomen 1.06 19.15 44.88 178.92 70.15 37.99 100.82 92.56 Hip Thigh Knee Ankle Biceps Forearm Wrist 99.90 59.41 38.59 23.10 32.27 28.66 18.23 > bodyfat$stddev Density Body Fat Age Weight Height Neck Chest Abdomen 0.02 8.37 12.55 29.41 3.67 2.43 8.43 10.79 Hip Thigh Knee Ankle Biceps Forearm Wrist 7.17 5.26 2.42 1.70 3.03 2.02 0.93 > bodyfat$corr Density Body Fat Age Weight Height Neck Density 1.0000000 -0.98775100 -0.27408691 -0.59297013 0.10019115 -0.4717238 Body Fat -0.9877510 1.00000000 0.28789756 0.61134609 -0.09184168 0.4893657 Age -0.2740869 0.28789756 1.00000000 -0.01871757 -0.17741901 0.1091628 Weight -0.5929701 0.61134609 -0.01871757 1.00000000 0.30677489 0.8303136 Height 0.1001912 -0.09184168 -0.17741901 0.30677489 1.00000000 0.2522693 Neck -0.4717238 0.48936574 0.10916276 0.83031357 0.25226934 1.0000000 Chest -0.6816838 0.70173894 0.17140853 0.89387451 0.13282869 0.7843027 Abdomen -0.7985371 0.81304502 0.22725598 0.88778195 0.08618004 0.7535863 Hip -0.6083885 0.62427792 -0.05597465 0.94074768 0.16875485 0.7343674 Thigh -0.5535592 0.56011222 -0.20185649 0.86967113 0.14836214 0.6962348 Knee -0.4942439 0.50788486 0.01389087 0.85306185 0.28505932 0.6719424 Ankle -0.2632217 0.26426704 -0.11076695 0.61278373 0.26337635 0.4767987 Biceps -0.4874515 0.49364493 -0.04204579 0.80125550 0.20776020 0.7316868 Forearm -0.3503695 0.36010328 -0.09001493 0.62958121 0.22738371 0.6229805 Wrist -0.3232041 0.34408172 0.20698022 0.72887407 0.32010811 0.7442480 Chest Abdomen Hip Thigh Knee Ankle Density -0.6816838 -0.79853706 -0.60838850 -0.5535592 -0.49424388 -0.2632217 Body Fat 0.7017389 0.81304502 0.62427792 0.5601122 0.50788486 0.2642670 Age 0.1714085 0.22725598 -0.05597465 -0.2018565 0.01389087 -0.1107670 Weight 0.8938745 0.88778195 0.94074768 0.8696711 0.85306185 0.6127837 Height 0.1328287 0.08618004 0.16875485 0.1483621 0.28505932 0.2633763 Neck 0.7843027 0.75358626 0.73436738 0.6962348 0.67194237 0.4767987 Chest 1.0000000 0.91571754 0.82899063 0.7308119 0.71915508 0.4816816 Abdomen 0.9157175 1.00000000 0.87381556 0.7671364 0.73682658 0.4521629 Hip 0.8289906 0.87381556 1.00000000 0.8972090 0.82326662 0.5574417 Thigh 0.7308119 0.76713641 0.89720905 1.0000000 0.79947226 0.5401280 Knee 0.7191551 0.73682658 0.82326662 0.7994723 1.00000000 0.6110549 Ankle 0.4816816 0.45216289 0.55744167 0.5401280 0.61105487 1.0000000 Biceps 0.7288124 0.68538519 0.73985419 0.7614710 0.67891511 0.4850942 Forearm 0.5793066 0.50247019 0.54417189 0.5670994 0.55531200 0.4180230 Wrist 0.6587633 0.61892036 0.62899698 0.5599596 0.66424495 0.5649852 Biceps Forearm Wrist Density -0.48745151 -0.35036950 -0.3232041 Body Fat 0.49364493 0.36010328 0.3440817 Age -0.04204579 -0.09001493 0.2069802 Weight 0.80125550 0.62958121 0.7288741 Height 0.20776020 0.22738371 0.3201081 Neck 0.73168675 0.62298049 0.7442480 Chest 0.72881238 0.57930657 0.6587633 Abdomen 0.68538519 0.50247019 0.6189204 Hip 0.73985419 0.54417189 0.6289970 Thigh 0.76147103 0.56709938 0.5599596 Knee 0.67891511 0.55531200 0.6642449 Ankle 0.48509419 0.41802297 0.5649852 Biceps 1.00000000 0.67857097 0.6335570 Forearm 0.67857097 1.00000000 0.5847321 Wrist 0.63355701 0.58473209 1.0000000 > bodyfat$n [1] 252 > > > > cleanEx(); ..nameEx <- "corkborings" > > ### * corkborings > > flush(stderr()); flush(stdout()) > > ### Name: corkborings > ### Title: Cork Borings > ### Aliases: corkborings > ### Keywords: datasets > > ### ** Examples > > data(corkborings) > corkborings$means N E S W 50.54 46.18 49.68 45.18 > corkborings$stddev N E S W 17.04 14.83 18.71 15.03 > corkborings$corr N E S W N 1.0000 0.8854 0.9047 0.8832 E 0.8854 1.0000 0.8256 0.7687 S 0.9047 0.8256 1.0000 0.9228 W 0.8832 0.7687 0.9228 1.0000 > corkborings$n [1] 28 > > > > cleanEx(); ..nameEx <- "fisherz" > > ### * fisherz > > flush(stderr()); flush(stdout()) > > ### Name: fisherz > ### Title: Fisher's z-transform > ### Aliases: fisherz > ### Keywords: multivariate > > ### ** Examples > > corrs <- c(-0.5,0,0.5) > fisherz(corrs) [1] -0.5493061 0.0000000 0.5493061 > > > > cleanEx(); ..nameEx <- "fowlbones" > > ### * fowlbones > > flush(stderr()); flush(stdout()) > > ### Name: fowlbones > ### Title: Fowl Bones > ### Aliases: fowlbones > ### Keywords: datasets > > ### ** Examples > > data(fowlbones) > fowlbones$means skull length skull breadth humerus ulna femur 0 0 0 0 0 tibia 0 > fowlbones$stddev skull length skull breadth humerus ulna femur 1 1 1 1 1 tibia 1 > fowlbones$corr skull length skull breadth humerus ulna femur tibia skull length 1.000 0.584 0.615 0.601 0.570 0.600 skull breadth 0.584 1.000 0.576 0.530 0.526 0.555 humerus 0.615 0.576 1.000 0.940 0.875 0.878 ulna 0.601 0.530 0.940 1.000 0.877 0.886 femur 0.570 0.526 0.875 0.877 1.000 0.924 tibia 0.600 0.555 0.878 0.886 0.924 1.000 > fowlbones$n [1] 276 > > > > cleanEx(); ..nameEx <- "fretsheads" > > ### * fretsheads > > flush(stderr()); flush(stdout()) > > ### Name: fretsheads > ### Title: Frets' Heads > ### Aliases: fretsheads > ### Keywords: datasets > > ### ** Examples > > data(fretsheads) > fretsheads$means X1 X2 X3 X4 185.72 151.12 183.84 149.24 > fretsheads$stddev X1 X2 X3 X4 17.04 14.83 18.71 15.03 > fretsheads$corr X1 X2 X3 X4 X1 1.0000 0.8854 0.9047 0.8832 X2 0.8854 1.0000 0.8256 0.7687 X3 0.9047 0.8256 1.0000 0.9228 X4 0.8832 0.7687 0.9228 1.0000 > fretsheads$n [1] 25 > > > > cleanEx(); ..nameEx <- "getgraph" > > ### * getgraph > > flush(stderr()); flush(stdout()) > > ### Name: getgraph > ### Title: Obtain graph from simultaneous p-values > ### Aliases: getgraph > ### Keywords: multivariate > > ### ** Examples > > data(fowlbones) > pvals <- sinUG(fowlbones$corr,fowlbones$n) > alpha <- 0.2 > ## get undirected graph > getgraph(pvals, alpha, type="UG") skull length skull breadth humerus ulna femur tibia skull length 0 1 0 0 0 0 skull breadth 1 0 1 0 0 0 humerus 0 1 0 1 1 0 ulna 0 0 1 0 0 1 femur 0 0 1 0 0 1 tibia 0 0 0 1 1 0 > ## forget that we used sinUG and get acyclic directed graph > getgraph(pvals, alpha, type="DAG") skull length skull breadth humerus ulna femur tibia skull length 0 1 0 0 0 0 skull breadth 0 0 1 0 0 0 humerus 0 0 0 1 1 0 ulna 0 0 0 0 0 1 femur 0 0 0 0 0 1 tibia 0 0 0 0 0 0 > ## forget that we used sinUG and get bidirected graph > getgraph(pvals, alpha, type="BG") skull length skull breadth humerus ulna femur tibia skull length 0 2 0 0 0 0 skull breadth 2 0 2 0 0 0 humerus 0 2 0 2 2 0 ulna 0 0 2 0 0 2 femur 0 0 2 0 0 2 tibia 0 0 0 2 2 0 > ## forget that we used sinUG and get chain graph > myblocks <- list(1:2,3:4,5:6) > getgraph(pvals, alpha, type="CG", blocks=myblocks) skull length skull breadth humerus ulna femur tibia skull length 0 1 0 0 0 0 skull breadth 1 0 1 0 0 0 humerus 0 0 0 1 1 0 ulna 0 0 1 0 0 1 femur 0 0 0 0 0 1 tibia 0 0 0 0 1 0 > > > > cleanEx(); ..nameEx <- "glucose" > > ### * glucose > > flush(stderr()); flush(stdout()) > > ### Name: glucose > ### Title: Glucose > ### Aliases: glucose > ### Keywords: datasets > > ### ** Examples > > data(glucose) > glucose$means GHb knowledge duration fatalism 10.02 33.18 147.05 20.13 > glucose$stddev GHb knowledge duration fatalism 2.07 7.86 92.00 5.75 > glucose$corr GHb knowledge duration fatalism GHb 1.000 -0.344 -0.404 -0.071 knowledge -0.344 1.000 0.042 -0.460 duration -0.404 0.042 1.000 0.060 fatalism -0.071 -0.460 0.060 1.000 > glucose$n [1] 39 > > > > cleanEx(); ..nameEx <- "grades" > > ### * grades > > flush(stderr()); flush(stdout()) > > ### Name: grades > ### Title: School Grades > ### Aliases: grades > ### Keywords: datasets > > ### ** Examples > > data(grades) > grades$means Gaelic English history arithmetic algebra geometry 0 0 0 0 0 0 > grades$stddev Gaelic English history arithmetic algebra geometry 1 1 1 1 1 1 > grades$corr Gaelic English history arithmetic algebra geometry Gaelic 1.000 0.439 0.410 0.288 0.329 0.248 English 0.439 1.000 0.351 0.354 0.320 0.329 history 0.410 0.351 1.000 0.364 0.190 0.181 arithmetic 0.288 0.354 0.364 1.000 0.595 0.470 algebra 0.329 0.320 0.190 0.595 1.000 0.464 geometry 0.248 0.329 0.181 0.470 0.464 1.000 > grades$n [1] 220 > > > > cleanEx(); ..nameEx <- "hiv" > > ### * hiv > > flush(stderr()); flush(stdout()) > > ### Name: hiv > ### Title: HIV > ### Aliases: hiv > ### Keywords: datasets > > ### ** Examples > > data(hiv) > hiv$means immunoglobin G immunoglobin A lymphocyte B 0 0 0 platelet count lymphocyte T4 T4/T8 lymphocyte ratio 0 0 0 > hiv$stddev immunoglobin G immunoglobin A lymphocyte B 2.97 0.44 2987.35 platelet count lymphocyte T4 T4/T8 lymphocyte ratio 142.80 1397.42 1.17 > hiv$corr immunoglobin G immunoglobin A lymphocyte B immunoglobin G 1.0000 0.4829 0.2198 immunoglobin A 0.4829 1.0000 0.0572 lymphocyte B 0.2198 0.0572 1.0000 platelet count -0.0398 -0.1328 0.1491 lymphocyte T4 0.2526 -0.1242 0.5227 T4/T8 lymphocyte ratio -0.2757 -0.3144 -0.1834 platelet count lymphocyte T4 T4/T8 lymphocyte ratio immunoglobin G -0.0398 0.2526 -0.2757 immunoglobin A -0.1328 -0.1242 -0.3144 lymphocyte B 0.1491 0.5227 -0.1834 platelet count 1.0000 0.1794 0.0639 lymphocyte T4 0.1794 1.0000 0.2126 T4/T8 lymphocyte ratio 0.0639 0.2126 1.0000 > hiv$n [1] 107 > > > > cleanEx(); ..nameEx <- "holm" > > ### * holm > > flush(stderr()); flush(stdout()) > > ### Name: holm > ### Title: Holm's step-down p-values > ### Aliases: holm > ### Keywords: multivariate > > ### ** Examples > > data(mathmarks) > sinUG(mathmarks$corr,mathmarks$n) mechanics vectors algebra analysis statistics mechanics NA 0.0155291 0.1567332 1.0000000 0.9945295 vectors 0.0155291 NA 0.0613124 0.9256877 0.9945295 algebra 0.1567332 0.0613124 NA 0.0002853 0.0065240 analysis 1.0000000 0.9256877 0.0002853 NA 0.1100292 statistics 0.9945295 0.9945295 0.0065240 0.1100292 NA > holm(sinUG(mathmarks$corr,mathmarks$n)) mechanics vectors algebra analysis statistics mechanics NA 0.0124427 0.0817044 1.0000000 0.7903919 vectors 0.0124427 NA 0.0433243 0.6464716 0.7903919 algebra 0.0817044 0.0433243 NA 0.0002853 0.0058735 analysis 1.0000000 0.6464716 0.0002853 NA 0.0675502 statistics 0.7903919 0.7903919 0.0058735 0.0675502 NA > > > > cleanEx(); ..nameEx <- "is.blocks" > > ### * is.blocks > > flush(stderr()); flush(stdout()) > > ### Name: is.blocks > ### Title: Check variable blocking > ### Aliases: is.blocks > ### Keywords: multivariate > > ### ** Examples > > p <- 6 > blocks <- list(1:3,6,5:4) > is.blocks(blocks, p) [1] TRUE > blocks <- list(1:3,7,5:4) > is.blocks(blocks, p) [1] FALSE > blocks <- list(1:2,6,5:4) > is.blocks(blocks, p) [1] FALSE > > > > cleanEx(); ..nameEx <- "mathmarks" > > ### * mathmarks > > flush(stderr()); flush(stdout()) > > ### Name: mathmarks > ### Title: Mathematics marks > ### Aliases: mathmarks > ### Keywords: datasets > > ### ** Examples > > data(mathmarks) > mathmarks$means mechanics vectors algebra analysis statistics 38.95 50.59 50.60 46.68 42.31 > mathmarks$stddev mechanics vectors algebra analysis statistics 17.49 13.15 10.62 14.85 17.26 > mathmarks$corr mechanics vectors algebra analysis statistics mechanics 1.0000 0.5534 0.5468 0.4094 0.3891 vectors 0.5534 1.0000 0.6096 0.4851 0.4364 algebra 0.5468 0.6096 1.0000 0.7108 0.6647 analysis 0.4094 0.4851 0.7108 1.0000 0.6072 statistics 0.3891 0.4364 0.6647 0.6072 1.0000 > mathmarks$n [1] 88 > > > > cleanEx(); ..nameEx <- "moth" > > ### * moth > > flush(stderr()); flush(stdout()) > > ### Name: moth > ### Title: Noctuid Moth Trappings > ### Aliases: moth > ### Keywords: datasets > > ### ** Examples > > data(moth) > moth$means min max wind rain cloud moth 0 0 0 0 0 0 > moth$stddev min max wind rain cloud moth 1 1 1 1 1 1 > moth$corr min max wind rain cloud moth min 1.00 0.40 0.37 0.18 -0.46 0.29 max 0.40 1.00 0.02 -0.09 0.02 0.22 wind 0.37 0.02 1.00 0.05 -0.13 -0.24 rain 0.18 -0.09 0.05 1.00 -0.47 0.11 cloud -0.46 0.02 -0.13 -0.47 1.00 -0.37 moth 0.29 0.22 -0.24 0.11 -0.37 1.00 > moth$n [1] 72 > > > > cleanEx(); ..nameEx <- "plotBGpvalues" > > ### * plotBGpvalues > > flush(stderr()); flush(stdout()) > > ### Name: plotBGpvalues > ### Title: Plot simultaneous p-values for bidirected graphs > ### Aliases: plotBGpvalues > ### Keywords: multivariate > > ### ** Examples > > data(stressful) > pvals <- holm(sinBG(stressful$corr,stressful$n)) > ## Not run: plotBGpvalues(pvals) > ## Not run: plotBGpvalues(pvals, legend=FALSE) > ## Not run: plotBGpvalues(pvals, legendpos=c(5,0.5)) > ## Not run: plotBGpvalues(pvals, legend=TRUE, legendpos=c(5,0.5)) > > > > cleanEx(); ..nameEx <- "plotCGpvalues" > > ### * plotCGpvalues > > flush(stderr()); flush(stdout()) > > ### Name: plotCGpvalues > ### Title: Plot simultaneous p-values for chain graphs > ### Aliases: plotCGpvalues > ### Keywords: multivariate > > ### ** Examples > > data(fowlbones) > blocks <- list(1:2,3:4,5:6) > pvals <- holm(sinCG(blocks,fowlbones$corr,fowlbones$n, type="AMP")) > ## Not run: plotCGpvalues(blocks, pvals) > ## Not run: plotCGpvalues(blocks, pvals, legend=FALSE) > ## Not run: plotCGpvalues(blocks, pvals, legendpos=c(7,0.5)) > ## Not run: plotCGpvalues(blocks, pvals, legend=TRUE, legendpos=c(7,0.5)) > > > > cleanEx(); ..nameEx <- "plotDAGpvalues" > > ### * plotDAGpvalues > > flush(stderr()); flush(stdout()) > > ### Name: plotDAGpvalues > ### Title: Plot simultaneous p-values for acyclic directed graphs > ### Aliases: plotDAGpvalues > ### Keywords: multivariate > > ### ** Examples > > data(fowlbones) > p <- dim(fowlbones$corr)[1] > pvals <- holm(sinDAG(list(1:p),fowlbones$corr,fowlbones$n)) > ## Not run: plotDAGpvalues(pvals) > ## Not run: plotDAGpvalues(pvals, legend=FALSE) > ## Not run: plotDAGpvalues(pvals, legendpos=c(7,0.5)) > ## Not run: plotDAGpvalues(pvals, legend=TRUE, legendpos=c(7,0.5)) > > > > cleanEx(); ..nameEx <- "plotUGpvalues" > > ### * plotUGpvalues > > flush(stderr()); flush(stdout()) > > ### Name: plotUGpvalues > ### Title: Plot simultaneous p-values for undirected graphs > ### Aliases: plotUGpvalues > ### Keywords: multivariate > > ### ** Examples > > data(fowlbones) > pvals <- holm(sinUG(fowlbones$corr,fowlbones$n)) > ## Not run: plotUGpvalues(pvals) > ## Not run: plotUGpvalues(pvals, legend=FALSE) > ## Not run: plotUGpvalues(pvals, legendpos=c(7,0.5)) > ## Not run: plotUGpvalues(pvals, legend=TRUE, legendpos=c(7,0.5)) > > > > cleanEx(); ..nameEx <- "pubprod" > > ### * pubprod > > flush(stderr()); flush(stdout()) > > ### Name: pubprod > ### Title: Publishing productivity > ### Aliases: pubprod > ### Keywords: datasets > > ### ** Examples > > data(pubprod) > pubprod$means ability GPQ preprod QFJ sex cites pubs 0 0 0 0 0 0 0 > pubprod$stddev ability GPQ preprod QFJ sex cites pubs 1 1 1 1 1 1 1 > pubprod$corr ability GPQ preprod QFJ sex cites pubs ability 1.00 0.62 0.25 0.16 -0.10 0.29 0.18 GPQ 0.62 1.00 0.09 0.28 0.00 0.25 0.15 preprod 0.25 0.09 1.00 0.07 0.03 0.34 0.19 QFJ 0.16 0.28 0.07 1.00 0.10 0.37 0.41 sex -0.10 0.00 0.03 0.10 1.00 0.13 0.43 cites 0.29 0.25 0.34 0.37 0.13 1.00 0.55 pubs 0.18 0.15 0.19 0.41 0.43 0.55 1.00 > pubprod$n [1] 162 > > > > cleanEx(); ..nameEx <- "sdcor2cov" > > ### * sdcor2cov > > flush(stderr()); flush(stdout()) > > ### Name: sdcor2cov > ### Title: Covariance matrix > ### Aliases: sdcor2cov > ### Keywords: multivariate > > ### ** Examples > > data(sur) > sdcor2cov(sur$stddev, sur$corr) X1 X2 Y1 Y2 X1 0.8281000 -0.5193379 1.0274992 0.2970367 X2 -0.5193379 3.7249000 0.7621184 7.0582416 Y1 1.0274992 0.7621184 2.5600000 3.1053440 Y2 0.2970367 7.0582416 3.1053440 16.0801000 > > > > cleanEx(); ..nameEx <- "simpvalueMx" > > ### * simpvalueMx > > flush(stderr()); flush(stdout()) > > ### Name: simpvalueMx > ### Title: Simultaneous p-values > ### Aliases: simpvalueMx > ### Keywords: internal > > ### ** Examples > > data(fowlbones) > temp <- -solve(fowlbones$corr) > diag(temp) <- abs(diag(temp)) > temp <- cov2cor(temp) > round( simpvalueMx(temp,fowlbones$n), 2) [,1] [,2] [,3] [,4] [,5] [,6] [1,] NA 0.00 0.99 0.99 1.00 0.91 [2,] 0.00 NA 0.03 0.66 1.00 0.81 [3,] 0.99 0.03 NA 0.00 0.06 0.98 [4,] 0.99 0.66 0.00 NA 0.57 0.00 [5,] 1.00 1.00 0.06 0.57 NA 0.00 [6,] 0.91 0.81 0.98 0.00 0.00 NA > > > > cleanEx(); ..nameEx <- "simpvalueVec" > > ### * simpvalueVec > > flush(stderr()); flush(stdout()) > > ### Name: simpvalueVec > ### Title: Simultaneous p-values > ### Aliases: simpvalueVec > ### Keywords: internal > > ### ** Examples > > data(fowlbones) > temp <- -solve(fowlbones$corr) > diag(temp) <- abs(diag(temp)) > temp <- cov2cor(temp) > p <- dim(temp)[1] > round( simpvalueVec(temp[1,2:p],fowlbones$n,p), 2) skull breadth humerus ulna femur tibia 0.00 0.99 0.99 1.00 0.91 > > > > cleanEx(); ..nameEx <- "sinBG" > > ### * sinBG > > flush(stderr()); flush(stdout()) > > ### Name: sinBG > ### Title: SIN for bidirected graphs > ### Aliases: sinBG > ### Keywords: multivariate > > ### ** Examples > > data(stressful) > sinBG(stressful$corr,stressful$n) cognitive avoidance vigilance blunting monitoring cognitive avoidance NA 0.3207896 0.0001806 0.9956171 vigilance 0.3207896 NA 1.0000000 0.0001359 blunting 0.0001806 1.0000000 NA 0.5056668 monitoring 0.9956171 0.0001359 0.5056668 NA > sinBG(stressful$corr,stressful$n,holm=FALSE) cognitive avoidance vigilance blunting monitoring cognitive avoidance NA 0.4402340 0.0002167 0.9999999 vigilance 0.4402340 NA 1.0000000 0.0001359 blunting 0.0002167 1.0000000 NA 0.7556347 monitoring 0.9999999 0.0001359 0.7556347 NA > > > > cleanEx(); ..nameEx <- "sinCG" > > ### * sinCG > > flush(stderr()); flush(stdout()) > > ### Name: sinCG > ### Title: SIN for chain graphs > ### Aliases: sinCG > ### Keywords: multivariate > > ### ** Examples > > data(fowlbones) > p <- dim(fowlbones$corr)[1] > blocks <- list(1:2,3:4,5:6) > sinCG(blocks,fowlbones$corr,fowlbones$n, type="AMP") skull length skull breadth humerus ulna femur tibia skull length NA 0.0000000 0.0000000 0.0e+00 0.4463987 0.2589006 skull breadth 0.0000000 NA 0.0000000 4.2e-06 0.4463987 0.1697183 humerus 0.0000000 0.0000000 NA 0.0e+00 0.0000106 0.0002931 ulna 0.0000000 0.0000042 0.0000000 NA 0.0000001 0.0000000 femur 0.4463987 0.4463987 0.0000106 1.0e-07 NA 0.0000000 tibia 0.2589006 0.1697183 0.0002931 0.0e+00 0.0000000 NA > sinCG(blocks,fowlbones$corr,fowlbones$n, type="LWF") skull length skull breadth humerus ulna femur skull length NA 0.0000000 0.3797709 0.2519118 0.8834086 skull breadth 0.0000000 NA 0.0012876 0.4252817 1.0000000 humerus 0.3797709 0.0012876 NA 0.0000000 0.0457359 ulna 0.2519118 0.4252817 0.0000000 NA 0.3797709 femur 0.8834086 1.0000000 0.0457359 0.3797709 NA tibia 0.4827732 0.4376735 0.5375769 0.0033656 0.0000000 tibia skull length 0.4827732 skull breadth 0.4376735 humerus 0.5375769 ulna 0.0033656 femur 0.0000000 tibia NA > sinCG(blocks,fowlbones$corr,fowlbones$n, type="AMP", holm=FALSE) skull length skull breadth humerus ulna femur tibia skull length NA 0.0000000 0.00e+00 0e+00 0.9997663 0.7764461 skull breadth 0.0000000 NA 0.00e+00 9e-06 0.9881429 0.5021534 humerus 0.0000000 0.0000000 NA 0e+00 0.0000265 0.0008790 ulna 0.0000000 0.0000090 0.00e+00 NA 0.0000002 0.0000000 femur 0.9997663 0.9881429 2.65e-05 2e-07 NA 0.0000000 tibia 0.7764461 0.5021534 8.79e-04 0e+00 0.0000000 NA > sinCG(blocks,fowlbones$corr,fowlbones$n, type="LWF", holm=FALSE) skull length skull breadth humerus ulna femur skull length NA 0.0000000 0.6093319 0.3835166 0.9999999 skull breadth 0.0000000 NA 0.0016093 0.7495981 1.0000000 humerus 0.6093319 0.0016093 NA 0.0000000 0.0678134 ulna 0.3835166 0.7495981 0.0000000 NA 0.5916475 femur 0.9999999 1.0000000 0.0678134 0.5916475 NA tibia 0.9156075 0.8221861 0.9788555 0.0045867 0.0000000 tibia skull length 0.9156075 skull breadth 0.8221861 humerus 0.9788555 ulna 0.0045867 femur 0.0000000 tibia NA > > > > cleanEx(); ..nameEx <- "sinDAG" > > ### * sinDAG > > flush(stderr()); flush(stdout()) > > ### Name: sinDAG > ### Title: SIN for acyclic directed graphs > ### Aliases: sinDAG > ### Keywords: multivariate > > ### ** Examples > > data(fowlbones) > p <- dim(fowlbones$corr)[1] > sinDAG(list(1:p),fowlbones$corr,fowlbones$n) skull length skull breadth humerus ulna femur skull length NA 0.0000000 0.0000000 0.2020727 0.5375768 skull breadth 0.0000000 NA 0.0000000 0.4252817 0.5375768 humerus 0.0000000 0.0000000 NA 0.0000000 0.0000159 ulna 0.2020727 0.4252817 0.0000000 NA 0.0000001 femur 0.5375768 0.5375768 0.0000159 0.0000001 NA tibia 0.4827732 0.4376734 0.5375768 0.0024489 0.0000000 tibia skull length 0.4827732 skull breadth 0.4376734 humerus 0.5375768 ulna 0.0024489 femur 0.0000000 tibia NA > sinDAG(list(1:p),fowlbones$corr,fowlbones$n,holm=FALSE) skull length skull breadth humerus ulna femur skull length NA 0.0000000 0.0000000 0.3835166 0.9997663 skull breadth 0.0000000 NA 0.0000000 0.7495981 0.9881429 humerus 0.0000000 0.0000000 NA 0.0000000 0.0000265 ulna 0.3835166 0.7495981 0.0000000 NA 0.0000002 femur 0.9997663 0.9881429 0.0000265 0.0000002 NA tibia 0.9156075 0.8221861 0.9788555 0.0045867 0.0000000 tibia skull length 0.9156075 skull breadth 0.8221861 humerus 0.9788555 ulna 0.0045867 femur 0.0000000 tibia NA > sinDAG(list(3,2,1,4,5,6),fowlbones$corr,fowlbones$n) skull length skull breadth humerus ulna femur skull length NA 0.0000000 0.0000000 0.2020727 0.5375768 skull breadth 0.0000000 NA 0.0000000 0.4252817 0.5375768 humerus 0.0000000 0.0000000 NA 0.0000000 0.0000159 ulna 0.2020727 0.4252817 0.0000000 NA 0.0000001 femur 0.5375768 0.5375768 0.0000159 0.0000001 NA tibia 0.4827732 0.4376734 0.5375768 0.0024489 0.0000000 tibia skull length 0.4827732 skull breadth 0.4376734 humerus 0.5375768 ulna 0.0024489 femur 0.0000000 tibia NA > > > > cleanEx(); ..nameEx <- "sinUG" > > ### * sinUG > > flush(stderr()); flush(stdout()) > > ### Name: sinUG > ### Title: SIN for undirected graphs > ### Aliases: sinUG > ### Keywords: multivariate > > ### ** Examples > > data(fowlbones) > sinUG(fowlbones$corr,fowlbones$n) skull length skull breadth humerus ulna femur skull length NA 0.0000000 0.7234760 0.7234760 0.8804878 skull breadth 0.0000000 NA 0.0236927 0.4509763 0.8804878 humerus 0.7234760 0.0236927 NA 0.0000000 0.0457360 ulna 0.7234760 0.4509763 0.0000000 NA 0.4157199 femur 0.8804878 0.8804878 0.0457360 0.4157199 NA tibia 0.6280184 0.5533328 0.7234760 0.0036711 0.0000000 tibia skull length 0.6280184 skull breadth 0.5533328 humerus 0.7234760 ulna 0.0036711 femur 0.0000000 tibia NA > sinUG(fowlbones$corr,fowlbones$n, holm=FALSE) skull length skull breadth humerus ulna femur skull length NA 0.0000000 0.9896870 0.9898033 0.9999999 skull breadth 0.0000000 NA 0.0321684 0.6751123 1.0000000 humerus 0.9896870 0.0321684 NA 0.0000000 0.0678134 ulna 0.9898033 0.6751123 0.0000000 NA 0.5916475 femur 0.9999999 1.0000000 0.0678134 0.5916475 NA tibia 0.9156075 0.8221861 0.9788555 0.0045867 0.0000000 tibia skull length 0.9156075 skull breadth 0.8221861 humerus 0.9788555 ulna 0.0045867 femur 0.0000000 tibia NA > > > > cleanEx(); ..nameEx <- "socstatus" > > ### * socstatus > > flush(stderr()); flush(stdout()) > > ### Name: socstatus > ### Title: Social Status and Participation > ### Aliases: socstatus > ### Keywords: datasets > > ### ** Examples > > data(socstatus) > socstatus$means X1 X2 X3 Y1 Y2 Y3 0 0 0 0 0 0 > socstatus$stddev X1 X2 X3 Y1 Y2 Y3 1 1 1 1 1 1 > socstatus$corr X1 X2 X3 Y1 Y2 Y3 X1 1.00 0.30 0.31 0.10 0.28 0.18 X2 0.30 1.00 0.34 0.16 0.19 0.14 X3 0.31 0.34 1.00 0.16 0.32 0.23 Y1 0.10 0.16 0.16 1.00 0.36 0.21 Y2 0.28 0.19 0.32 0.36 1.00 0.26 Y3 0.18 0.14 0.23 0.21 0.26 1.00 > socstatus$n [1] 530 > > > > cleanEx(); ..nameEx <- "stressful" > > ### * stressful > > flush(stderr()); flush(stdout()) > > ### Name: stressful > ### Title: Stressful Events > ### Aliases: stressful > ### Keywords: datasets > > ### ** Examples > > data(stressful) > stressful$means cognitive avoidance vigilance blunting monitoring 17.49 12.57 3.71 10.40 > stressful$stddev cognitive avoidance vigilance blunting monitoring 6.77 6.39 2.12 3.07 > stressful$corr cognitive avoidance vigilance blunting monitoring cognitive avoidance 1.00 -0.20 0.46 0.01 vigilance -0.20 1.00 0.00 0.47 blunting 0.46 0.00 1.00 -0.15 monitoring 0.01 0.47 -0.15 1.00 > stressful$n [1] 72 > > > > cleanEx(); ..nameEx <- "sur" > > ### * sur > > flush(stderr()); flush(stdout()) > > ### Name: sur > ### Title: Simulated Data from Seemingly Unrelated Regressions > ### Aliases: sur > ### Keywords: datasets > > ### ** Examples > > data(sur) > sur$means X1 X2 Y1 Y2 0.49 -0.37 0.62 0.35 > sur$stddev X1 X2 Y1 Y2 0.91 1.93 1.60 4.01 > sur$corr X1 X2 Y1 Y2 X1 1.0000 -0.2957 0.7057 0.0814 X2 -0.2957 1.0000 0.2468 0.9120 Y1 0.7057 0.2468 1.0000 0.4840 Y2 0.0814 0.9120 0.4840 1.0000 > sur$n [1] 8 > > > > cleanEx(); ..nameEx <- "university1992" > > ### * university1992 > > flush(stderr()); flush(stdout()) > > ### Name: university1992 > ### Title: Druzdzel and Glymour's University Data 1992 > ### Aliases: university1992 > ### Keywords: datasets > > ### ** Examples > > data(university1992) > university1992$means spend apgra top10 rejr tstsc pacc strat salar 0 0 0 0 0 0 0 0 > university1992$stddev spend apgra top10 rejr tstsc pacc strat salar 1 1 1 1 1 1 1 1 > university1992$corr spend apgra top10 rejr tstsc pacc strat salar spend 1.0000 0.6012 0.6756 0.6335 0.7149 -0.2367 -0.5617 0.7118 apgra 0.6012 1.0000 0.6425 0.5149 0.7822 -0.3028 -0.4583 0.6358 top10 0.6756 0.6425 1.0000 0.6432 0.7988 -0.2075 -0.2478 0.6376 rejr 0.6335 0.5149 0.6432 1.0000 0.6286 -0.0715 -0.2836 0.6068 tstsc 0.7149 0.7822 0.7988 0.6286 1.0000 -0.1642 -0.4652 0.7155 pacc -0.2367 -0.3028 -0.2075 -0.0715 -0.1642 1.0000 0.1318 -0.3752 strat -0.5617 -0.4583 -0.2478 -0.2836 -0.4652 0.1318 1.0000 -0.3477 salar 0.7118 0.6358 0.6376 0.6068 0.7155 -0.3752 -0.3477 1.0000 > university1992$n [1] 170 > > > > cleanEx(); ..nameEx <- "university1993" > > ### * university1993 > > flush(stderr()); flush(stdout()) > > ### Name: university1993 > ### Title: Druzdzel and Glymour's University Data 1993 > ### Aliases: university1993 > ### Keywords: datasets > > ### ** Examples > > data(university1993) > university1993$means spend apgra top10 rejr tstsc pacc strat salar 0 0 0 0 0 0 0 0 > university1993$stddev spend apgra top10 rejr tstsc pacc strat salar 1 1 1 1 1 1 1 1 > university1993$corr spend apgra top10 rejr tstsc pacc strat salar spend 1.0000 0.5455 0.6381 0.4766 0.6732 -0.3807 -0.7713 0.6954 apgra 0.5455 1.0000 0.5879 0.4720 0.7403 -0.4237 -0.3867 0.6328 top10 0.6381 0.5879 1.0000 0.5674 0.7655 -0.2498 -0.3099 0.6025 rejr 0.4766 0.4720 0.5674 1.0000 0.5813 -0.0810 -0.2721 0.4885 tstsc 0.6732 0.7403 0.7655 0.5813 1.0000 -0.2985 -0.4688 0.6515 pacc -0.3807 -0.4237 -0.2498 -0.0810 -0.2985 1.0000 0.1909 -0.5159 strat -0.7713 -0.3867 -0.3099 -0.2721 -0.4688 0.1909 1.0000 -0.3737 salar 0.6954 0.6328 0.6025 0.4885 0.6515 -0.5159 -0.3737 1.0000 > university1993$n [1] 159 > > > > ### *