similar to: survplot() for cph(): Design vs rms

Displaying 20 results from an estimated 4000 matches similar to: "survplot() for cph(): Design vs rms"

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"
2009 Aug 01
1
about the summary(cph.object)
Could someone explain the summary(cph.object)? The example is in the help file of cph. n <- 1000 set.seed(731) age <- 50 + 12*rnorm(n) label(age) <- "Age" sex <- factor(sample(c('Male','Female'), n, rep=TRUE, prob=c(.6, .4))) cens <- 15*runif(n) h <- .02*exp(.04*(age-50)+.8*(sex=='Female')) dt <- -log(runif(n))/h label(dt)
2011 May 17
2
can not use plot.Predict {rms} reproduce figure 7.8 from Regression Modeling Strategies (http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf)
Dear R-users, I am using R 2.13.0 and rms 3.3-0 , but can not reproduce figure 7.8 of the handouts *Regression Modeling Strategies* ( http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf) by the following code. Could any one help me figure out how to solve this? setwd('C:/Rharrell') require(rms) load('data/counties.sav') older <- counties$age6574 + counties$age75
2018 Jan 03
1
summary.rms help
Dear All, using the example from the help of summary.rms library(rms) n <- 1000 # define sample size set.seed(17) # so can reproduce the results age <- rnorm(n, 50, 10) blood.pressure <- rnorm(n, 120, 15) cholesterol <- rnorm(n, 200, 25) sex <- factor(sample(c('female','male'), n,TRUE)) label(age) <- 'Age'
2012 Apr 30
1
question on jitter in plot.Predict in rms
Dear colleagues, I have a question regarding controlling the jitter when plotting predictions in the rms package. Below I've simulated some data that reflect what I'm working with. The model predicts a continuous variable with an ordinal score, a two-level group, and a continuous covariate. Of primary interest is a plot of the group by score interaction, where the score is the ordinal
2010 Jan 21
1
Simple effects with Design / rms ols() function
Hi everyone, I'm having some difficulty getting "simple effects" for the ols() function in the rms package. The example below illustrates my difficulty -- I'll be grateful for any help. #make up some data exD <- structure(list(Gender = structure(c(1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 1L, 2L), .Label = c("F", "M"), class = "factor"),
2012 Oct 20
1
rms plot.Predict question: swapping x- and y- axis for categorical predictors
Hello all, I'm trying to plot the effects of variables estimated by a regression model fit individually, and for categorical predictors, the independent variable shows up on the y-axis, with the dependent variable on the x-axis. Is there a way to prevent this reversal? Sample code with dummy data: # make dummy data set.seed(1) x1 <- runif(200) x2 <- sample(c(1,2),200, TRUE) x3 <-
2012 May 25
1
Multiple rms summary plots in a single device
I would like to incorporate multiple summary plots from the rms package into a single device and to control the titles, and also to open a new device when I reach a specified number of plots. Currently I am only getting a single "plot(summary(" graph in the upper left- hand corner of each successive device. However, in the rms documention I see instances of a loop being used with
2011 Jun 23
2
Rms package - problems with fit.mult.impute
Hi! Does anyone know how to do the test for goodness of fit of a logistic model (in rms package) after running fit.mult.impute? I am using the rms and Hmisc packages to do a multiple imputation followed by a logistic regression model using lrm. Everything works fine until I try to run the test for goodness of fit: residuals(type=c("gof")) One needs to specify y=T and x=T in the fit. But
2012 Apr 09
3
how to add 3d-points to bplot {rms} figure?
Hello! I have created a bplot-figure using this code: *file <- "2dcali_red.ttt" ux<-as.matrix(read.table(file, dec = ",")) mode(ux)<-'numeric' vel<-ux[,1] ang<-ux[,2] x<-ux[,3] y<-ux[,4] dat<- data.frame(ang=ang, x=x,y=y) require(rms) ddist2 <- datadist(dat) options(datadist="ddist2") fitn <- lrm(ang ~ rcs(x,4) +
2013 Jun 24
2
Nomogram (rms) for model with shrunk coefficients
Dear R-users, I have used the nomogram function from the rms package for a logistic regresison model made with lrm(). Everything works perfectly (r version 2.15.1 on a mac). My question is this: if my final model is not the one created by lrm, but I internally validated the model and 'shrunk' the regression coefficients and computed a new intercept, how can I build a nomogram using that
2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called directly by users. rms uses generic functions defined in other packages. For example there is a latex method in the Hmisc package, and rms has a latex method for objects of class "anova.rms" so there are anova.rms and latex.anova.rms functions in rms. I use:
2011 Aug 06
1
help with predict for cr model using rms package
Dear list, I'm currently trying to use the rms package to get predicted ordinal responses from a conditional ratio model. As you will see below, my model seems to fit well to the data, however, I'm having trouble getting predicted mean (or fitted) ordinal response values using the predict function. I have a feeling I'm missing something simple, however I haven't been able to
2005 Jul 11
1
validation, calibration and Design
Hi R experts, I am trying to do a prognostic model validation study, using cancer survival data. There are 2 data sets - 1500 cases used to develop a nomogram, and another of 800 cases used as an independent validation cohort. I have validated the nomogram in the original data (easy with the Design tools), and then want to show that it also has good results with the independent data using 60
2010 Aug 14
1
How to add lines to lattice plot produced by rms::bplot
I have a plot produced by function bplot (package = rms) that is really a lattice plot (class="trellis"). It is similar to this plot produced by a very minor modification of the first example on the bplot help page: requiere(rms) n <- 1000 # define sample size set.seed(17) # so can reproduce the results age <- rnorm(n, 50, 10) blood.pressure <- rnorm(n, 120,
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,
2011 Oct 11
1
plot methods for summary of rms objects
The integration of plot methods for various outputs from rms packages is a great appreciated aspect of the rms package. I particularly like to use: plot(summary(model)) for my own purposes, but... for publication/presentation I need to modify details like variable names, or the number of signficant digits used in the figure annotations. Is there a simple way to modify the plot inputs
2006 May 30
1
position of number at risk in survplot() graphs
Dear R-help How can one get survplot() to place the number at risk just below the survival curve as opposed to the default which is just above the x-axis? I tried the code bellow but the result is not satisfactory as some numbers are repeated several times at different y coordinates and the position of the n.risk numbers corresponds to the x-axis tick marks not the survival curve time of
2010 May 05
1
Error messages with psm and not cph in Hmisc
While sm4.6ll<-fit.mult.impute(Surv(agesi, si)~partner+ in.love+ pubty+ FPA+ strat(gender),fitter = cph, xtrans = dated.sexrisk2.i, data = dated.sexrisk2, x=T,y=T,surv=T, time.inc=16) runs perfectly using Hmisc, Design and mice under R11 run via Sciviews-K, with library(Design) library(mice) ds2d<-datadist(dated.sexrisk2) options(datadist="ds2d")
2010 Jan 27
1
control of scat1d tick color in plot.Predict?
Hi All, I have a quick question about using plot.Predict now that the rms package uses lattice. I'd like to add tick marks along the regression line, which is given by data=llist(variablename) in the plot call. The ticks show up fine, but I'd like to alter the color. I know the ticks are produced by scat1d, but after spending a fair bit of time going through documentation, it still