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("intcox-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('intcox') Loading required package: survival Loading required package: splines > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "AA.data" > > ### * AA.data > > flush(stderr()); flush(stdout()) > > ### Name: AA.data > ### Title: Shrinkage of aneurisms > ### Aliases: AA.data > ### Keywords: datasets > > ### ** Examples > > data(AA.data) > > > > cleanEx(); ..nameEx <- "intcox" > > ### * intcox > > flush(stderr()); flush(stdout()) > > ### Name: intcox > ### Title: Cox proportional hazards model for interval censored data > ### Aliases: intcox intcox.fit intcox.breslow intcox.derivs intcox.hazard0 > ### intcox.hazard0.beg intcox.pavaC > ### Keywords: survival > > ### ** Examples > > data(intcox.example) > intcox(Surv(left,right,type="interval2")~x.1+x.2+x.3+x.4,data=intcox.example) Call: intcox(formula = Surv(left, right, type = "interval2") ~ x.1 + x.2 + x.3 + x.4, data = intcox.example) coef exp(coef) se(coef) z p x.1 0.637 1.891 NA NA NA x.2 -0.435 0.647 NA NA NA x.3 0.331 1.392 NA NA NA x.4 0.425 1.530 NA NA NA Likelihood ratio test=NA on 4 df, p=NA n= 200 > > > > cleanEx(); ..nameEx <- "intcox.example" > > ### * intcox.example > > flush(stderr()); flush(stdout()) > > ### Name: intcox.example > ### Title: Example set for interval censored data with four covariates > ### Aliases: intcox.example > ### Keywords: datasets > > ### ** Examples > > ## Not run: > ##D sim.weibull.intcox.rfc <-function (N=200,beta.0=0.1,beta.cov=c(0.5,-0.5,0.5,0.5),alpha=0.75,p.cov=c(0.5,0.75),grid=10) > ##D { > ##D x.design<-cbind(rbinom(N,1,p.cov[1]),rbinom(N,1,p.cov[2]),runif(N,-1,1),rnorm(N,0,1)) > ##D colnames(x.design)<-paste("x.",1:4,sep="") > ##D lambda<-exp(beta.0+x.design%*%matrix(beta.cov,ncol=1)) > ##D scale<-(1/lambda)^(1/alpha) > ##D t.true<-rweibull(N,alpha,scale) > ##D T.max<-max(qweibull(0.9,alpha,median(scale))) > ##D t.left<-NULL > ##D t.right<-NULL > ##D for (i in 1:N) { > ##D tt<-unique(c(0,sort(runif(grid,0,T.max)),T.max)) > ##D if (t.true[i]>=T.max) { > ##D x.left<-T.max > ##D x.right<-NA > ##D } else { > ##D x.left<-max(tt[t.true[i]>tt]) > ##D x.right<-min(tt[t.true[i] ##D } > ##D t.left<-c(t.left,x.left) > ##D t.right<-c(t.right,x.right) > ##D } > ##D return(data.frame(ID=1:N,left=t.left,right=t.right,x.design)) > ##D } > ## End(Not run) > > data(intcox.example) > > > > ### *