Description Usage Arguments Value Examples
Compute the Firth-corrected score for a matched case-control dataset
1 2 3 4 5 6 7 8 9 10 11 | linERRscore(
params,
data,
doses,
set,
status,
loc,
ccmethod,
corrvars = NULL,
repar = FALSE
)
|
params |
vector of parameters (β/ξ, α_2, ... , α_L, γ_1, ... , γ_p) for which to compute the modified score. Parameters α only need to be supplied when |
data |
data frame containing matched case-control data, with a number of columns for doses to different locations, a column containing matched set numbers, a column containing the case's tumor location (value between 1 and the number of locations, with location x corresponding to the x-th column index in |
doses |
vector containing the indices of columns containing dose information. |
set |
column index containing matched set numbers. |
status |
column index containing case status. |
loc |
column index containing the location of the matched set's case's second tumor. |
ccmethod |
choice of method of analysis: one of meandose, CCML, CCAL or CL. Defaults to CCAL |
corrvars |
vector containing the indices of columns containing variables to be corrected for. |
repar |
reparametrize to β=exp(γ)? Note that this only affects the Firth modified score, not the original score. Defaults to FALSE. |
List object with components:
U |
the original score |
A |
the modification to the score |
The Firth corrected score is equal to U+A
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | data(linearERRdata1)
# score in the truth
score1 <- linERRscore(params=c(.3,rep(-1.386294,4),log(2)),
data=linearERRdata1,set=1, doses=2:6, status=8, loc=7, corrvars=9,ccmethod="CCAL")
# score in the truth, reparametrized
score1_repar <- linERRscore(params=c(log(.3),rep(-1.386294,4),log(2)),
data=linearERRdata1,set=1, doses=2:6, status=8, loc=7, corrvars=9,ccmethod="CCAL", repar=TRUE)
score1$U # Original score
score1$U+score1$A # Firth score
score1_repar$U+score1_repar$A # Firth score under reparametrization
# score in 0
score2 <- linERRscore(params=c(0,rep(0,4),0),
data=linearERRdata1,set=1, doses=2:6, status=8, loc=7, corrvars=9, ccmethod="CCAL")
score2$U # Original score
score2$U+score2$A # Firth score
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.