riskPredict {riskPredictClustData} | R Documentation |
Assessing risk prediction performance for clustered data
Description
Assessing risk prediction performance for clustered data.
Usage
riskPredict(frame, alpha=0.05)
Arguments
frame |
A data frame with 4 columns: cid, subuid, status, and score.
|
alpha |
numeric. confidence level for |
Details
To obtain 95% confidence interval of \eta_c
,
we first obtain 95% confidence interval [c_1, c_2]
for
\Phi^{-1}(\eta_c)
, then
transform back:
[\Phi(c_1), \Phi(c_2)]
.
Value
A list of 6 elements:
stat |
the test statistics
|
se.stat |
standard error of the test statistic under the null hypothesis. |
z |
z score |
pval |
p-value of the test |
rho |
correlation between |
mu.hat |
estimated |
theta.hat |
estimated |
theta.c.hat |
estimated |
E.stat.Ha |
expectation of |
se.stat.Ha |
standard error for |
CIlow |
lower confidence limit for |
CIupp |
upper confidence limit for |
datHk |
A nSubj by 2 matrix of probit transformed risk scores by using only the first 2 observations of each subject. |
ci |
the vector of |
di |
the vector of |
Author(s)
Bernard Rosner <stbar@channing.harvard.edu>, Weiliang Qiu <Weiliang.Qiu@gmail.com>, Meiling Ting Lee <MLTLEE@umd.edu>
References
Rosner B, Qiu W, and Lee MLT. Assessing Discrimination of Risk Prediction Rules in a Clustered Data Setting. Lifetime Data Anal. 2013 Apr; 19(2): 242-256.
Examples
set.seed(1234567)
datFrame = genSimDataGLMEM(nSubj = 30, beta0 = -6, sd.beta0i = 1.58,
beta1 = 1.58, beta2 = -3.95, beta3 = 3.15, beta4 = 2.06,
beta5 = 0.51, beta6 = 1.47, beta7 = 3.11,
p.smkcur = 0.08, p.inieye31 = 0.44, p.inieye32 = 0.42,
p.inieye41 = 0.12, p.inieye42 = 0.11, sd.lncalorc = 0.33)
print(dim(datFrame))
print(datFrame[1:2,])
tt1 = getScore(fmla = prog~smkcur+lncalorc+inieye3+inieye4+factor(rtotfat),
cidVar = "cid", subuidVar = "subuid", statusVar = "prog",
datFrame = datFrame, mycorstr = "exchangeable",
verbose = FALSE)
myframe1=tt1$frame
print(dim(myframe1))
print(myframe1[1:3,])
res1 = riskPredict(myframe1)
print(names(res1))
print(res1)