Thank you very very very much Prof Harrell!! You've made my day!!
--
View this message in context:
http://r.789695.n4.nabble.com/Interpreting-the-example-given-by-Prof-Frank-Harrell-in-Design-validate-cph-tp3316820p3325844.html
Sent from the R help mailing list archive at Nabble.com.
Here's the way I would explore this, and some of the code is made more tidy.
Note that also you could vectorize your simulation. I have used set.seed
multiple times to make bootstrap samples the same across runs. -Frank
. . .
if (data[i, 3] == 4) data[i, 5] - sample(c(0, 1), 1, prob=c(.06,
P.S. I used the latest version of the rms package to run this. The Design
package is no longer supported.
Frank
-
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context:
Dear Prof Frank,
I tried to simulate an example data set as close as possible to my own real
data with the codes below. There are only two covariates, tumor(3 levels)
and ecog(3 levels). rx is treatment (4 levels). Validation with the
stratified model (by rx) had a negative R2.. and the R2 under
I really appreciate your help Prof Harrell!
I followed your instruction and re-ran the second model without strat but
with surv=TRUE, time.inc=30, and u=30 to validate, the Dxy was really the
same as that in the first model output! But this confused me...shouldn't the
Dxy be positive in this
I think it should be the negative of the first Dxy but this is all why the
posting guide says to create the simplest self-defined example that shows
the problem. That way I could run it and get to the bottom of this. See
the help file for cph which has examples of simulating test data. Try to
Dear R-help,
I am having a problem with the interpretation of result from validate.cph in
the Design package.
My purpose is to fit a cox model and validate the Somer's Dxy. I used the
hypothetical data given in the help manual with modification to the cox
model fit. My research problem is very
Vikky,
You'll notice that the model containing sex in addition to age has a higher
apparent Dxy as you would expect [R^2 is not higher because it captures only
the age effect]. The validated Dxy's may be as they are because of the very
low number of bootstrap resamples (10) that you used.
Thank you very much Prof Harrell!
Sorry that I am new to this forum, and so ain't familiar with how to post
message appropriately.
I repeated the same procedure using a dataset from the {survival} package.
This time I used the {rms} package, and 100 bootstrap samples:
library(rms)
Don't worry about the sign. When predicting relative log hazard, high hazard
means short survival time so Dxy is negative. When predicting survival
probability (u specified), high prob. means long survival time so Dxy is
positive. You can just reverse the sign when u is not specified.
I did
10 matches
Mail list logo