Type: | Package |
Title: | Proportional Odds Model with Censored, Time-Lagged Categorical Outcome |
Version: | 1.10 |
Date: | 2025-05-04 |
Author: | Marie Davidian [aut], A. A. Tsiatis [aut], Shannon T. Holloway [aut, cre] |
Maintainer: | Shannon T. Holloway <shannon.t.holloway@gmail.com> |
Description: | Implements a semiparametric estimator for the odds ratio model with censored, time-lagged, ordered categorical outcome in a randomized clinical trial that incorporates baseline and time-dependent information. Tsiatis AA, Davidian M, Holloway ST (2023) <doi:10.1111/biom.13603>. |
License: | GPL-2 |
Depends: | methods |
Imports: | survival, stats, dplyr, R.utils |
NeedsCompilation: | no |
Repository: | CRAN |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
Collate: | 'infl.R' 'augment.R' 'aipw.R' 'prob_aipw.R' 'kaplanMeier.R' 'prob_ipw.R' 'verifyInputs.R' 'catProbs.R' 'ipw.R' 'print.catProbsObj.R' 'print.tLagPropOdds.R' 'tLagData.R' 'tLagPropOdds.R' |
Packaged: | 2025-05-04 15:56:18 UTC; 19194 |
Date/Publication: | 2025-05-04 16:10:02 UTC |
Estimation of the Probability of a Specific Categorical Outcome by Treatment
Description
Inverse probability weighted complete case (IPWCC) and augmented inverse probability weighted complete case (AIPWCC) estimators for the probability of falling into a specific time-lagged ordered categorical outcome in a randomized clinical trial.
Usage
catProbs(data, ..., ti = NULL, td = NULL)
Arguments
data |
A data.frame object. A data.frame containing all observed data. At a minimum, this data.frame must contain columns with headers "id", "U", "delta", "Cat" and "A". If the time-independent component of the estimator is to be included, data.frame must also contain the bases of f(X). If the time-dependent component is included, data.frame must also contain the bases of h(X,L) as well as the time intervals with column headers {"tstart", "tstop"} or {"start","stop"}. See Details for additional information. |
... |
Ignored. Included to require named inputs. |
ti |
A character or integer vector or NULL. The columns of data to be included in the time-independent component of the estimator, f_m(X) m = 0, ..., M. If NULL, the time-independent component is excluded from the AIPWCC estimator. See Details for additional information. |
td |
A character or integer vector or NULL. The columns of data to be included in the time-dependent component of the estimator, h_l(X,Lbar), l = 1, ..., L. If NULL, the time-dependent component is excluded from the AIPWCC estimator. See Details for additional information. |
Details
At a minimum, the data provided for the analysis must contain the following information:
- id:
A unique participant identifier.
- U:
The time to ascertainment of category or censoring.
- delta:
The indicator of ascertainment of category (1 if U is the time to ascertainment; 0 otherwise).
- Cat:
The ordered outcome category. Data must be provided as a factor or an integer or be able to be converted to an integer without loss of information. If participant was censored (delta = 0), Cat can take any integer-like value or NA.
- A:
The treatment received. Data must be provided as a factor or an integer or be able to be converted to an integer without loss of information.
With the exception of Cat, data must be complete.
If the time-independent component is to be included in the AIPWCC estimator, data must also include the time-independent basis functions f_m(X) m = 0, ..., M. If the intercept (f_0) term is not provided, it will be added by the software.
If the time-dependent component is to be included in the AIPWCC estimator, the data.frame must be a time-dependent dataset as described by package survival. Specifically, the time-dependent data must be specified for intervals (start,stop], and the data must include the following additional columns:
- tstart:
The lower boundary of the time interval to which the data pertain.
- tstop:
The upper boundary of the time interval to which the data pertain.
Note that column headers {"start", "stop"} are also accepted.
The various combinations of inputs ti and td yield the following:
- ti = NULL, td = NULL
the IPWCC estimate is returned. (denoted as IPW in the simulations of the original manuscript.)
- ti != NULL, td != NULL
the IPWCC and the full AIPWCC estimates are returned. (denoted as AIPW2 in the simulations of the original manuscript.)
- ti = NULL, td != NULL
the IPWCC and the partial, time-independent AIPWCC estimates are returned. (denoted as AIPW1 in the simulations of the original manuscript.)
- ti = NULL, td != NULL
the IPWCC and the partial, time-dependent AIPWCC estimates are returned.
If a treatment subgroup has <5% censoring, a message is generated and the treatment subgroup is removed from the time-dependent component of the AIPWCC estimator. If there is no censoring, the IPWCC estimator approaches the usual proportional odds estimator.
Value
An S3 object of class catProbsObj containing a list. The elements of the list correspond to the selected AIPWCC and/or IPWCC estimators. For each estimator, a list of matrix objects is returned, one for each treatment, that contains the estimated probabilities, their asymptotic standard errors, and the 95% confidence intervals. The S3 object has an additional attributes, "type", giving a verbose description of the components contained in the estimator.
Examples
data(tLagData)
# full AIPWCC estimator
catProbs(data = tLagData, ti = "x", td = c("hospStatus", "daysOut"))
# partial, time-independent AIPWCC estimator
catProbs(data = tLagData, ti = "x")
# partial, time-dependent AIPWCC estimator
catProbs(data = tLagData, td = c("hospStatus", "daysOut"))
Print Analysis Results
Description
Prints the key results.
Prints the key results.
Usage
## S3 method for class 'catProbsObj'
print(x, ...)
## S3 method for class 'tLagObj'
print(x, ...)
Arguments
x |
A tLagObj object. The value returned by tLagPropOdds(). |
... |
Ignored. |
Examples
data(tLagData)
# full AIPWCC estimator
res <- catProbs(data = tLagData,
ti = "x",
td = c("hospStatus", "daysOut"))
print(x = res)
data(tLagData)
# full AIPWCC estimator
res <- tLagPropOdds(data = tLagData,
ti = "x",
td = c("hospStatus", "daysOut"))
print(x = res)
Toy Dataset For Illustration
Description
These data are provided for the purposes of illustrating the use of the software. Though the data were generated under a scenario similar to a real-world COVID-19 therapeutics clinical trial, they should not be interpreted as representing true clinical trial data.
Usage
data(tLagData)
Format
tLagData is a time-dependent data.frame containing the following information for 602 participants ascertained at day 90 of a fictitious randomized clinical trial.
- id:
A unique participant identifier.
- A:
The treatment received, where A={0,1}.
- Cat:
The ordered outcome category. There are 6 categories ascertained at day 90.
- 1:
at home and off oxygen, number of days >= 77;
- 2:
at home and off oxygen, number of days 49-76;
- 3:
at home and off oxygen, number of days 1-48;
- 4:
not hospitalized and either at home on oxygen or not home;
- 5:
hospitalized for medical care or in hospice care; and
- 6:
dead.
If participant is censored, Cat = NA.
- U:
The time at which the outcome category was determined or the censoring time. For Cat = 1-5, U is the interim analysis time (90 days). For Cat = 6, U is the time of death. For Cat = NA, U is the censoring time.
- delta:
The event indicator (1 if U is the time at which the outcome category was determined; 0 if censored).
- x:
A continuous baseline covariate.
- start:
The lower bound of the time interval to which the given covariate values pertain.
- stop:
The upper bound of the time interval to which the given covariate values pertain.
- hospStatus:
A time-dependent indicator of hospital status, where 1 indicates that the participant was not in the hospital during interval (start, stop]; 0 otherwise.
- daysOut:
The expected number of continuous days out of hospital at the time of the interim analysis (90 days).
Estimation of the Odds Ratio in a Proportional Odds Model with Censored Time-lagged Outcome
Description
Inverse probability weighted complete case (IPWCC) and augmented inverse probability weighted complete case (AIPWCC) estimators for the odds ratio in a proportional odds model with time-lagged ordered categorical outcome in a randomized clinical trial.
Usage
tLagPropOdds(data, ..., ti = NULL, td = NULL, itmax = 500, tol = 1e-05)
Arguments
data |
A data.frame object. A data.frame containing all observed data. At a minimum, this data.frame must contain columns with headers "id", "U", "delta", "Cat" and "A". If the time-independent component of the estimator is to be included, data.frame must also contain the bases of f(X). If the time-dependent component is included, data.frame must also contain the bases of h(X,L) as well as the time intervals with column headers {"tstart", "tstop"} or {"start","stop"}. See Details for additional information. |
... |
Ignored. Included to require named inputs. |
ti |
A character or integer vector or NULL. The columns of data to be included in the time-independent component of the estimator, f_m(X) m = 0, ..., M. If NULL, the time-independent component is excluded from the AIPWCC estimator. See Details for additional information. |
td |
A character or integer vector or NULL. The columns of data to be included in the time-dependent component of the estimator, h_l(X,Lbar), l = 1, ..., L. If NULL, the time-dependent component is excluded from the AIPWCC estimator. See Details for additional information. |
itmax |
An integer object. The maximum number of iterations for the Newton-Raphson algorithm used to estimate parameters alpha and beta. |
tol |
A numeric object. The value at which the Newton-Raphson is deemed to have converged. |
Details
At a minimum, the data provided for the analysis must contain the following information:
- id:
A unique participant identifier.
- U:
The time to ascertainment of category or censoring.
- delta:
The indicator of ascertainment of category (1 if U is the time to ascertainment; 0 otherwise).
- Cat:
The ordered outcome category. Data must be provided as a factor or an integer or be able to be converted to an integer without loss of information. If participant was censored (delta = 0), Cat can take any integer-like value or NA.
- A:
The treatment received. Data must be provided as a factor or an integer or be able to be converted to an integer without loss of information.
With the exception of Cat, data must be complete.
If the time-independent component is to be included in the AIPWCC estimator, data must also include the time-independent basis functions f_m(X) m = 0, ..., M. If the intercept (f_0) term is not provided, it will be added by the software.
If the time-dependent component is to be included in the AIPWCC estimator, the data.frame must be a time-dependent dataset as described by package survival. Specifically, the time-dependent data must be specified for intervals (start,stop], and the data must include the following additional columns:
- tstart:
The lower boundary of the time interval to which the data pertain.
- tstop:
The upper boundary of the time interval to which the data pertain.
Note that column headers {"start", "stop"} are also accepted.
The various combinations of inputs ti and td yield the following:
- ti = NULL, td = NULL
the IPWCC estimate is returned. (denoted as IPW in the simulations of the original manuscript.)
- ti != NULL, td != NULL
the IPWCC and the full AIPWCC estimates are returned. (denoted as AIPW2 in the simulations of the original manuscript.)
- ti = NULL, td != NULL
the IPWCC and the partial, time-independent AIPWCC estimates are returned. (denoted as AIPW1 in the simulations of the original manuscript.)
- ti = NULL, td != NULL
the IPWCC and the partial, time-dependent AIPWCC estimates are returned. (not discussed in the simulations of the original manuscript.)
If a treatment subgroup has <5% censoring, a message is generated and the treatment subgroup is removed from the time-dependent component of the AIPWCC estimator. If there is no censoring, the IPWCC estimator approaches the usual proportional odds estimator.
Value
An S3 object of class tLagObj containing a list. The elements of the list correspond to the selected AIPWCC and/or IPWCC estimators. For each estimator, two matrix objects are returned: $logOdds contains the estimated beta parameters, their standard errors estimated using the sandwich estimator, the 95% confidence intervals, and the p-values for the log odds ratio; $odds contains the estimated odds ratio, their standard errors estimated using the delta method, and the 95% confidence intervals. The S3 object has an additional attribute, "type" giving a verbose description of the components contained in the estimator.
Examples
data(tLagData)
# full AIPWCC estimator
tLagPropOdds(data = tLagData, ti = "x", td = c("hospStatus", "daysOut"))
# partial, time-dependent AIPWCC estimator
tLagPropOdds(data = tLagData, td = c("hospStatus", "daysOut"))
# partial, time-independent AIPWCC estimator
tLagPropOdds(data = tLagData, ti = "x")