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@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.

Reply via email to