{
  "_id": "6ae350eb327abcdf868672b7",
  "Package": "weightedsurv",
  "Title": "Survival Analysis with Subject-Specific (Case Weights) and\nTime-Dependent Weighting",
  "Version": "0.1.0",
  "Authors@R": "person(\"Larry\", \"Leon\", , \"larry.leon.05@post.harvard.edu\", role = c(\"aut\", \"cre\"))",
  "Description": "Provides survival analysis functions with support for\ntime-dependent and subject-specific (e.g., propensity score)\nweighting. Implements weighted estimation for Cox models,\nKaplan-Meier survival curves, and treatment differences with\npoint-wise and simultaneous confidence bands. Includes\nrestricted mean survival time (RMST) comparisons evaluated\nacross all potential truncation times with both point-wise and\nsimultaneous confidence bands. See Cole, S. R. & Hernán, M. A.\n(2004) <doi:10.1016/j.cmpb.2003.10.004> for methodological\nbackground.",
  "License": "MIT + file LICENSE",
  "URL": "https://larry-leon.github.io/weightedsurv/,\nhttps://github.com/larry-leon/weightedsurv",
  "BugReports": "https://github.com/larry-leon/weightedsurv/issues",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "VignetteBuilder": "knitr",
  "Repository": "https://larry-leon.r-universe.dev",
  "Date/Publication": "2026-02-12 18:28:14 UTC",
  "RemoteUrl": "https://github.com/larry-leon/weightedsurv",
  "RemoteRef": "HEAD",
  "RemoteSha": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-10-29 12:56:49 UTC",
    "User": "root"
  },
  "Author": "Larry Leon [aut, cre]",
  "Maintainer": "Larry Leon <larry.leon.05@post.harvard.edu>",
  "_user": "larry-leon",
  "_type": "src",
  "_file": "weightedsurv_0.1.0.tar.gz",
  "_fileid": "https://r2.ropensci.org/9d62e5c8267103b6fafb56b841f4b98b5cb0d71853d02ee7981332683c99d27e",
  "_filesize": 3257041,
  "_sha256": "9d62e5c8267103b6fafb56b841f4b98b5cb0d71853d02ee7981332683c99d27e",
  "_expires": "2027-02-06T13:58:00.000Z",
  "_created": "2026-10-29T12:56:49.000Z",
  "_published": "2026-10-29T13:58:03.041Z",
  "_upstream": "https://github.com/larry-leon/weightedsurv",
  "_status": "success",
  "_maintainer": {
    "name": "Larry Leon",
    "email": "larry.leon.05@post.harvard.edu",
    "login": "larry-leon",
    "description": "Biostatistician with interests in survival analysis and applications of causal inference methodologies to clinical trials research",
    "uuid": 46011360
  },
  "_jobs": [
    {
      "job": 123460287305,
      "time": 179,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "12897979716"
    },
    {
      "job": 123460287267,
      "time": 241,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12898717993"
    },
    {
      "job": 123460287169,
      "time": 142,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "12903335300"
    },
    {
      "job": 123460287127,
      "time": 127,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12903390758"
    },
    {
      "job": 123456031377,
      "time": 520,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12898487776"
    },
    {
      "job": 123460287186,
      "time": 139,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "12899066407"
    },
    {
      "job": 123460287236,
      "time": 129,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "12899535500"
    },
    {
      "job": 123460287384,
      "time": 133,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "12898692855"
    },
    {
      "job": 123460287403,
      "time": 187,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12899606417"
    }
  ],
  "_buildurl": "https://github.com/r-universe/larry-leon/actions/runs/40876297140",
  "_commit": {
    "id": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
    "author": "Larry Leon <larry.leon.05@post.harvard.edu>",
    "committer": "Larry Leon <larry.leon.05@post.harvard.edu>",
    "message": "Update weightedcox_wald-vs-logrank_simulations.Rmd\n",
    "time": 1770920894
  },
  "_distro": "resolute",
  "_host": "GitHub-Actions",
  "_registered": true,
  "_dependencies": [
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "survival",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "adjustedCurves",
      "role": "Suggests"
    },
    {
      "package": "data.table",
      "role": "Suggests"
    },
    {
      "package": "DiagrammeR",
      "role": "Suggests"
    },
    {
      "package": "dplyr",
      "role": "Suggests"
    },
    {
      "package": "gt",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "pkgdown",
      "role": "Suggests"
    },
    {
      "package": "pammtools",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    }
  ],
  "_owner": "larry-leon",
  "_selfowned": true,
  "_usedby": 1,
  "_updates": [
    {
      "week": "2025-47",
      "n": 9
    },
    {
      "week": "2025-51",
      "n": 4
    },
    {
      "week": "2026-04",
      "n": 1
    },
    {
      "week": "2026-07",
      "n": 8
    }
  ],
  "_tags": [
    {
      "name": "v0.1.0",
      "date": "2025-12-16"
    }
  ],
  "_topics": [
    "kaplan-meier",
    "rmst",
    "weighted-cox",
    "wlr"
  ],
  "_stars": 5,
  "_contributors": [
    {
      "user": "larry-leon",
      "count": 65,
      "uuid": 46011360
    },
    {
      "user": "jdblischak",
      "count": 8,
      "uuid": 1608317
    }
  ],
  "_userbio": {
    "uuid": 46011360,
    "type": "user",
    "name": "Larry Leon",
    "followers": 7,
    "description": "Biostatistician with interests in survival analysis and applications of causal inference methodologies to clinical trials research"
  },
  "_downloads": {
    "count": 371,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/weightedsurv"
  },
  "_devurl": "https://github.com/larry-leon/weightedsurv",
  "_pkgdown": "https://larry-leon.github.io/weightedsurv/",
  "_searchresults": 29,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/readme.html",
    "extra/readme.md",
    "extra/weightedsurv.html",
    "LICENSE"
  ],
  "_homeurl": "https://github.com/larry-leon/weightedsurv",
  "_realowner": "larry-leon",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2025-12-22"
    }
  ],
  "_exports": [
    "add_legends",
    "add_median_annotation",
    "add_risk_table",
    "calculate_risk_event_counts",
    "check_km_curve",
    "check_results",
    "ci_cox",
    "count_weighted",
    "cox_rhogamma",
    "cox_rhogamma_resample",
    "cox_score_rhogamma",
    "create_baseline_table",
    "cumulative_rmst_bands",
    "df_counting",
    "extract_and_calc_weights",
    "extract_group_data",
    "find_cox_root",
    "format_pval",
    "get_censoring_and_events",
    "get_dfcounting",
    "get_event_risk_matrices",
    "get_riskpoints",
    "get_validated_weights",
    "get_weights",
    "KM_diff",
    "KM_estimates",
    "KM_plot_2sample_weighted_counting",
    "km_quantile",
    "km_quantile_table",
    "kmq_calculations",
    "N_rhogamma",
    "plot_km",
    "plot_km_confint_polygon",
    "plot_km_curves_counting",
    "plot_weight_schemes",
    "plot_weighted_km",
    "plotKM.band_subgroups",
    "resampling_survival",
    "risk_weighted",
    "safe_run",
    "score_calculation",
    "validate_input",
    "validate_scheme_params",
    "wlr_cumulative",
    "wlr_dhat_estimates",
    "wt.rg.S"
  ],
  "_help": [
    {
      "page": "add_legends",
      "title": "Add legends to KM plot",
      "topics": [
        "add_legends"
      ]
    },
    {
      "page": "add_median_annotation",
      "title": "Add median annotation to KM plot",
      "topics": [
        "add_median_annotation"
      ]
    },
    {
      "page": "add_risk_table",
      "title": "Add risk table annotation to KM plot",
      "topics": [
        "add_risk_table"
      ]
    },
    {
      "page": "calculate_risk_event_counts",
      "title": "Calculate risk set and event counts at time points",
      "topics": [
        "calculate_risk_event_counts"
      ]
    },
    {
      "page": "check_km_curve",
      "title": "Check KM curve for validity",
      "topics": [
        "check_km_curve"
      ]
    },
    {
      "page": "check_results",
      "title": "Check and Compare Statistical Test Results",
      "concept": [
        "diagnostic_functions"
      ],
      "topics": [
        "check_results"
      ]
    },
    {
      "page": "ci_cox",
      "title": "Confidence interval for Cox model estimate",
      "topics": [
        "ci_cox"
      ]
    },
    {
      "page": "count_weighted",
      "title": "Weighted counting process",
      "topics": [
        "count_weighted"
      ]
    },
    {
      "page": "cox_rhogamma",
      "title": "Weighted Cox Model with Rho-Gamma Weights",
      "concept": [
        "survival_analysis",
        "weighted_tests"
      ],
      "topics": [
        "cox_rhogamma"
      ]
    },
    {
      "page": "cox_rhogamma_resample",
      "title": "Resampling for Weighted Cox Model (rho, gamma)",
      "topics": [
        "cox_rhogamma_resample"
      ]
    },
    {
      "page": "cox_score_rhogamma",
      "title": "Cox score with rho-gamma weights",
      "topics": [
        "cox_score_rhogamma"
      ]
    },
    {
      "page": "create_baseline_table",
      "title": "Create Baseline Characteristics Table by Treatment Arm",
      "topics": [
        "create_baseline_table"
      ]
    },
    {
      "page": "cumulative_rmst_bands",
      "title": "Cumulative RMST bands for survival curves",
      "topics": [
        "cumulative_rmst_bands"
      ]
    },
    {
      "page": "df_counting",
      "title": "Weighted and Stratified Survival Analysis",
      "concept": [
        "survival_analysis",
        "weighted_tests"
      ],
      "topics": [
        "df_counting"
      ]
    },
    {
      "page": "extract_and_calc_weights",
      "title": "Extract and calculate weights for multiple schemes",
      "topics": [
        "extract_and_calc_weights"
      ]
    },
    {
      "page": "extract_group_data",
      "title": "Extract time, event, and weight data for a group",
      "topics": [
        "extract_group_data"
      ]
    },
    {
      "page": "find_cox_root",
      "title": "Root-finding for Cox score function",
      "topics": [
        "find_cox_root"
      ]
    },
    {
      "page": "format_pval",
      "title": "Format p-value for display",
      "topics": [
        "format_pval"
      ]
    },
    {
      "page": "get_censoring_and_events",
      "title": "Get censoring and event times and their indices",
      "topics": [
        "get_censoring_and_events"
      ]
    },
    {
      "page": "get_dfcounting",
      "title": "Get df_counting results",
      "topics": [
        "get_dfcounting"
      ]
    },
    {
      "page": "get_event_risk_matrices",
      "title": "Event and Risk Matrices for Survival Analysis",
      "topics": [
        "get_event_risk_matrices"
      ]
    },
    {
      "page": "get_riskpoints",
      "title": "Get risk set counts at specified risk points",
      "topics": [
        "get_riskpoints"
      ]
    },
    {
      "page": "get_validated_weights",
      "title": "Get validated weights for a data frame",
      "topics": [
        "get_validated_weights"
      ]
    },
    {
      "page": "get_weights",
      "title": "Get weights for a weighting scheme",
      "topics": [
        "get_weights"
      ]
    },
    {
      "page": "KM_diff",
      "title": "Kaplan-Meier Difference Between Groups",
      "concept": [
        "plotting_functions",
        "survival_analysis"
      ],
      "topics": [
        "KM_diff"
      ]
    },
    {
      "page": "KM_estimates",
      "title": "Kaplan-Meier Survival Estimates and Variance",
      "topics": [
        "KM_estimates"
      ]
    },
    {
      "page": "KM_plot_2sample_weighted_counting",
      "title": "Plot Weighted Kaplan-Meier Curves for Two Samples (Counting Process Format)",
      "topics": [
        "KM_plot_2sample_weighted_counting"
      ]
    },
    {
      "page": "km_quantile",
      "title": "Kaplan-Meier quantile and confidence interval",
      "topics": [
        "km_quantile"
      ]
    },
    {
      "page": "km_quantile_table",
      "title": "Table of KM quantiles for two groups",
      "topics": [
        "km_quantile_table"
      ]
    },
    {
      "page": "kmq_calculations",
      "title": "Kaplan-Meier quantile calculation",
      "topics": [
        "kmq_calculations"
      ]
    },
    {
      "page": "N_rhogamma",
      "title": "Weighted event count for Cox model",
      "topics": [
        "N_rhogamma"
      ]
    },
    {
      "page": "plot_km",
      "title": "Plot Kaplan-Meier curves",
      "topics": [
        "plot_km"
      ]
    },
    {
      "page": "plot_km_confint_polygon",
      "title": "Plot confidence interval polygon for KM curve",
      "topics": [
        "plot_km_confint_polygon"
      ]
    },
    {
      "page": "plot_km_curves_counting",
      "title": "Plot KM curves for two groups with optional confidence intervals and censoring marks",
      "topics": [
        "plot_km_curves_counting"
      ]
    },
    {
      "page": "plot_weight_schemes",
      "title": "Plot weight schemes for survival analysis",
      "topics": [
        "plot_weight_schemes"
      ]
    },
    {
      "page": "plot_weighted_km",
      "title": "Plot weighted Kaplan-Meier curves",
      "topics": [
        "plot_weighted_km"
      ]
    },
    {
      "page": "plotKM.band_subgroups",
      "title": "Plot Kaplan-Meier Survival Difference Curves with Subgroups and Confidence Bands",
      "topics": [
        "plotKM.band_subgroups"
      ]
    },
    {
      "page": "resampling_survival",
      "title": "Resampling Survival Curves for Confidence Bands",
      "topics": [
        "resampling_survival"
      ]
    },
    {
      "page": "risk_weighted",
      "title": "Weighted risk set",
      "topics": [
        "risk_weighted"
      ]
    },
    {
      "page": "safe_run",
      "title": "Safe execution wrapper",
      "topics": [
        "safe_run"
      ]
    },
    {
      "page": "score_calculation",
      "title": "Score calculation for weighted Cox model",
      "topics": [
        "score_calculation"
      ]
    },
    {
      "page": "validate_input",
      "title": "Validate required columns in a data frame",
      "topics": [
        "validate_input"
      ]
    },
    {
      "page": "validate_scheme_params",
      "title": "Validate weighting scheme parameters",
      "topics": [
        "validate_scheme_params"
      ]
    },
    {
      "page": "wlr_cumulative",
      "title": "Weighted log-rank cumulative statistics",
      "topics": [
        "wlr_cumulative"
      ]
    },
    {
      "page": "wlr_dhat_estimates",
      "title": "Weighted Log-Rank and Difference Estimate at a Specified Time",
      "topics": [
        "wlr_dhat_estimates"
      ]
    },
    {
      "page": "wt.rg.S",
      "title": "Compute Time-Dependent Weights for Survival Analysis",
      "concept": [
        "survival_analysis",
        "weighted_tests"
      ],
      "topics": [
        "wt.rg.S"
      ]
    }
  ],
  "_readme": "https://github.com/larry-leon/weightedsurv/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "cpp11",
    "farver",
    "ggplot2",
    "glue",
    "gtable",
    "isoband",
    "labeling",
    "lattice",
    "lifecycle",
    "Matrix",
    "R6",
    "RColorBrewer",
    "rlang",
    "S7",
    "scales",
    "survival",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "weightedsurv_examples.Rmd",
      "filename": "weightedsurv_examples.html",
      "title": "Weighted Survival Analysis Examples",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "Survival Analysis and KM Plotting",
        "Analysis functions",
        "df_counting",
        "plot_weighted_km",
        "KM_diff",
        "plotKM.band_subgroups",
        "wlr_dhat_estimates",
        "cumulative_rmst_bands",
        "GBSG data analysis example",
        "Show some weight functions",
        "GBSG KM plots",
        "Rotterdam observational data analysis with weighting",
        "Compare with GBSG trial data",
        "Simultaneous bands and point-wise CIs",
        "Compare Rotterdam observational data with propensity-score weighting and GBSG randomized data",
        "Compare GBSG experimental to Rotterdam control",
        "Cumulative weighted log-rank statistics",
        "With such dramatic difference in follow-up",
        "GBSG subgroup differences along with ITT simultaneous band:",
        "Look at GBSG er>0 subgroup population",
        "Weighted Cox Analysis of Rotterdam data with time-dependent, and subject-specific [ps weighting] weighting",
        "Some checks on results",
        "Check weighted K-M SE's with survfit",
        "Check SE's calculated via resampling (draws = 5000)",
        "Compare with the adjustedCurves package",
        "Compare KM plots with adjustedCurves package",
        "Compare SE's with adjustedCurves package",
        "Check log-rank statistics"
      ],
      "created": "2025-11-18 20:05:05",
      "modified": "2026-02-12 03:35:15",
      "commits": 3
    }
  ],
  "_score": 5.939519252618618,
  "_indexed": true,
  "_nocasepkg": "weightedsurv",
  "_universes": [
    "larry-leon"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-10-29T12:59:28.000Z",
      "distro": "resolute",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "https://r2.ropensci.org/444ef94073285aa02f4d4658ea5f5dd704ff6b6053c7b5160fbda5a6e901288d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/40876297140"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-10-29T13:00:29.000Z",
      "distro": "resolute",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "https://r2.ropensci.org/d7018ab2d03038abfe715f9470c61ab121a1e4485eb0e134b13ee18dfaad1473",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/40876297140"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-10-29T13:54:14.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "https://r2.ropensci.org/e877f055faf9df7a301793b35258089b385c03fae0bb7c591dea2f8adc5fb4ba",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/40876297140"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-10-29T13:57:00.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "https://r2.ropensci.org/6828d63828166515f5e3ec442b4888ea729967d7eb40e703cc22f3a36214b756",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/40876297140"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.0",
      "date": "2026-10-29T12:59:33.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "https://r2.ropensci.org/22fd4817346c3b1bf9357864c0b9dd5185102f426d2cf9f67a6e9bdb3845bc98",
      "status": "success",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/40876297140"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-10-29T12:58:25.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "https://r2.ropensci.org/619ac6f040f9668cb425872efc4889c8f04ad90e9bd149b442c32f5c571064b3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/40876297140"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-10-29T12:58:33.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "https://r2.ropensci.org/bcee0a7ca4e33bd0d7e803dd9341c1f95adf4435e736a0ee4feb351799f3c9b7",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/40876297140"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-10-29T12:59:31.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "https://r2.ropensci.org/88e22e775a38ef56381f6fa4ba2907385a4b345e5d153aa0173d81efb09ad483",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/40876297140"
    }
  ]
}