CIF logistic for propodds=1 default CIF Fine-Gray (cloglog) regression for propodds=NULL
cifreg(
formula,
data = data,
cause = 1,
cens.code = 0,
cens.model = ~1,
weights = NULL,
offset = NULL,
Gc = NULL,
propodds = 1,
...
)
formula with 'Event' outcome
data frame
of interest
code of censoring
for stratified Cox model without covariates
weights for FG score equations
offsets for FG model
censoring weights for time argument, default is to calculate these with a Kaplan-Meier estimator, should then give G_c(T_i-)
1 is logistic model, NULL is fine-gray model
Additional arguments to lower level funtions
For FG model: $$ \int (X - E ) Y_1(t) w(t) dM_1 $$ is computed and summed over clusters and returned multiplied with inverse of second derivative as iid.naive. Where $$w(t) = G(t) (I(T_i \wedge t < C_i)/G_c(T_i \wedge t))$$ and $$E(t) = S_1(t)/S_0(t)$$ and $$S_j(t) = \sum X_i^j Y_{i1}(t) w_i(t) \exp(X_i^T \beta)$$
The iid decomposition of the beta's, however, also have a censoring term that is also is computed and added to UUiid (still scaled with inverse second derivative) $$ \int (X - E ) Y_1(t) w(t) dM_1 + \int q(s)/p(s) dM_c $$ and returned as iid
For logistic link standard errors are slightly to small since uncertainty from recursive baseline is not considered, so for smaller data-sets it is recommended to use the prop.odds.subdist of timereg that is also more efficient due to use of different weights for the estimating equations. Alternatively, one can also bootstrap the standard errors.
## data with no ties
data(bmt,package="timereg")
bmt$time <- bmt$time+runif(nrow(bmt))*0.01
bmt$id <- 1:nrow(bmt)
## logistic link OR interpretation
ll=cifreg(Event(time,cause)~tcell+platelet+age,data=bmt,cause=1)
summary(ll)
#>
#> n events
#> 408 161
#>
#> 408 clusters
#> coeffients:
#> Estimate S.E. dU^-1/2 P-value
#> tcell -0.709534 0.331984 0.274926 0.0326
#> platelet -0.455255 0.236015 0.187919 0.0537
#> age 0.391169 0.098035 0.083670 0.0001
#>
#> exp(coeffients):
#> Estimate 2.5% 97.5%
#> tcell 0.49187 0.25661 0.9428
#> platelet 0.63429 0.39938 1.0074
#> age 1.47871 1.22021 1.7920
#>
#>
plot(ll)
nd <- data.frame(tcell=c(1,0),platelet=0,age=0)
pll <- predict(ll,nd)
plot(pll)
## Fine-Gray model
fg=cifreg(Event(time,cause)~tcell+platelet+age,data=bmt,cause=1,propodds=NULL)
summary(fg)
#>
#> n events
#> 408 161
#>
#> 408 clusters
#> coeffients:
#> Estimate S.E. dU^-1/2 P-value
#> tcell -0.597184 0.270412 0.275785 0.0272
#> platelet -0.425487 0.180750 0.187720 0.0186
#> age 0.343890 0.080271 0.086287 0.0000
#>
#> exp(coeffients):
#> Estimate 2.5% 97.5%
#> tcell 0.55036 0.32395 0.9350
#> platelet 0.65345 0.45852 0.9313
#> age 1.41042 1.20510 1.6507
#>
#>
plot(fg)
nd <- data.frame(tcell=c(1,0),platelet=0,age=0)
pfg <- predict(fg,nd)
plot(pfg)
sfg <- cifreg(Event(time,cause)~strata(tcell)+platelet+age,data=bmt,cause=1,propodds=NULL)
summary(sfg)
#>
#> n events
#> 408 161
#>
#> 408 clusters
#> coeffients:
#> Estimate S.E. dU^-1/2 P-value
#> platelet -0.424144 0.180839 0.187824 0.019
#> age 0.342086 0.079862 0.086287 0.000
#>
#> exp(coeffients):
#> Estimate 2.5% 97.5%
#> platelet 0.65433 0.45906 0.9327
#> age 1.40788 1.20389 1.6464
#>
#>
plot(sfg)
### predictions with CI based on iid decomposition of baseline and beta
fg <- cifreg(Event(time,cause)~tcell+platelet+age,data=bmt,cause=1,propodds=NULL,cox.prep=TRUE)
Biid <- IIDbaseline.cifreg(fg,time=20)
FGprediid(Biid,bmt[1:5,])
#> pred se-log lower upper
#> [1,] 0.4564076 0.07254035 0.3959191 0.5261376
#> [2,] 0.5072559 0.07328787 0.4393841 0.5856118
#> [3,] 0.6065028 0.08622975 0.5121933 0.7181774
#> [4,] 0.6027229 0.08566864 0.5095613 0.7129170
#> [5,] 0.4287988 0.07564526 0.3697125 0.4973280