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("Icens-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('Icens') Loading required package: survival Loading required package: splines > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "BVcliques" > > ### * BVcliques > > flush(stderr()); flush(stdout()) > > ### Name: BVcliques > ### Title: Find the bivariate cliques from the marginal data. > ### Aliases: BVcliques > ### Keywords: manip > > ### ** Examples > > data(cmv) > cmv.cl <- BVcliques(cmv[,1:2], cmv[,3:4], Lxopen=FALSE, Lyopen=FALSE ) > > > > cleanEx(); ..nameEx <- "BVclmat" > > ### * BVclmat > > flush(stderr()); flush(stdout()) > > ### Name: BVclmat > ### Title: Comput the clique matrix from the clique list. > ### Aliases: BVclmat > ### Keywords: manip > > ### ** Examples > > data(cmv) > bcl <- BVcliques(cmv[,1:2], cmv[,3:4]) > A <- BVclmat(bcl) > > > > cleanEx(); ..nameEx <- "BVsupport" > > ### * BVsupport > > flush(stderr()); flush(stdout()) > > ### Name: BVsupport > ### Title: Compute the support for the cliques of a bivariate intersection > ### graph. > ### Aliases: BVsupport > ### Keywords: manip > > ### ** Examples > > data(cmv) > cmv.cl <- BVcliques(cmv[,1:2], cmv[,3:4]) > boxes <- BVsupport(cmv[,1:2], cmv[,3:4], cmv.cl) > > > > cleanEx(); ..nameEx <- "EM" > > ### * EM > > flush(stderr()); flush(stdout()) > > ### Name: EM > ### Title: A function to compute the NPMLE of p based on the incidence > ### matrix A. > ### Aliases: EM > ### Keywords: nonparametric > > ### ** Examples > > data(cosmesis) > csub1 <- subset(cosmesis, subset= Trt==0, select=c(L,R)) > EM(csub1) $pf [1] 4.634677e-02 3.336337e-02 8.866737e-02 7.075292e-02 0.000000e+00 [6] 0.000000e+00 9.264584e-02 0.000000e+00 8.178576e-02 0.000000e+00 [11] 8.671167e-13 1.208798e-01 6.597546e-12 4.655581e-01 $numiter [1] 370 $converge [1] TRUE $intmap [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 4 6 7 11 15 17 24 25 33 34 36 38 40 46 [2,] 5 7 8 12 16 18 25 26 34 35 37 40 44 48 attr(,"class") [1] "icsurv" > data(pruitt) > EM(pruitt) $pf [1] 0.12500000 0.15103698 0.20998211 0.15296182 0.04016529 0.05543585 0.26541796 $numiter [1] 231 $converge [1] TRUE $intmap NULL attr(,"class") [1] "icsurv" > > > > cleanEx(); ..nameEx <- "EMICM" > > ### * EMICM > > flush(stderr()); flush(stdout()) > > ### Name: EMICM > ### Title: Compute the NPMLE for censored data using the EMICM. > ### Aliases: EMICM > ### Keywords: optimize > > ### ** Examples > > data(cosmesis) > csub1 <- subset(cosmesis, subset=Trt==0, select=c(L,R)) > EMICM(csub1) $sigma [1] 0.04634677 0.07971014 0.16837751 0.23913044 0.23913044 0.23913044 [7] 0.33177627 0.33177627 0.41356204 0.41356204 0.41356204 0.53444187 [13] 0.53444187 1.00000000 $pf [1] 0.04634677 0.03336337 0.08866737 0.07075292 0.00000000 0.00000000 [7] 0.09264584 0.00000000 0.08178577 0.00000000 0.00000000 0.12087983 [13] 0.00000000 0.46555813 $llk [1] -58.06002 $weights [1] 626.75573 236.08264 604.37156 267.74235 274.08638 356.04281 382.51309 [8] 294.83287 152.40891 110.02664 229.56934 28.96042 178.39798 84.24237 $lastchange [1] 2.176308e-09 2.609024e-15 9.322564e-10 1.199292e-09 1.199292e-09 [6] 1.199292e-09 -1.521946e-08 -1.521946e-08 -7.066271e-09 -7.066271e-09 [11] -7.066271e-09 -2.250525e-08 -2.250525e-08 0.000000e+00 $numiter [1] 10 $eps [1] 1e-07 $intmap [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 4 6 7 11 15 17 24 25 33 34 36 38 40 46 [2,] 5 7 8 12 16 18 25 26 34 35 37 40 44 48 attr(,"class") [1] "icsurv" > data(pruitt) > EMICM(pruitt) $sigma [1] 0.1250000 0.2666349 0.4860189 0.6389807 0.6885481 0.7345821 1.0000000 $pf [1] 0.12499999 0.14163492 0.21938398 0.15296184 0.04956740 0.04603393 0.26541795 $llk [1] -10.68207 $weights [1] 99.02612 43.68736 64.60762 79.90472 43.68736 28.39026 24.00636 $lastchange [1] -1.325223e-08 9.560889e-08 8.196679e-08 7.318328e-08 8.754194e-08 [6] -4.528669e-08 0.000000e+00 $numiter [1] 27 $eps [1] 1e-07 attr(,"class") [1] "icsurv" > > > > cleanEx(); ..nameEx <- "ISDM" > > ### * ISDM > > flush(stderr()); flush(stdout()) > > ### Name: ISDM > ### Title: Estimate the NPMLE of censored data using the ISDM method > ### proposed in Lesperance and Kalbfleisch (19 > ### Aliases: ISDM > ### Keywords: optimize > > ### ** Examples > > data(cosmesis) > csub1 <- subset(cosmesis, subset=Trt==0, select=c(L,R)) > ISDM(csub1) Warning in VEM(aug, p1, tol = 1e-05/numiter, tolbis = 1e-05/numiter) : VEM may have failed to converge Warning in VEM(aug, p1, tol = 1e-05/numiter, tolbis = 1e-05/numiter) : VEM may have failed to converge Warning in VEM(aug, p1, tol = 1e-05/numiter, tolbis = 1e-05/numiter) : VEM may have failed to converge Warning in VEM(aug, p1, tol = 1e-05/numiter, tolbis = 1e-05/numiter) : VEM may have failed to converge Warning in VEM(aug, p1, tol = 1e-05/numiter, tolbis = 1e-05/numiter) : VEM may have failed to converge Warning in VEM(aug, p1, tol = 1e-05/numiter, tolbis = 1e-05/numiter) : VEM may have failed to converge Warning in VEM(aug, p1, tol = 1e-05/numiter, tolbis = 1e-05/numiter) : VEM may have failed to converge Warning in VEM(aug, p1, tol = 1e-05/numiter, tolbis = 1e-05/numiter) : VEM may have failed to converge Warning in VEM(aug, p1, tol = 1e-05/numiter, tolbis = 1e-05/numiter) : VEM may have failed to converge Warning in VEM(aug, p1, tol = 1e-05/numiter, tolbis = 1e-05/numiter) : VEM may have failed to converge $pf [1] 4.634677e-02 3.336337e-02 8.866737e-02 7.075291e-02 0.000000e+00 [6] 0.000000e+00 9.264583e-02 0.000000e+00 8.178578e-02 3.094890e-16 [11] 5.046047e-16 1.208798e-01 0.000000e+00 4.655581e-01 $numiter [1] 138 $intmap [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 4 6 7 11 15 17 24 25 33 34 36 38 40 46 [2,] 5 7 8 12 16 18 25 26 34 35 37 40 44 48 $converge [1] TRUE attr(,"class") [1] "icsurv" > # data(pruitt) > # ISDM(pruitt) > > > > cleanEx(); ..nameEx <- "MLEintvl" > > ### * MLEintvl > > flush(stderr()); flush(stdout()) > > ### Name: MLEintvl > ### Title: Compute the real representation for the maximal cliques. > ### Aliases: MLEintvl > ### Keywords: manip > > ### ** Examples > > data(cosmesis) > csub1 <- subset(cosmesis, subset=Trt==0, select=c(L,R)) > MLEintvl(csub1) [,1] [,2] [1,] 4 5 [2,] 6 7 [3,] 7 8 [4,] 11 12 [5,] 15 16 [6,] 17 18 [7,] 24 25 [8,] 25 26 [9,] 33 34 [10,] 34 35 [11,] 36 37 [12,] 38 40 [13,] 40 44 [14,] 46 48 > > > > cleanEx(); ..nameEx <- "Maclist" > > ### * Maclist > > flush(stderr()); flush(stdout()) > > ### Name: Maclist > ### Title: A function to > ### Aliases: Maclist > ### Keywords: manip > > ### ** Examples > > data(cosmesis) > csub1 <- subset(cosmesis, subset=Trt==0, select=c(L,R)) > ml1 <- Maclist(csub1) > > > > cleanEx(); ..nameEx <- "Macmat" > > ### * Macmat > > flush(stderr()); flush(stdout()) > > ### Name: Macmat > ### Title: A function to compute the incidence matrix for an intersction > ### graph. > ### Aliases: Macmat > ### Keywords: manip > > ### ** Examples > > data(cosmesis) > csub1 <- subset(cosmesis, subset=Trt==0, select=c(L,R)) > ml1 <- Maclist(csub1) > mm1 <- Macmat(ml1) > > > > cleanEx(); ..nameEx <- "PGM" > > ### * PGM > > flush(stderr()); flush(stdout()) > > ### Name: PGM > ### Title: An implementation of the projected gradient methods for finding > ### the NPMLE. > ### Aliases: PGM > ### Keywords: optimize > > ### ** Examples > > data(cosmesis) > csub1 <- subset(cosmesis, subset=Trt==0, select=c(L,R)) > PGM(csub1) $pf [1] 0.04634676 0.03336338 0.08866735 0.07075292 0.00000000 0.00000000 [7] 0.09264583 0.00000000 0.08178576 0.00000000 0.00000000 0.12087979 [13] 0.00000000 0.46555820 $sigma [1] 0.04634676 0.07971014 0.16837749 0.23913042 0.23913042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 0 0 0 0 0 0 0 0 [2,] 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 [3,] 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 [4,] 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [5,] 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [6,] 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 [7,] 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 1 0 0 0 [8,] 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 0 0 0 [9,] 0 0 0 0 0 0 1 1 0 0 1 0 1 1 1 0 0 0 0 [10,] 0 0 0 0 0 0 1 1 0 0 1 0 1 1 1 0 0 1 0 [11,] 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 0 0 1 1 [12,] 0 0 1 0 1 0 1 1 1 0 0 0 1 1 1 0 1 1 1 [13,] 0 0 1 0 1 0 1 1 1 0 0 0 1 1 1 0 1 1 1 [14,] 1 0 1 0 1 0 1 1 1 0 0 0 1 1 1 0 1 1 1 $method [1] "MPGM" $lastchange [1] -1.933738e-08 -1.103316e-08 1.265173e-09 7.873265e-09 0.000000e+00 [6] 0.000000e+00 9.110275e-09 0.000000e+00 8.486566e-09 0.000000e+00 [11] 0.000000e+00 1.306235e-08 0.000000e+00 -9.427082e-09 $numiter [1] 53 $eps tol told tolbis 1e-07 2e-05 1e-08 $converge [1] TRUE $intmap [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 4 6 7 11 15 17 24 25 33 34 36 38 40 46 [2,] 5 7 8 12 16 18 25 26 34 35 37 40 44 48 attr(,"class") [1] "icsurv" > data(pruitt) > PGM(pruitt) $pf [1] 0.12500001 0.16195560 0.19906345 0.15296182 0.02924667 0.06635452 0.26541793 $sigma [1] 0.1250000 0.2869556 0.4860191 0.6389809 0.6682276 0.7345821 1.0000000 $lval [1] -10.68207 $clmat A B C D E F G H [1,] 0 0 0 1 0 0 0 0 [2,] 0 1 0 0 1 0 0 0 [3,] 1 0 1 0 1 0 0 0 [4,] 0 0 1 0 0 1 0 0 [5,] 0 1 0 0 0 0 1 0 [6,] 1 0 1 0 0 0 1 0 [7,] 0 0 1 0 0 0 1 1 $method [1] "MPGM" $lastchange [1] 1.923935e-08 -6.278157e-10 2.338815e-09 -1.332146e-09 -1.459962e-08 [6] -1.163299e-08 6.614411e-09 $numiter [1] 43 $eps tol told tolbis 1e-07 2e-05 1e-08 $converge [1] TRUE $intmap NULL attr(,"class") [1] "icsurv" > > > > cleanEx(); ..nameEx <- "Plotboxes" > > ### * Plotboxes > > flush(stderr()); flush(stdout()) > > ### Name: Plotboxes > ### Title: Plot the event time regions for bivariate data. > ### Aliases: Plotboxes > ### Keywords: aplot > > ### ** Examples > > data(cmv) > Plotboxes(cmv[,1:2], cmv[,3:4], showmac=TRUE) > > > > cleanEx(); ..nameEx <- "VEM" > > ### * VEM > > flush(stderr()); flush(stdout()) > > ### Name: VEM > ### Title: Compute the NPMLE of p via the Vertex Exchange Method. > ### Aliases: VEM > ### Keywords: optimize > > ### ** Examples > > data(cosmesis) > csub1 <- subset(cosmesis, subset=Trt==0, select=c(L,R)) > VEM(csub1) $pf [1] 0.04634676 0.03336338 0.08866739 0.07075291 0.00000000 0.00000000 [7] 0.09264586 0.00000000 0.08178576 0.00000000 0.00000000 0.12087985 [13] 0.00000000 0.46555810 $lval [1] -58.06002 $numiter [1] 53 $intmap [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [1,] 4 6 7 11 15 17 24 25 33 34 36 38 40 46 [2,] 5 7 8 12 16 18 25 26 34 35 37 40 44 48 $converge [1] TRUE attr(,"class") [1] "icsurv" > data(pruitt) > VEM(pruitt) $pf [1] 0.12499999 0.16937166 0.19164725 0.15296184 0.02183064 0.07377079 0.26541783 $lval [1] -10.68207 $numiter [1] 58 $intmap NULL $converge [1] TRUE attr(,"class") [1] "icsurv" > > > > cleanEx(); ..nameEx <- "cmv" > > ### * cmv > > flush(stderr()); flush(stdout()) > > ### Name: cmv > ### Title: Data on times to shedding of cytomegalovirus and to colonization > ### of mycobacterium avium complex. > ### Aliases: cmv > ### Keywords: datasets > > ### ** Examples > > data(cmv) > > > > cleanEx(); ..nameEx <- "cosmesis" > > ### * cosmesis > > flush(stderr()); flush(stdout()) > > ### Name: cosmesis > ### Title: The time taken until cosmetic deterioration of breast cosmesis. > ### Aliases: cosmesis > ### Keywords: datasets > > ### ** Examples > > data(cosmesis) > > > > cleanEx(); ..nameEx <- "hiv" > > ### * hiv > > flush(stderr()); flush(stdout()) > > ### Name: hiv > ### Title: Intervals for infection time and disease onset for 257 > ### hemophiliac patients. > ### Aliases: hiv > ### Keywords: datasets > > ### ** Examples > > data(hiv) > > > > cleanEx(); ..nameEx <- "plot.icsurv" > > ### * plot.icsurv > > flush(stderr()); flush(stdout()) > > ### Name: plot.icsurv > ### Title: A plot method for the estimates produced by the estimation > ### methods in Icens. > ### Aliases: plot.icsurv > ### Keywords: hplot > > ### ** Examples > > data(cosmesis) > csub1 <- subset(cosmesis, subset=Trt==0, select=c(L,R)) > e1 <- VEM(csub1) > par(mfrow=c(2,2)) > plot(e1) > data(pruitt) > e2 <- EM(csub1) > plot(e2) > e3 <- PGM(csub1) > plot(e3) > e4 <- EMICM(csub1) > plot(e4) > > > > graphics::par(get("par.postscript", env = .CheckExEnv)) > cleanEx(); ..nameEx <- "pruitt" > > ### * pruitt > > flush(stderr()); flush(stdout()) > > ### Name: pruitt > ### Title: A small artificial, bivariate right-censored data set. > ### Aliases: pruitt > ### Keywords: datasets > > ### ** Examples > > data(pruitt) > > > > ### *