Hi,
I've not come across "Royston's measure of prognostic
separation"
before, so I might be completely off the mark, but it is likely that by
"invnormal" it is meant the inverse of a standard normal distribution,
i.e. one with a mean of 0 and standard deviation of 1. Which is what
qnorm gives by default if you don't supply a mean and sd.
Martyn
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Bonnett, Laura
Sent: 23 November 2011 14:44
To: r-help at r-project.org
Subject: [R] Measure of separation for survival data
Dear all,
I am using R 2.9.2 on Windows XP.
I am undertaking a simulation study to consider methods of external
validation in the context of missing covariates in the validation data
set. I would like to use Royston's measure of prognostic separation as
a method of external validation. Although there is no R code for this,
the author informs me that it should be easy:
1. Calculate the linear predictor xb from the proportional hazards model
or other model of interest.
2. Calculate the ranks r1,...,rn of xb. In case of ties, do not average
the ranks.
3. Calculate scaled rankits zi = sqrt(_pi/8) * invnormal((ri - 3/8)/(n
+1/4)) where invnormal() is the inverse normal distribution function,
and where n is the sample size and _pi = 3.141592654 ...
4. In case of ties in the original xb, substitute average zi's over each
of the tied sets.
5. Perform regression (e.g. Cox) on z = z1,...,zn.
I can obviously do steps 1 and 2:
# step 1 #
cox1 <- cph(Surv(stime1,eind1)~adat1+bdat1+c11+c21)
c1dat <- cox1$linear.predictors
# step 2 #
ris <- rank(c1dat,ties.method="minimum")
Can anyone advise how I might invoke the inverse normal. I thought
'qnorm' may be an option but I'm lacking the necessary parameters
within
the framework above.
Many thanks,
Laura
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
________________________________________________________________________
This e-mail has been scanned for all viruses by Star.\ _...{{dropped:12}}