diff --git a/NAMESPACE b/NAMESPACE index 9b349e7..6f230c9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -9,6 +9,9 @@ S3method(adjust,SLModel) S3method(descript,GLMModelResult) S3method(jacobian,CUSTOM) S3method(jacobian,DIFF) +S3method(jacobian,LOGODDSRATIO) +S3method(jacobian,LOGRATIO) +S3method(jacobian,ODDSRATIO) S3method(jacobian,RATIO) S3method(print,CalibrationResult) S3method(print,ContrastResult) diff --git a/docs/404.html b/docs/404.html index ec328e8..63695df 100644 --- a/docs/404.html +++ b/docs/404.html @@ -60,6 +60,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index bc10ef1..173ca86 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/LICENSE.html b/docs/LICENSE.html index 030b757..22b9637 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/articles/Calibration-for-GLM-Models.html b/docs/articles/Calibration-for-GLM-Models.html index d0196bc..c6a9d64 100644 --- a/docs/articles/Calibration-for-GLM-Models.html +++ b/docs/articles/Calibration-for-GLM-Models.html @@ -61,6 +61,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • diff --git a/docs/articles/Continuous-and-GLM-Type-Outcomes.html b/docs/articles/Continuous-and-GLM-Type-Outcomes.html index f68fbe7..d87bd1d 100644 --- a/docs/articles/Continuous-and-GLM-Type-Outcomes.html +++ b/docs/articles/Continuous-and-GLM-Type-Outcomes.html @@ -61,6 +61,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • diff --git a/docs/articles/Family.html b/docs/articles/Family.html index 050fb1e..00df544 100644 --- a/docs/articles/Family.html +++ b/docs/articles/Family.html @@ -87,7 +87,7 @@

    RobinCar Family

    Marlena Bannick

    -

    2025-08-21

    +

    2026-01-19

    @@ -96,9 +96,18 @@

    2025-08-21

    +

    This vignette accompanies the Results section of the RobinCar Family +paper.

     library(RobinCar)
    -library(dplyr)
    +library(RobinCar2) +
    ## 
    +## Attaching package: 'RobinCar2'
    +
    ## The following object is masked from 'package:base':
    +## 
    +##     table
    +
    +library(dplyr)
    ## 
     ## Attaching package: 'dplyr'
    ## The following objects are masked from 'package:stats':
    @@ -107,31 +116,10 @@ 

    2025-08-21

    ## The following objects are masked from 'package:base':
     ## 
     ##     intersect, setdiff, setequal, union
    -
    -if (!require("remotes")) {
    -  install.packages("remotes")
    -}
    -
    ## Loading required package: remotes
    -
    -remotes::install_github(
    -  "openpharma/RobinCar2"
    -)
    -
    ## Using GitHub PAT from the git credential store.
    -
    ## Skipping install of 'RobinCar2' from a github remote, the SHA1 (4f016471) has not changed since last install.
    -##   Use `force = TRUE` to force installation
    - -
    ## 
    -## Attaching package: 'RobinCar2'
    -
    ## The following object is masked from 'package:base':
    -## 
    -##     table
    -

    This vignette is to accompany the Results section of the RobinCar -Family paper.

    Data Manipulation

    Creates continuous and binary outcomes, and does simple data manipulations.

    -
    +
     # Data are from the speff2trial package
     data <- tibble(speff2trial::ACTG175)
     
    @@ -154,7 +142,7 @@ 

    2025-08-21

    covariates of weight, hemophilia status, and prior use of non-zidovudine antiretroviral therapy. These specifications ensure that the covariate adjustment has guaranteed efficiency gain (asymptotically).

    -
    +
     robin_lm(
       y_cont ~ arms * (strat + wtkg + hemo + oprior), 
       treatment = arms ~ pb(strat), 
    @@ -175,7 +163,7 @@ 

    2025-08-21

    Generalized Linear Models

    For the binary outcome, we can use a logistic regression model instead.

    -
    +
     robin_glm(
       y_bin ~ arms * (wtkg + hemo + oprior),
       treatment = arms ~ pb(strat),
    @@ -203,7 +191,7 @@ 

    2025-08-21

    Rather than a linear contrast, we can instead estimate a risk ratio. This does not change the marginal mean estimates, but it changes the contrast estimates (and p-values).

    -
    +
     robin_glm(
       y_bin ~ arms * (strat + wtkg + hemo + oprior),
       treatment = arms ~ pb(strat),
    @@ -235,7 +223,7 @@ 

    2025-08-21

    calculation.

    The MH function in RobinCar is only valid for simple randomization.

    -
    +
     data <- data %>% mutate(
       X=interaction(oprior, hemo)
     )
    @@ -258,7 +246,7 @@ 

    2025-08-21

    For a survival outcome with right-censoring, we can use the RobinCar2 function robin_surv to do a covariate-adjusted, stratified log-rank test.

    -
    +
     surv <- robin_surv(
       Surv(days, cens) ~ wtkg + oprior + hemo + strata(strat),
       treatment = arms ~ pb(strat),
    @@ -285,7 +273,7 @@ 

    2025-08-21

    ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

    You can use the table function to see the number of events and number at-risk

    -
    +
     table(surv)
    ## Number of patients and events per stratum and treatment arm:
     ##   strat arms Patients Events
    diff --git a/docs/articles/Mantel-Haenszel-Statistic.html b/docs/articles/Mantel-Haenszel-Statistic.html
    index 87f9acf..ffd5c65 100644
    --- a/docs/articles/Mantel-Haenszel-Statistic.html
    +++ b/docs/articles/Mantel-Haenszel-Statistic.html
    @@ -61,6 +61,9 @@
         
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • diff --git a/docs/articles/Robust-Testing-for-Time-to-Event-Data.html b/docs/articles/Robust-Testing-for-Time-to-Event-Data.html index 14980c8..92fd6c9 100644 --- a/docs/articles/Robust-Testing-for-Time-to-Event-Data.html +++ b/docs/articles/Robust-Testing-for-Time-to-Event-Data.html @@ -61,6 +61,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • diff --git a/docs/authors.html b/docs/authors.html index cf59591..b0c1559 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog @@ -90,14 +93,14 @@

    Citation

    -

    Bannick M, Qian Y, Ye T, Yi Y, Bian F (2025). +

    Bannick M, Qian Y, Ye T, Yi Y, Bian F (2026). RobinCar: Robust Inference for Covariate Adjustment in Randomized Clinical Trials. R package version 1.0.0.

    @Manual{,
       title = {RobinCar: Robust Inference for Covariate Adjustment in Randomized Clinical Trials},
       author = {Marlena Bannick and Yuhan Qian and Ting Ye and Yanyao Yi and Faith Bian},
    -  year = {2025},
    +  year = {2026},
       note = {R package version 1.0.0},
     }
    diff --git a/docs/index.html b/docs/index.html index 4a7284e..dccc386 100644 --- a/docs/index.html +++ b/docs/index.html @@ -61,6 +61,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • diff --git a/docs/news/index.html b/docs/news/index.html index 3d35624..c9ddbe1 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog @@ -61,7 +64,7 @@

    Changelog

    - +

    Features

    • Including a new function robincar_mh, which calculates a Mantel-Haenszel statistic. Please see Xiaoyu Qiu, Yuhan Qian, Jaehwan Yi, Jinqiu Wang, Yu Du, Yanyao Yi, Ting Ye (2025) for methods, and our new vignette.
    • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index a773130..a733c94 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -7,5 +7,5 @@ articles: Family: Family.html Mantel-Haenszel-Statistic: Mantel-Haenszel-Statistic.html Robust-Testing-for-Time-to-Event-Data: Robust-Testing-for-Time-to-Event-Data.html -last_built: 2025-12-19T16:56Z +last_built: 2026-01-19T22:47Z diff --git a/docs/reference/car_pb.html b/docs/reference/car_pb.html index 9ae0987..fa41a9b 100644 --- a/docs/reference/car_pb.html +++ b/docs/reference/car_pb.html @@ -43,6 +43,9 @@
    • Mantel-Haenszel-Statistic
    • +
    • + RobinCar Family +
  • Changelog diff --git a/docs/reference/car_ps.html b/docs/reference/car_ps.html index 1d4b23c..c9f980f 100644 --- a/docs/reference/car_ps.html +++ b/docs/reference/car_ps.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/car_sr.html b/docs/reference/car_sr.html index 9772807..bbc48e0 100644 --- a/docs/reference/car_sr.html +++ b/docs/reference/car_sr.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/data_gen.html b/docs/reference/data_gen.html index dcda358..c72d715 100644 --- a/docs/reference/data_gen.html +++ b/docs/reference/data_gen.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/data_gen2.html b/docs/reference/data_gen2.html index 49fb180..d31c08d 100644 --- a/docs/reference/data_gen2.html +++ b/docs/reference/data_gen2.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/index.html b/docs/reference/index.html index dfa353c..b9e6817 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/pipe.html b/docs/reference/pipe.html index fe4ee60..aefb3bc 100644 --- a/docs/reference/pipe.html +++ b/docs/reference/pipe.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/print.CalibrationResult.html b/docs/reference/print.CalibrationResult.html index eb72fd2..7b630b6 100644 --- a/docs/reference/print.CalibrationResult.html +++ b/docs/reference/print.CalibrationResult.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/print.ContrastResult.html b/docs/reference/print.ContrastResult.html index 45bb4e9..001a9f1 100644 --- a/docs/reference/print.ContrastResult.html +++ b/docs/reference/print.ContrastResult.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/print.GLMModelResult.html b/docs/reference/print.GLMModelResult.html index ed2716d..37efdac 100644 --- a/docs/reference/print.GLMModelResult.html +++ b/docs/reference/print.GLMModelResult.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/print.LinModelResult.html b/docs/reference/print.LinModelResult.html index aa9bb1c..c2a9c85 100644 --- a/docs/reference/print.LinModelResult.html +++ b/docs/reference/print.LinModelResult.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/print.MHResult.html b/docs/reference/print.MHResult.html index e1c678e..c5d45ca 100644 --- a/docs/reference/print.MHResult.html +++ b/docs/reference/print.MHResult.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/print.TTEResult.html b/docs/reference/print.TTEResult.html index 40baa47..a0b4b2b 100644 --- a/docs/reference/print.TTEResult.html +++ b/docs/reference/print.TTEResult.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/robincar_SL.html b/docs/reference/robincar_SL.html index d6798fd..9059679 100644 --- a/docs/reference/robincar_SL.html +++ b/docs/reference/robincar_SL.html @@ -44,6 +44,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/robincar_SL_median.html b/docs/reference/robincar_SL_median.html index 892d7c5..b2c4241 100644 --- a/docs/reference/robincar_SL_median.html +++ b/docs/reference/robincar_SL_median.html @@ -45,6 +45,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/robincar_calibrate.html b/docs/reference/robincar_calibrate.html index af4427c..822fae8 100644 --- a/docs/reference/robincar_calibrate.html +++ b/docs/reference/robincar_calibrate.html @@ -45,6 +45,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/robincar_contrast.html b/docs/reference/robincar_contrast.html index 4e5a571..90e75c9 100644 --- a/docs/reference/robincar_contrast.html +++ b/docs/reference/robincar_contrast.html @@ -44,6 +44,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/robincar_covhr.html b/docs/reference/robincar_covhr.html index 4e92653..0d374db 100644 --- a/docs/reference/robincar_covhr.html +++ b/docs/reference/robincar_covhr.html @@ -44,6 +44,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/robincar_coxscore.html b/docs/reference/robincar_coxscore.html index 2160734..2f7878b 100644 --- a/docs/reference/robincar_coxscore.html +++ b/docs/reference/robincar_coxscore.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/robincar_glm.html b/docs/reference/robincar_glm.html index 5f70db6..baa5b92 100644 --- a/docs/reference/robincar_glm.html +++ b/docs/reference/robincar_glm.html @@ -44,6 +44,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/robincar_linear.html b/docs/reference/robincar_linear.html index ebf653f..c8b8b82 100644 --- a/docs/reference/robincar_linear.html +++ b/docs/reference/robincar_linear.html @@ -44,6 +44,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/robincar_logrank.html b/docs/reference/robincar_logrank.html index a2789a3..6e51359 100644 --- a/docs/reference/robincar_logrank.html +++ b/docs/reference/robincar_logrank.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/robincar_mh.html b/docs/reference/robincar_mh.html index 30f702a..b32298d 100644 --- a/docs/reference/robincar_mh.html +++ b/docs/reference/robincar_mh.html @@ -43,6 +43,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/reference/robincar_tte.html b/docs/reference/robincar_tte.html index ce95522..8c60db6 100644 --- a/docs/reference/robincar_tte.html +++ b/docs/reference/robincar_tte.html @@ -45,6 +45,9 @@
  • Mantel-Haenszel-Statistic
  • +
  • + RobinCar Family +
  • Changelog diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 3a10ee0..00ccd82 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -15,6 +15,9 @@ /articles/Continuous-and-GLM-Type-Outcomes.html + + /articles/Family.html + /articles/Mantel-Haenszel-Statistic.html diff --git a/vignettes/articles/Family.Rmd b/vignettes/articles/Family.Rmd index e6f9248..3537273 100644 --- a/vignettes/articles/Family.Rmd +++ b/vignettes/articles/Family.Rmd @@ -1,30 +1,22 @@ --- title: "RobinCar Family" author: "Marlena Bannick" -date: "2025-08-21" +date: "2026-01-19" output: html_document --- +This vignette accompanies the Results section of the RobinCar Family paper. + ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} library(RobinCar) -library(dplyr) - -if (!require("remotes")) { - install.packages("remotes") -} -remotes::install_github( - "openpharma/RobinCar2" -) - library(RobinCar2) +library(dplyr) ``` -This vignette is to accompany the Results section of the RobinCar Family paper. - **Data Manipulation** Creates continuous and binary outcomes, and does simple data manipulations. @@ -117,6 +109,7 @@ surv <- robin_surv( treatment = arms ~ pb(strat), data = data ) +surv ``` You can use the `table` function to see the number of events and number at-risk