getScore: Get data frame for the function riskPredict

Description Usage Arguments Value Author(s) References Examples

Description

Get data frame for the function riskPredict.

Usage

1
2
getScore(fmla, cidVar, subuidVar, statusVar, datFrame, mycorstr = "exchangeable",
  verbose = FALSE)

Arguments

fmla

A formula object for the function gee

cidVar

character. Phenotype variable name for cluster id

subuidVar

character. Phenotype variable name for unit id

statusVar

character. Phenotype variable name for progression status

datFrame

A data frame with at least 3 columns corresponding to cid (indicated by cidVar), subuid (indicated by subuidVar), status (indicated by statusID). cid indicates cluster id; subuid indicates unit ID within a cluster; status=1 indicates an eye is progressed; status=0 indicates an eye is not progressed.

mycorstr

character. indicates correlation structure. see the manual for the function gee in the R library gee

verbose

logical. indicating if summary of gee results should be printed out.

Value

A list with two elements: frame and gee.obj. frame is a data frame with at least 4 columns: cid, subuid, status, and score. cid indicates cluster id; subuid indicates unit ID within a cluster; status=1 indicates an eye is progressed; status=0 indicates an eye is not progressed; score represents the risk score.

gee.obj is the object returned by gee function.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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

gee.obj=tt1$gee.obj
print(summary(gee.obj))

print(dim(myframe1))
print(myframe1[1:3,])

riskPredictClustData documentation built on May 1, 2019, 6:34 p.m.