{
  "_id": "6ae5b05e3d0f299392dd45bc",
  "Package": "PITS",
  "Title": "Power of Interrupted Time Series (ITS) Studies",
  "Version": "0.1.1",
  "Authors@R": "person(\"David\", \"de Lorenzo\", email = \"drdaviddelorenzo@gmail.com\",\nrole = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0003-2042-0961\",\naffiliation = \"UCL Great Ormond Street Institute of Child Health, London, UK; Neotree, London, UK (https://neotree.org/)\"))",
  "Description": "Provides tools for estimating the statistical power of\nInterrupted Time Series (ITS) designs, with a focus on\nhealthcare applications. The package supports prospective power\ncalculations before a study begins, and retrospective\nassessments of whether a completed study was adequately\npowered. It includes functions to estimate nuisance parameters\n(baseline, residual standard deviation, autocorrelation) from\ndata observed before the intervention, and to estimate power\nvia Monte Carlo simulation for single-site and multi-site\ndesigns. Utility functions for design optimisation sweeps and\npublication- ready plots are also provided.",
  "License": "MIT + file LICENSE",
  "Language": "en-GB",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "LazyData": "true",
  "URL": "https://github.com/drdaviddelorenzo/PITS",
  "BugReports": "https://github.com/drdaviddelorenzo/PITS/issues",
  "Config/roxygen2/version": "8.0.0",
  "Repository": "https://drdaviddelorenzo.r-universe.dev",
  "Date/Publication": "2026-07-03 11:39:57 UTC",
  "RemoteUrl": "https://github.com/drdaviddelorenzo/pits",
  "RemoteRef": "HEAD",
  "RemoteSha": "a6169a9f63cc8107f4f0438a31ad8b868568863b",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-10-31 08:37:38 UTC",
    "User": "root"
  },
  "Author": "David de Lorenzo [aut, cre] (ORCID:\n<https://orcid.org/0000-0003-2042-0961>, affiliation: UCL Great\nOrmond Street Institute of Child Health, London, UK; Neotree,\nLondon, UK (https://neotree.org/))",
  "Maintainer": "David de Lorenzo <drdaviddelorenzo@gmail.com>",
  "_user": "drdaviddelorenzo",
  "_type": "src",
  "_file": "PITS_0.1.1.tar.gz",
  "_fileid": "https://r2.ropensci.org/9410683ba3c0fd9a9de8e85bc5087b73732076d83c6fd08f3a92eda3f98e18aa",
  "_filesize": 623538,
  "_sha256": "9410683ba3c0fd9a9de8e85bc5087b73732076d83c6fd08f3a92eda3f98e18aa",
  "_expires": "2027-02-08T09:09:48.000Z",
  "_created": "2026-10-31T08:37:38.000Z",
  "_published": "2026-10-31T09:09:50.153Z",
  "_upstream": "https://github.com/drdaviddelorenzo/pits",
  "_status": "success",
  "_maintainer": {
    "name": "David de Lorenzo",
    "email": "drdaviddelorenzo@gmail.com",
    "login": "drdaviddelorenzo",
    "linkedin": "in/drdaviddelorenzo",
    "orcid": "0000-0003-2042-0961",
    "twitter": "@daviddelorenzo",
    "description": "Passionate about unlocking the secrets of data for better health",
    "uuid": 2121511
  },
  "_jobs": [
    {
      "job": 124491200784,
      "time": 135,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "13036387510"
    },
    {
      "job": 124491200841,
      "time": 119,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "13036294083"
    },
    {
      "job": 124491200823,
      "time": 143,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "13037910298"
    },
    {
      "job": 124491200817,
      "time": 169,
      "config": "macos-release-arm64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13036364488"
    },
    {
      "job": 124490357996,
      "time": 252,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "13036408656"
    },
    {
      "job": 124491200790,
      "time": 93,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "13036623430"
    },
    {
      "job": 124491200809,
      "time": 85,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "13035938087"
    },
    {
      "job": 124491200819,
      "time": 112,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "13036139288"
    },
    {
      "job": 124491200797,
      "time": 83,
      "config": "windows-release-x86_64",
      "r": "4.6.2",
      "check": "OK",
      "artifact": "13036302621"
    }
  ],
  "_buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/41185087525",
  "_commit": {
    "id": "a6169a9f63cc8107f4f0438a31ad8b868568863b",
    "author": "David de Lorenzo <drdaviddelorenzo@gmail.com>",
    "committer": "David de Lorenzo <drdaviddelorenzo@gmail.com>",
    "message": "Fix plot_power_heatmap() legend/xlab collision\n\nThe adequacy legend (mtext, side = 1) was hard-coded to line = 3, the same\nline R's default mgp uses for the x-axis label, so the two printed on top of\neach other. Moved the legend to line = 4.3, which clears the xlab and still\nfits inside the default bottom margin. Cosmetic only: no argument, return\nvalue, or plotted-data change.\n\nAlso gitignore Rplots.pdf (stray default-device output).\n",
    "time": 1783078797
  },
  "_distro": "resolute",
  "_host": "GitHub-Actions",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.0.0",
      "role": "Depends"
    },
    {
      "package": "nlme",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    }
  ],
  "_owner": "drdaviddelorenzo",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-25",
      "n": 8
    },
    {
      "week": "2026-26",
      "n": 2
    },
    {
      "week": "2026-27",
      "n": 3
    }
  ],
  "_tags": [
    {
      "name": "v0.1.0",
      "date": "2026-06-23"
    }
  ],
  "_stars": 1,
  "_contributors": [
    {
      "user": "drdaviddelorenzo",
      "count": 13,
      "uuid": 2121511
    }
  ],
  "_userbio": {
    "uuid": 2121511,
    "type": "user",
    "name": "David de Lorenzo",
    "followers": 26,
    "description": "Passionate about unlocking the secrets of data for better health"
  },
  "_downloads": {
    "count": 167,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/PITS"
  },
  "_devurl": "https://github.com/drdaviddelorenzo/pits",
  "_searchresults": 6,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/PITS.html",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE"
  ],
  "_homeurl": "https://github.com/drdaviddelorenzo/pits",
  "_realowner": "drdaviddelorenzo",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2026-06-30"
    }
  ],
  "_exports": [
    "build_param_grid",
    "calculate_power",
    "calculate_power_multi",
    "diagnose_params",
    "estimate_and_calculate",
    "estimate_baseline",
    "estimate_its_params",
    "estimate_rho",
    "estimate_sigma",
    "estimate_trend",
    "export_results",
    "fit_its_model",
    "interpret_power",
    "plot_its_example",
    "plot_power_curve",
    "plot_power_heatmap",
    "power_sweep",
    "run_its_power",
    "run_power_grid",
    "simulate_its_data",
    "simulate_predata",
    "validate_params"
  ],
  "_datasets": [
    {
      "name": "example_cfr_data",
      "title": "Example pre-intervention case fatality rate data",
      "object": "example_cfr_data",
      "class": [
        "data.frame"
      ],
      "fields": [
        "time",
        "outcome"
      ],
      "rows": 24,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "PITS-package",
      "title": "PITS: Power of Interrupted Time Series studies",
      "topics": [
        "PITS-package",
        "PITS"
      ]
    },
    {
      "page": "build_param_grid",
      "title": "Build a factorial parameter grid for power calculations",
      "topics": [
        "build_param_grid"
      ]
    },
    {
      "page": "calculate_power",
      "title": "Estimate statistical power for a single-site ITS design",
      "topics": [
        "calculate_power"
      ]
    },
    {
      "page": "calculate_power_multi",
      "title": "Estimate statistical power for a multi-site ITS design",
      "topics": [
        "calculate_power_multi"
      ]
    },
    {
      "page": "diagnose_params",
      "title": "Diagnostic plots for pre-intervention data",
      "topics": [
        "diagnose_params"
      ]
    },
    {
      "page": "estimate_and_calculate",
      "title": "Estimate parameters and calculate power in one step",
      "topics": [
        "estimate_and_calculate"
      ]
    },
    {
      "page": "estimate_baseline",
      "title": "Estimate baseline outcome from pre-intervention data",
      "topics": [
        "estimate_baseline"
      ]
    },
    {
      "page": "estimate_its_params",
      "title": "Estimate all ITS nuisance parameters from pre-intervention data",
      "topics": [
        "estimate_its_params"
      ]
    },
    {
      "page": "estimate_rho",
      "title": "Estimate AR(1) autocorrelation from pre-intervention data",
      "topics": [
        "estimate_rho"
      ]
    },
    {
      "page": "estimate_sigma",
      "title": "Estimate residual standard deviation from pre-intervention data",
      "topics": [
        "estimate_sigma"
      ]
    },
    {
      "page": "estimate_trend",
      "title": "Estimate pre-intervention trend from pre-intervention data",
      "topics": [
        "estimate_trend"
      ]
    },
    {
      "page": "example_cfr_data",
      "title": "Example pre-intervention case fatality rate data",
      "topics": [
        "example_cfr_data"
      ]
    },
    {
      "page": "export_results",
      "title": "Export PITS results to CSV and plain-text summary",
      "topics": [
        "export_results"
      ]
    },
    {
      "page": "fit_its_model",
      "title": "Fit a segmented regression model to an ITS dataset",
      "topics": [
        "fit_its_model"
      ]
    },
    {
      "page": "interpret_power",
      "title": "Interpret a power estimate qualitatively",
      "topics": [
        "interpret_power"
      ]
    },
    {
      "page": "plot_its_example",
      "title": "Plot a simulated ITS example",
      "topics": [
        "plot_its_example"
      ]
    },
    {
      "page": "plot_power_curve",
      "title": "Plot power as a function of post-intervention duration",
      "topics": [
        "plot_power_curve"
      ]
    },
    {
      "page": "plot_power_heatmap",
      "title": "Plot a power heatmap across two parameters",
      "topics": [
        "plot_power_heatmap"
      ]
    },
    {
      "page": "power_sweep",
      "title": "Design optimisation sweep: power across a range of n_post values",
      "topics": [
        "power_sweep"
      ]
    },
    {
      "page": "print.pits_power_result",
      "title": "Print method for PITS power results",
      "topics": [
        "print.pits_power_result"
      ]
    },
    {
      "page": "print.pits_sweep_result",
      "title": "Print method for PITS sweep results",
      "topics": [
        "print.pits_sweep_result"
      ]
    },
    {
      "page": "run_its_power",
      "title": "Full single-site ITS power workflow",
      "topics": [
        "run_its_power"
      ]
    },
    {
      "page": "run_power_grid",
      "title": "Run power calculations across a parameter grid",
      "topics": [
        "run_power_grid"
      ]
    },
    {
      "page": "simulate_its_data",
      "title": "Simulate a single ITS dataset",
      "topics": [
        "simulate_its_data"
      ]
    },
    {
      "page": "simulate_predata",
      "title": "Generate synthetic pre-intervention data",
      "topics": [
        "simulate_predata"
      ]
    },
    {
      "page": "summary.pits_power_result",
      "title": "Summary method for PITS power results",
      "topics": [
        "summary.pits_power_result"
      ]
    },
    {
      "page": "validate_params",
      "title": "Validate ITS parameter values before simulation",
      "topics": [
        "validate_params"
      ]
    }
  ],
  "_readme": "https://github.com/drdaviddelorenzo/pits/raw/HEAD/README.md",
  "_rundeps": [
    "lattice",
    "nlme"
  ],
  "_vignettes": [
    {
      "source": "parameter-estimation.Rmd",
      "filename": "parameter-estimation.html",
      "title": "Estimating ITS parameters from pre-intervention data",
      "author": "PITS package",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "Using individual estimation functions",
        "When to use individual functions",
        "Using the all-in-one wrapper",
        "Custom column names",
        "Diagnostic plots",
        "What if I have no pre-intervention data?",
        "Handling non-standard situations",
        "Date-indexed time column",
        "Missing values",
        "Very short pre-periods",
        "Typical parameter ranges for monthly hospital data",
        "References"
      ],
      "created": "2026-06-18 09:03:19",
      "modified": "2026-06-18 09:03:19",
      "commits": 1
    },
    {
      "source": "cdss-cfr-example.Rmd",
      "filename": "cdss-cfr-example.html",
      "title": "PITS: Power of an ITS — CDSS/CFR worked example",
      "author": "PITS package",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Motivating example",
        "Step 1 — Load pre-intervention data",
        "Step 2 — Estimate nuisance parameters",
        "Step 3 — Specify the clinical hypothesis",
        "Step 4 — Calculate power for a single design",
        "Step 5 — Optimise with a design sweep",
        "Step 6 — Plot a simulated ITS realisation",
        "Step 7 — Sensitivity analysis",
        "Step 8 — Multi-site analysis",
        "Summary table",
        "One-call shortcut",
        "References"
      ],
      "created": "2026-06-18 09:03:19",
      "modified": "2026-06-18 11:24:42",
      "commits": 2
    },
    {
      "source": "its-power-fundamentals.Rmd",
      "filename": "its-power-fundamentals.html",
      "title": "Under the hood: the simulation engine",
      "author": "PITS package",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Purpose",
        "The model",
        "Box 1: the simulation engine",
        "From Box 1 to the package",
        "Where this fits in the paper"
      ],
      "created": "2026-07-01 11:25:49",
      "modified": "2026-07-01 11:25:49",
      "commits": 1
    }
  ],
  "_score": 4.653212513775344,
  "_indexed": true,
  "_nocasepkg": "pits",
  "_universes": [
    "drdaviddelorenzo"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.1",
      "date": "2026-10-31T08:39:36.000Z",
      "distro": "resolute",
      "commit": "a6169a9f63cc8107f4f0438a31ad8b868568863b",
      "fileid": "https://r2.ropensci.org/8553dcb09d9464bc2699da3d8f7570d0f0293be644d06aaccecd091da4a8d43a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/41185087525"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.1.1",
      "date": "2026-10-31T08:39:33.000Z",
      "distro": "resolute",
      "commit": "a6169a9f63cc8107f4f0438a31ad8b868568863b",
      "fileid": "https://r2.ropensci.org/2076edd951352da6e0e2b2709fd7267d006d790f57da0634bb930b537cddc390",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/41185087525"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.1",
      "date": "2026-10-31T09:08:50.000Z",
      "commit": "a6169a9f63cc8107f4f0438a31ad8b868568863b",
      "fileid": "https://r2.ropensci.org/262826c1c5eb000da8227286059aba4ffe27c9eb21474efd22dcfb0f5e94661f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/41185087525"
    },
    {
      "r": "4.6.2",
      "os": "mac",
      "version": "0.1.1",
      "date": "2026-10-31T09:00:48.000Z",
      "commit": "a6169a9f63cc8107f4f0438a31ad8b868568863b",
      "fileid": "https://r2.ropensci.org/25a20e2dfcd88c04de1715034257093f87d683cbdb0f06d82f6dd7c78a581f1f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/41185087525"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.1",
      "date": "2026-10-31T08:39:33.000Z",
      "commit": "a6169a9f63cc8107f4f0438a31ad8b868568863b",
      "fileid": "https://r2.ropensci.org/2ec28e154a4f437c2d0afa8340ae2ed7a345891768230d1075d669c844e98d99",
      "status": "success",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/41185087525"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-10-31T08:38:48.000Z",
      "commit": "a6169a9f63cc8107f4f0438a31ad8b868568863b",
      "fileid": "https://r2.ropensci.org/280522345800c717d1a1a98d8969b5313b0b2038e48c4ab1fddd1c279ff596d0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/41185087525"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-10-31T08:39:06.000Z",
      "commit": "a6169a9f63cc8107f4f0438a31ad8b868568863b",
      "fileid": "https://r2.ropensci.org/dc02d1a6d2a6f55011feb2a7a9696778fb1c4473a5c3dd1b6739e258c124193f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/41185087525"
    },
    {
      "r": "4.6.2",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-10-31T08:38:51.000Z",
      "commit": "a6169a9f63cc8107f4f0438a31ad8b868568863b",
      "fileid": "https://r2.ropensci.org/6fdd5d5b3c5bf86603d6924f3f2d5d4c49dfd8e403cf3334643c6c73ed7dc2b9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/41185087525"
    }
  ]
}