similar to: position of number at risk in survplot() graphs

Displaying 20 results from an estimated 3000 matches similar to: "position of number at risk in survplot() graphs"

2012 Dec 03
1
Confidence bands with function survplot
Dear all, I am trying to plot KM curves with confidence bands with function survplot under package rms. However, the following codes do not seem to work. The KM curves are produced, but the confidence bands are not there. Any insights? Thanks in advance. library(rms) ########data generation############ n <- 1000 set.seed(731) age <- 50 + 12*rnorm(n) label(age) <- "Age"
2005 Aug 26
1
compare c-index of two logistic models using rcorrp.senc() of the Hmisc library
Dear R-help, Would it be appropriate to do the following to calculate a p-value for the difference between c-ind of x1 and c-inx of x2 using the output from rcorrp.senc() > r<-rcorrp.senc(x1,x1,y) > pValue<-1-pnorm((r[11]-r[12])/(r[2]/r[5])*1.96) Osman O. Al-Radi, MD, MSc, FRCSC Chief Resident, Cardiac Surgery University of Toronto, Canada
2011 Aug 25
1
survplot() for cph(): Design vs rms
Hi, in Design package, a plot of survival probability vs. a covariate can be generated by survplot() on a cph object using the folliowing code: n <- 1000 set.seed(731) age <- 50 + 12*rnorm(n) label(age) <- "Age" sex <- factor(sample(c('male','female'), n, TRUE)) cens <- 15*runif(n) h <- .02*exp(.04*(age-50)+.8*(sex=='Female')) dt <-
2006 Dec 26
1
xyplot line colors
Hello, I have a longitudinal data with about 30 subjects. I used xyplot() to plot the longitudinal data. One problem is that xyplot() recycles the color of auto.key so that every 7th subject has the same color (symbol if setps() was used). Is there a way so that every subject will have a unique color or symbol? Thanks Osman -- Osman O. Al-Radi, MD, MSc, FRCSC Fellow, Cardiovascular Surgery
2009 Sep 24
1
panel.text question
Dear R-help, I would like to add text to each of four panels in a plot generated by xyplot in lattice library. A sample code is given below, the plot generated has the first label repeated in all panels! How can I get the labels to be different in each panel? library(lattice) x <- rnorm(400) y <- rnorm(400) a <- gl(4, 100) xyplot(y~x|a, panel=function(...){
2007 Jul 17
2
xyplot for longitudinal data
Dear R-help subscribers, I use xyplot to plot longitudinal data as follows: score<-runif(100,-4,5) group<-sample(1:4,100,rep=T) subject<-rep(1:25,4) age<-rep(runif(4,1,40),25) df<-data.frame(score,group,age,subject) xyplot(score~age|group, group=subject, panel=function(...){ panel.loess(...,lwd=4) panel.superpose(...)} ,data=df) this produced a plot with four panels one for each
2009 Jun 19
2
a plot of stacked boxes
Hello, I would like to create a plot composed of stacked boxes (squares or rectangles), where the size of the box would represent the frequency of observations based on a categorical variable (group), the color would represent the proportion of success (binary) within that group (outcome) on a predetermined color scale. Ideally the boxes can be stacked from the bottom left to the top right based
2006 Oct 05
2
xyplot
Hi, for the data below: time<-c(rep(1:10,5)) y<-time+rnorm(50,5,2) subject<-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10)) group<-c(rep('A',30),rep('B',20)) df<-data.frame(subject,group,time,y) I'd like to produce a plot with a single pannel with two loess curves one for each group. the code below does
2006 May 07
1
nlme plot residuals per group
dear list: I used the nlme library according to the great Pinheiro/Bates book, on R2.3, WinXp Lac.lme is an lme object with unbalanced data, group is a factor variable with three levels, when I tried to plot the residuals by group I got this error msg: >plot(Lac.lme,resid(.,type='p')~fitted(.)|group) Error in limits.and.aspect(prepanel.default.xyplot, prepanel = prepanel, :
2009 Oct 26
1
Unable to get Legend with survplot rms package
Hello, I apologize for the post as I am certainly overlooking a simple solution to my difficulties with getting a legend to print on a survplot from the rms package. I am plotting the following: survplot(survest(fita), n.risk=T, conf='none', cex.n.risk=.85, dots=T, col='gray10', lty=2) survplot(survest(fit), n.risk=F, conf='none', add=T) survplot(survest(fitb), n.risk=F,
2012 Nov 06
3
Survplot, Y-axis in percent
Hi I am a new fan of R after getting mad with the graphical functional in SPSS. I have been able to create a nice looking Kaplan Meyer graph using Survplot function. However I have difficulties in turning the y axis to percent instead of the default 0-1 scale. Further I have tried the function yaxt="n" without any results. Any help in this matter will be appreciated. The code is
2014 Jul 02
0
survplot invert number at risk labels
deaR user, I found an unexpected behaviour of the rms::survplot.survfit function, that is giving me inverted labels for the patient-at-risk rows. The problem is that, for some reason, the survival::summary.survfit function changes the order of two of the suvfit object's strata when called (on my dataset) with the times= option (is this another unexpected behaviour?). survplot takes the
2011 Jul 21
1
Design Survplot performance
Hi, I have a Cox PH model that's large for my server, 120K rows, ~300 factors with 3 levels each, so about 1000 columns. The 300 factors all pass a preliminary test of association with the outcome. Solving this with cph from Design takes about 3 hours. I have created the fit with x=T, y=T to save the model data. I want to validate the PH assumption by calling survplot(fit, gender=NA,
2012 Mar 27
1
survplot function
Dear R-helpers I am wondering if there is an option to the survplot function in the design package that allows for drawing Kaplan-Meier plots starting from 0 instead of 1, similar like fun = 'event' in the standard plotting function used on a survfit object. I apologize in advance for having missed any obvious informational sources but I really didn't find anything in the
2009 Feb 05
4
See source code for survplot function in Design package
Dear R users, I know one way to see the code for a hidden function, say function_x, is using default.function_x (e.g. summary.default). But how can I see the code for imported packages that have no namespace (in this case Design)? Many Thanks Eleni
2010 Jan 04
1
no "rcorrp.cens" in hmisc package
Dear, I wanna to compare AUC generated by two distribution models using the same sample. I tried improveProb function's example code below. set.seed(1) library(survival) x1 <- rnorm(400) x2 <- x1 + rnorm(400) d.time <- rexp(400) + (x1 - min(x1)) cens <- runif(400,.5,2) death <- d.time <= cens d.time <- pmin(d.time, cens) rcorrp.cens(x1, x2, Surv(d.time, death))
2011 Apr 30
1
help with a survplot
Dear useRs, I was asked to produce a survival curve like this: http://www.palug.net/Members/jabba/immaginetta.png/view with the cardinality of the riskset at the bottom. I do not like doing it, because it doesn't add any valuable information and because it doesn't discriminate between died and censored. Nevertheless, is there someone able to tell me how to do it? Currently the only
2009 Sep 04
1
Problem with locfit( ... , family="hazard")
I'm having difficulties with plot.locfit.3d, at least I think that is the problem. I have a large dataframe (about 4 MM cases) and was hoping to see a non-parametric estimate of the hazard plotted against two variables: > fit <- locfit(~surv.yr+ ur_protein + ur_creatinine, data=TRdta, cens = 1-death, family = "hazard", xlim=c(0,10)) # it took somewhere between 1 and 2
2004 Apr 21
1
Boot package
Dear mailing list, I tried to run the example for the conditional bootstap written in the help file of censboot. I got the following result: STRATIFIED CONDITIONAL BOOTSTRAP FOR CENSORED DATA Call: censboot(data = aml, statistic = aml.fun, R = 499, F.surv = aml.s1, G.surv = aml.s2, strata = aml$group, sim = "cond") Bootstrap Statistics : original bias std. error t1*
2012 Apr 11
1
R-help; generating censored data
Hello, ?can i implement this as 10% censored data where t gives me failure and x censored. Thank you p=2;b=120 n=50 set.seed(132); r<-sample(1:50,45) t<-rweibull(r,shape=p,scale=b) t set.seed(123);? cens <- sample(1:50, 5)? x<-runif(cens,shape=p,scale=b)? x Chris Guure Researcher, Institute for Mathematical Research UPM