{
  "_id": "6a22717ecd65a98ecbd491f7",
  "Package": "TwoTimeScales",
  "Title": "Analysis of Event Data with Two Time Scales",
  "Type": "Package",
  "Version": "1.2.1",
  "Authors@R": "c(person(\"Angela\", \"Carollo\", email = \"carollo@demogr.mpg.de\",  role = c(\"aut\", \"cre\", \"cph\"), comment = c(ORCID = \"0000-0002-5625-6553\")),\nperson(\"Paul H.C.\", \"Eilers\", email = \"p.eilers@erasmusmc.nl\", role = \"aut\"),\nperson(\"Jutta\", \"Gampe\", email = \"gampe@demogr.mpg.de\", role = \"aut\"))",
  "URL": "https://github.com/AngelaCar/TwoTimeScales,\nhttps://angelacar.github.io/TwoTimeScales/",
  "Description": "Analyse time to event data with two time scales by\nestimating a smooth hazard that varies over two time scales. If\ncovariates are available, estimate a proportional hazards model\nwith such a two-dimensional baseline hazard. Functions are\nprovided to prepare the raw data for estimation, to fit the\nmodel and to plot the two-dimensional smooth hazard. Extension\nto a competing risks model are implemented. For details about\nthe method please refer to Carollo et al. (2025)\n<doi:10.1002/sim.10297>.",
  "License": "GPL-3",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "RoxygenNote": "7.3.3",
  "Roxygen": "list(markdown = TRUE)",
  "Config/testthat/edition": "3",
  "VignetteBuilder": "knitr",
  "BugReports": "https://github.com/AngelaCar/TwoTimeScales/issues",
  "Language": "en-US",
  "Config/pak/sysreqs": "make libicu-dev",
  "Repository": "https://angelacar.r-universe.dev",
  "Date/Publication": "2026-03-30 10:58:59 UTC",
  "RemoteUrl": "https://github.com/angelacar/twotimescales",
  "RemoteRef": "HEAD",
  "RemoteSha": "7ff669a2b5332fac780eb86c4c2b2ec1bb100dc5",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-06-05 06:44:38 UTC",
    "User": "root"
  },
  "Author": "Angela Carollo [aut, cre, cph] (ORCID:\n<https://orcid.org/0000-0002-5625-6553>),\nPaul H.C. Eilers [aut],\nJutta Gampe [aut]",
  "Maintainer": "Angela Carollo <carollo@demogr.mpg.de>",
  "MD5sum": "a46f657686c00240dfb379c24216f51c",
  "_user": "angelacar",
  "_type": "src",
  "_file": "TwoTimeScales_1.2.1.tar.gz",
  "_fileid": "b4987e6f8621713016b1604ce2965148544c85cb1be0524050f91d4744747da3",
  "_filesize": 1768688,
  "_sha256": "b4987e6f8621713016b1604ce2965148544c85cb1be0524050f91d4744747da3",
  "_created": "2026-06-05T06:44:38.000Z",
  "_published": "2026-06-05T06:49:34.941Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79677999390,
      "time": 220,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7430522248"
    },
    {
      "job": 79677999442,
      "time": 215,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7430521032"
    },
    {
      "job": 79677999384,
      "time": 235,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7430518369"
    },
    {
      "job": 79677999388,
      "time": 221,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7430517614"
    },
    {
      "job": 79677479201,
      "time": 245,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7430469650"
    },
    {
      "job": 79677999408,
      "time": 124,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7430499938"
    },
    {
      "job": 79677999416,
      "time": 154,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7430506779"
    },
    {
      "job": 79677999430,
      "time": 143,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7430504591"
    },
    {
      "job": 79677999447,
      "time": 147,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7430505368"
    }
  ],
  "_buildurl": "https://github.com/r-universe/angelacar/actions/runs/26999802775",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/angelacar/twotimescales",
  "_commit": {
    "id": "7ff669a2b5332fac780eb86c4c2b2ec1bb100dc5",
    "author": "Carollo <carollo@demogr.mpg.de>",
    "committer": "Carollo <carollo@demogr.mpg.de>",
    "message": "Fix in example for function select_model2ts\n",
    "time": 1774868339
  },
  "_maintainer": {
    "name": "Angela Carollo",
    "email": "carollo@demogr.mpg.de",
    "login": "angelacar",
    "orcid": "0000-0002-5625-6553",
    "description": "Postdoctoral Researcher",
    "uuid": 56386685
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "colorspace",
      "role": "Imports"
    },
    {
      "package": "Epi",
      "role": "Imports"
    },
    {
      "package": "fields",
      "role": "Imports"
    },
    {
      "package": "JOPS",
      "role": "Imports"
    },
    {
      "package": "LMMsolver",
      "role": "Imports"
    },
    {
      "package": "popEpi",
      "role": "Imports"
    },
    {
      "package": "reshape2",
      "role": "Imports"
    },
    {
      "package": "spam",
      "role": "Imports"
    },
    {
      "package": "ucminf",
      "role": "Imports"
    },
    {
      "package": "viridis",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "spelling",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    }
  ],
  "_owner": "angelacar",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-45",
      "n": 1
    },
    {
      "week": "2026-12",
      "n": 2
    },
    {
      "week": "2026-13",
      "n": 2
    },
    {
      "week": "2026-14",
      "n": 4
    }
  ],
  "_tags": [],
  "_stars": 13,
  "_contributors": [
    {
      "user": "angelacar",
      "count": 91,
      "uuid": 56386685
    }
  ],
  "_userbio": {
    "uuid": 56386685,
    "type": "user",
    "name": "Dr. Angela Carollo",
    "description": "Postdoctoral Researcher"
  },
  "_downloads": {
    "count": 453,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/TwoTimeScales"
  },
  "_devurl": "https://github.com/angelacar/twotimescales",
  "_pkgdown": "https://angelacar.github.io/TwoTimeScales/",
  "_searchresults": 5,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "extra/TwoTimeScales.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/angelacar/twotimescales",
  "_realowner": "angelacar",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.0",
      "date": "2024-12-23"
    },
    {
      "version": "1.2.0",
      "date": "2026-03-25"
    },
    {
      "version": "1.2.1",
      "date": "2026-03-30"
    }
  ],
  "_exports": [
    "covariates_plot",
    "cumhaz2ts",
    "cuminc2ts",
    "exposures_events_1d",
    "exposures_events_2d",
    "exposures_events_Lexis",
    "fit1ts",
    "fit2ts",
    "fitpgam",
    "fitvcm",
    "get_hazard_1d",
    "get_hazard_1d_LMM",
    "get_hazard_2d",
    "get_hazard_2d_LMM",
    "get_hr",
    "haz2ts_summary",
    "haz2tsLMM_summary",
    "haz2tsPGAM_summary",
    "haz2tsVCM_summary",
    "make_bins",
    "make_grid",
    "predict_cif2ts_pointwise",
    "predict_comprisks2ts",
    "predict_haz2ts",
    "predict_haz2ts_pointwise",
    "prepare_data",
    "select_model2ts",
    "surv2ts"
  ],
  "_datasets": [
    {
      "name": "reccolon2ts",
      "title": "Data from the chemotherapy for stace B/C colon cancer study",
      "object": "reccolon2ts",
      "class": [
        "data.frame"
      ],
      "fields": [
        "id",
        "study",
        "rx",
        "sex",
        "age",
        "obstruct",
        "perfor",
        "adhere",
        "nodes",
        "status",
        "differ",
        "extent",
        "surg",
        "node4",
        "timedc",
        "etype",
        "timer",
        "entrys",
        "timesr",
        "entryt",
        "timedc_y",
        "timesr_y",
        "entrys_y",
        "entryt_y",
        "timer_y"
      ],
      "rows": 461,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "covariates_plot",
      "title": "Plot of the covariates' effects",
      "topics": [
        "covariates_plot"
      ]
    },
    {
      "page": "cumhaz2ts",
      "title": "Cumulative hazard over two time scales",
      "topics": [
        "cumhaz2ts"
      ]
    },
    {
      "page": "cuminc2ts",
      "title": "Cumulative incidence surface over two time scales",
      "topics": [
        "cuminc2ts"
      ]
    },
    {
      "page": "exposures_events_1d",
      "title": "Bin data on one time scale",
      "topics": [
        "exposures_events_1d"
      ]
    },
    {
      "page": "exposures_events_2d",
      "title": "Bin data on two time scales",
      "topics": [
        "exposures_events_2d"
      ]
    },
    {
      "page": "exposures_events_Lexis",
      "title": "Bin data on the Lexis diagram",
      "topics": [
        "exposures_events_Lexis"
      ]
    },
    {
      "page": "fit1ts",
      "title": "Fit a smooth hazard model with one time scale",
      "topics": [
        "fit1ts"
      ]
    },
    {
      "page": "fit2ts",
      "title": "Fit a smooth hazard model with two time scales",
      "topics": [
        "fit2ts"
      ]
    },
    {
      "page": "fitpgam",
      "title": "Fit a log-additive model over two time scales",
      "topics": [
        "fitpgam"
      ]
    },
    {
      "page": "fitvcm",
      "title": "Fit a Varying Coefficient Model (VCM) over two time scales",
      "topics": [
        "fitvcm"
      ]
    },
    {
      "page": "get_hazard_1d",
      "title": "Get estimated (log-)hazard values with 1 time scale",
      "topics": [
        "get_hazard_1d"
      ]
    },
    {
      "page": "get_hazard_1d_LMM",
      "title": "Get estimated (log-)hazard values with 1 time scale",
      "topics": [
        "get_hazard_1d_LMM"
      ]
    },
    {
      "page": "get_hazard_2d",
      "title": "Get estimated (log-)hazard surface with 2 time scales",
      "topics": [
        "get_hazard_2d"
      ]
    },
    {
      "page": "get_hazard_2d_LMM",
      "title": "Get estimated (log-)hazard surface with 2 time scales",
      "topics": [
        "get_hazard_2d_LMM"
      ]
    },
    {
      "page": "get_hr",
      "title": "Get the Hazard Ratios with their Standard Errors",
      "topics": [
        "get_hr"
      ]
    },
    {
      "page": "haz2ts_summary",
      "title": "Summary function for object of class 'haz2ts'",
      "topics": [
        "haz2ts_summary"
      ]
    },
    {
      "page": "haz2tsLMM_summary",
      "title": "Summary function for object of class 'haz2tsLMM'",
      "topics": [
        "haz2tsLMM_summary"
      ]
    },
    {
      "page": "haz2tsPGAM_summary",
      "title": "Summary function for object of class 'haz2tsPGAM'",
      "topics": [
        "haz2tsPGAM_summary"
      ]
    },
    {
      "page": "haz2tsVCM_summary",
      "title": "Summary function for object of class 'haz2tsVCM'",
      "topics": [
        "haz2tsVCM_summary"
      ]
    },
    {
      "page": "imageplot_2ts",
      "title": "Image Plot of 2ts hazard",
      "topics": [
        "imageplot_2ts"
      ]
    },
    {
      "page": "imageplot_SE",
      "title": "Image Plot of Standard Errors for the 2ts hazard",
      "topics": [
        "imageplot_SE"
      ]
    },
    {
      "page": "make_bins",
      "title": "Construct bins over one or more time axes",
      "topics": [
        "make_bins"
      ]
    },
    {
      "page": "make_grid",
      "title": "Make a grid of points to evaluate B-splines",
      "topics": [
        "make_grid"
      ]
    },
    {
      "page": "plot_slices",
      "title": "Plot slices of the (log-) hazard",
      "topics": [
        "plot_slices"
      ]
    },
    {
      "page": "plot.haz1ts",
      "title": "Plot method for a haz1ts object.",
      "topics": [
        "plot.haz1ts"
      ]
    },
    {
      "page": "plot.haz1tsLMM",
      "title": "Plot method for a haz1ts object.",
      "topics": [
        "plot.haz1tsLMM"
      ]
    },
    {
      "page": "plot.haz2ts",
      "title": "Plot method for a haz2ts object.",
      "topics": [
        "plot.haz2ts"
      ]
    },
    {
      "page": "plot.haz2tsLMM",
      "title": "Plot method for a haz2tsLMM object.",
      "topics": [
        "plot.haz2tsLMM"
      ]
    },
    {
      "page": "plot.haz2tsPGAM",
      "title": "Plot method for a haz2tsPGAM object.",
      "topics": [
        "plot.haz2tsPGAM"
      ]
    },
    {
      "page": "plot.haz2tsVCM",
      "title": "Plot method for a haz2tsVCM object.",
      "topics": [
        "plot.haz2tsVCM"
      ]
    },
    {
      "page": "predict_cif2ts_pointwise",
      "title": "Point-wise prediction of cumulative incidence over 2 time scale",
      "topics": [
        "predict_cif2ts_pointwise"
      ]
    },
    {
      "page": "predict_comprisks2ts",
      "title": "Predict overall survival and cumulative incidence functions",
      "topics": [
        "predict_comprisks2ts"
      ]
    },
    {
      "page": "predict_haz2ts",
      "title": "Prediction method for objects of class ''haz2ts''",
      "topics": [
        "predict_haz2ts"
      ]
    },
    {
      "page": "predict_haz2ts_pointwise",
      "title": "Point-wise prediction hazard 2 time scale",
      "topics": [
        "predict_haz2ts_pointwise"
      ]
    },
    {
      "page": "prepare_data",
      "title": "Prepare raw data by binning them in 1d or 2d",
      "topics": [
        "prepare_data"
      ]
    },
    {
      "page": "prepare_data_LMMsolver",
      "title": "Process data to fit model with LMMsolver",
      "topics": [
        "prepare_data_LMMsolver"
      ]
    },
    {
      "page": "print.data2ts",
      "title": "Print method for a 'data2ts' object",
      "topics": [
        "print.data2ts"
      ]
    },
    {
      "page": "reccolon2ts",
      "title": "Data from the chemotherapy for stace B/C colon cancer study",
      "topics": [
        "reccolon2ts"
      ]
    },
    {
      "page": "select_model2ts",
      "title": "Selects best model among a group of fitted models",
      "topics": [
        "select_model2ts"
      ]
    },
    {
      "page": "surv2ts",
      "title": "Survival function with two time scales",
      "topics": [
        "surv2ts"
      ]
    }
  ],
  "_pkglogo": "https://github.com/angelacar/twotimescales/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/angelacar/twotimescales/raw/HEAD/README.md",
  "_rundeps": [
    "ash",
    "bitops",
    "boot",
    "cli",
    "cluster",
    "cmprsk",
    "colorspace",
    "cpp11",
    "data.table",
    "dotCall64",
    "dplyr",
    "Epi",
    "etm",
    "farver",
    "fds",
    "fields",
    "FNN",
    "generics",
    "ggplot2",
    "glue",
    "gridExtra",
    "gtable",
    "hdrcde",
    "isoband",
    "JOPS",
    "kernlab",
    "KernSmooth",
    "ks",
    "labeling",
    "lattice",
    "lifecycle",
    "LMMsolver",
    "locfit",
    "magrittr",
    "maps",
    "MASS",
    "Matrix",
    "mclust",
    "mgcv",
    "multicool",
    "mvtnorm",
    "nlme",
    "numDeriv",
    "pcaPP",
    "pillar",
    "pkgconfig",
    "plyr",
    "popEpi",
    "pracma",
    "R6",
    "rainbow",
    "RColorBrewer",
    "Rcpp",
    "RcppArmadillo",
    "RCurl",
    "reshape2",
    "rlang",
    "rpart",
    "S7",
    "scales",
    "spam",
    "SpATS",
    "stringi",
    "stringr",
    "survival",
    "tibble",
    "tidyselect",
    "ucminf",
    "utf8",
    "vctrs",
    "viridis",
    "viridisLite",
    "withr",
    "zoo"
  ],
  "_vignettes": [
    {
      "source": "TwoTimeScales.Rmd",
      "filename": "TwoTimeScales.html",
      "title": "Introduction to TwoTimeScales",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Data: reccolon2ts",
        "Step 1: data preparation",
        "One time scale only",
        "Two time scales",
        "Including covariates",
        "Step 2: Estimation",
        "One time scale",
        "Step 3: Visualize the results",
        "References"
      ],
      "created": "2024-04-25 14:20:17",
      "modified": "2024-12-18 09:57:47",
      "commits": 5
    },
    {
      "source": "onetime.Rmd",
      "filename": "onetime.html",
      "title": "Smooth hazards with one time scale",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Data preparation",
        "Estimation",
        "Presenting the results of the smooth one time scale hazard model",
        "References"
      ],
      "created": "2024-04-25 10:02:00",
      "modified": "2024-12-18 09:57:47",
      "commits": 6
    },
    {
      "source": "twotimes.Rmd",
      "filename": "twotimes.html",
      "title": "Smooth hazards with two time scales",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Hazard of death by time since randomization and time since recurrence",
        "PH regression for the colon cancer data",
        "Prepare the data over the Lexis diagram"
      ],
      "created": "2024-04-25 10:02:00",
      "modified": "2024-12-18 09:57:47",
      "commits": 7
    },
    {
      "source": "visualization.Rmd",
      "filename": "visualization.html",
      "title": "Visualize hazards with two time scales",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "The function plot()",
        "Baseline hazard and log-hazard",
        "Plot on the $(t,s)$-plane",
        "Evaluate the $B$-splines on a finer grid",
        "Plot the log-hazard",
        "Plot the log10-hazard",
        "Cut extrapolated hazard",
        "Change color palette and color of the contour lines",
        "Standard Errors surface",
        "Cross-sections of the hazard",
        "Survival function",
        "Cumulative hazard"
      ],
      "created": "2024-04-25 10:02:00",
      "modified": "2024-12-18 09:57:47",
      "commits": 6
    }
  ],
  "_score": 6.017033339298781,
  "_indexed": true,
  "_nocasepkg": "twotimescales",
  "_universes": [
    "angelacar"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.2.1",
      "date": "2026-06-05T06:47:40.000Z",
      "distro": "noble",
      "commit": "7ff669a2b5332fac780eb86c4c2b2ec1bb100dc5",
      "fileid": "07f357c649b143f6100f9e4d8d4f3aa9fea005a437848ae7bc2dcddff8ba14a1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/angelacar/actions/runs/26999802775"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.2.1",
      "date": "2026-06-05T06:47:30.000Z",
      "distro": "noble",
      "commit": "7ff669a2b5332fac780eb86c4c2b2ec1bb100dc5",
      "fileid": "8d73226324a5fe1dbb88be4f28908a6585f08929963b6a1380b7e90a8a05726a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/angelacar/actions/runs/26999802775"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.2.1",
      "date": "2026-06-05T06:47:26.000Z",
      "commit": "7ff669a2b5332fac780eb86c4c2b2ec1bb100dc5",
      "fileid": "8508687a68cf6f39155cf09ee35c873290240c9d99cb76a49e20ba825b380e10",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/angelacar/actions/runs/26999802775"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.2.1",
      "date": "2026-06-05T06:47:32.000Z",
      "commit": "7ff669a2b5332fac780eb86c4c2b2ec1bb100dc5",
      "fileid": "6101ccaf99ccb061b24931977c375e7289b5c888cdd5a275257f9a55ab299664",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/angelacar/actions/runs/26999802775"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.2.1",
      "date": "2026-06-05T06:47:11.000Z",
      "commit": "7ff669a2b5332fac780eb86c4c2b2ec1bb100dc5",
      "fileid": "442f12c749dece152b8f54ebec2625ccb6d2c6ef00dd910fa51e708dee878b1b",
      "status": "success",
      "buildurl": "https://github.com/r-universe/angelacar/actions/runs/26999802775"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.2.1",
      "date": "2026-06-05T06:46:17.000Z",
      "commit": "7ff669a2b5332fac780eb86c4c2b2ec1bb100dc5",
      "fileid": "d238cd8d08d7545c3475731a1efc3d42b537252feaff3b030a6ebe3b6c44ae9d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/angelacar/actions/runs/26999802775"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.2.1",
      "date": "2026-06-05T06:46:12.000Z",
      "commit": "7ff669a2b5332fac780eb86c4c2b2ec1bb100dc5",
      "fileid": "a6a047c0c0a95401b1daf9bde26e83b64abd5d0491839675fe261c1cfe114a45",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/angelacar/actions/runs/26999802775"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.2.1",
      "date": "2026-06-05T06:46:10.000Z",
      "commit": "7ff669a2b5332fac780eb86c4c2b2ec1bb100dc5",
      "fileid": "114fbe854f0702af14583de83a668bfd8d3fa498330ed9ab27116d7c3174e3b4",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/angelacar/actions/runs/26999802775"
    }
  ]
}