{
  "_id": "6a1026e3acfb0bcc41c8fbc2",
  "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-05-13 08:54:09 UTC",
    "User": "root"
  },
  "Author": "Larry Leon [aut, cre]",
  "Maintainer": "Larry Leon <larry.leon.05@post.harvard.edu>",
  "MD5sum": "a51d165f7f6a8307f71f504f2eb3a376",
  "_user": "larry-leon",
  "_type": "src",
  "_file": "weightedsurv_0.1.0.tar.gz",
  "_fileid": "a3c291d8d7a74e20104c6967df814e230694a936517b4a6a9c1cbc0f00e78a95",
  "_filesize": 3260912,
  "_sha256": "a3c291d8d7a74e20104c6967df814e230694a936517b4a6a9c1cbc0f00e78a95",
  "_created": "2026-05-13T08:54:09.000Z",
  "_published": "2026-05-22T09:50:27.151Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77355976528,
      "time": 199,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6965748506"
    },
    {
      "job": 77355976421,
      "time": 185,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6965743799"
    },
    {
      "job": 77355977129,
      "time": 170,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6965728201"
    },
    {
      "job": 77355976492,
      "time": 174,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6965725904"
    },
    {
      "job": 77355975763,
      "time": 249,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6965675648"
    },
    {
      "job": 77355975782,
      "time": 139,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7157664275"
    },
    {
      "job": 77355976307,
      "time": 134,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6965724493"
    },
    {
      "job": 77355976802,
      "time": 119,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6965719362"
    },
    {
      "job": 77355976602,
      "time": 145,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6965728166"
    }
  ],
  "_buildurl": "https://github.com/r-universe/larry-leon/actions/runs/25788655023",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/larry-leon/weightedsurv",
  "_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
  },
  "_maintainer": {
    "name": "Larry Leon",
    "email": "larry.leon.05@post.harvard.edu",
    "login": "larry-leon",
    "uuid": 46011360
  },
  "_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-39",
      "n": 7
    },
    {
      "week": "2025-40",
      "n": 11
    },
    {
      "week": "2025-41",
      "n": 9
    },
    {
      "week": "2025-42",
      "n": 11
    },
    {
      "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",
    "description": "Biostatistician with interests in survival analysis and applications of causal inference methodologies to clinical trials research"
  },
  "_downloads": {
    "count": 496,
    "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": 22,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/readme.html",
    "extra/readme.md",
    "extra/weightedsurv.html",
    "manual.pdf"
  ],
  "_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": 6.12057393120585,
  "_indexed": true,
  "_nocasepkg": "weightedsurv",
  "_universes": [
    "larry-leon"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-05-13T08:57:11.000Z",
      "distro": "noble",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "b29cac858f41213d2ba7f8464deca6250c66c85040eae7d5cc2fc932795a62c4",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/25788655023"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-05-13T08:57:01.000Z",
      "distro": "noble",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "b7b71aafc1ba7c05b5406908b6c16b1464f906e85bdb075bd0506db1c519600a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/25788655023"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-05-13T08:56:30.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "9fe4ea335ace935601b1210b67bee077dd5388ac4a1d3bee0e541f687e10c4da",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/25788655023"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-05-13T08:56:18.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "2b6c1df03615ba6f6d094b58147e64f9e1cb0ad09533e5834a184dc4c4239211",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/25788655023"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-05-13T08:55:59.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "4c3cfe4f9fd073dfa6d7416e7be860d58be6e79ef34fa147e5988e7a39f338eb",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/25788655023"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-05-13T08:55:46.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "374657a9d252685a5964f64a93fb71e80a7af5f43b0f690be8ddc636ccfee993",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/25788655023"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-05-13T08:56:07.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "ad1cfc8dec80ce1557d97a15634f755eea5296c1c6906915c9601a10b2a3155c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/25788655023"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.0",
      "date": "2026-05-22T09:50:04.000Z",
      "commit": "edd61a2cecf4b08352719af0a24b10fa1e0b041c",
      "fileid": "6a934f608df19d5f1f11caedb22e2602aef549396bcf7d894f2e9c8dd166c63d",
      "status": "success",
      "buildurl": "https://github.com/r-universe/larry-leon/actions/runs/25788655023"
    }
  ]
}