rPR: Regression modelling of the relative true positive fraction...

Description Usage Arguments Details Value Examples

View source: R/pepe_ex7_5.R

Description

Regression modelling of the relative true positive fraction and relative false positive fraction from a paired screen-positive design.

Usage

1
2
3
rPR(formula, data, test1, test0, restrict = FALSE, TP)
rTPR(formula, data, test1, test0, restrict = FALSE)
rFPR(formula, data, test1, test0, restrict = FALSE)

Arguments

formula

LHS is the outcome, RHS is the regression equation in terms of the covariates in data and a derived variable test from the two tests.

data

data-frame of the input data

test1

expression for the new test

test0

expression for the reference test

restrict

restrict the analysis to those with a non-missing outcome

TP

logical to show whether use rTPF (TP=TRUE) or rFPF (TP=FALSE)

Details

Represents the reference test as test in the regression formula.

Value

returns a geepack::geeglm object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
## Not run: 

## Prostate cancer examples from Pepe and Alonzo (2001):

require(foreign)
ex <- read.dta("http://research.fhcrc.org/content/dam/stripe/diagnostic-biomarkers-statistical-center/files/psa_dre_v2.dta")

## main model for true positives
summary(rTPR(I(d=="yes") ~ test + I(race=="black") + test:I(race=="black"),
             data = ex,
             test1=I(psa=="pos"),
             test0=I(dre=="pos")))

## restricted model (those with known disease status)
## NB: the covariate main effect and intercept are WRONG/biased
summary(rTPR(I(d=="yes") ~ test + I(race=="black") + test:I(race=="black"),
             data = ex,
             test1=I(psa=="pos"),
             test0=I(dre=="pos"),
             restrict=TRUE))

## reduced model
summary(rTPR(I(d=="yes") ~ test + test:I(race=="black"),
             data = ex,
             test1=I(psa=="pos"),
             test0=I(dre=="pos")))

## reduced and restricted model
## NB: ALL of the point estimates are WRONG/biased
summary(rTPR(I(d=="yes") ~ test + test:I(race=="black"),
             data = ex,
             test1=I(psa=="pos"),
             test0=I(dre=="pos"),
             restrict=TRUE))

## main model for false positives
summary(rFPR(I(d=="yes") ~ test + I(race=="black") + test:I(race=="black"),
             data = ex,
             test1=I(psa=="pos"),
             test0=I(dre=="pos")))

## restricted model
## NB: the covariate main effect and intercept are WRONG/biased
summary(rFPR(I(d=="yes") ~ test + I(race=="black") + test:I(race=="black"),
             data = ex,
             test1=I(psa=="pos"),
             test0=I(dre=="pos"),
             restrict=TRUE))


## End(Not run)

mclements/psp documentation built on May 22, 2019, 3:10 p.m.