{
  "_id": "6a450ae16ff6f235755219e9",
  "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-01 11:25:49 UTC",
  "RemoteUrl": "https://github.com/drdaviddelorenzo/pits",
  "RemoteRef": "HEAD",
  "RemoteSha": "a1cd9bea602730199b3f2f898c09fbbe1e13c2e6",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-07-01 12:37:24 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>",
  "MD5sum": "d5fa77166e6582abb1c5d4e0cc60203d",
  "_user": "drdaviddelorenzo",
  "_type": "src",
  "_file": "PITS_0.1.1.tar.gz",
  "_fileid": "2b6429b264e6a06849c5062888ad13ebe57472c42db891dbe5c0997badd5ca24",
  "_filesize": 625578,
  "_sha256": "2b6429b264e6a06849c5062888ad13ebe57472c42db891dbe5c0997badd5ca24",
  "_created": "2026-07-01T12:37:24.000Z",
  "_published": "2026-07-01T12:41:05.496Z",
  "_distro": "resolute",
  "_jobs": [
    {
      "job": 84534646886,
      "time": 148,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "8010172460"
    },
    {
      "job": 84534646887,
      "time": 187,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8010188783"
    },
    {
      "job": 84534646826,
      "time": 122,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "8010161375"
    },
    {
      "job": 84534646873,
      "time": 100,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8010152492"
    },
    {
      "job": 84533958944,
      "time": 210,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8010111947"
    },
    {
      "job": 84534646854,
      "time": 99,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "8010152428"
    },
    {
      "job": 84534646900,
      "time": 99,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "8010154855"
    },
    {
      "job": 84534646825,
      "time": 102,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "8010153624"
    },
    {
      "job": 84534646818,
      "time": 103,
      "config": "windows-release",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8010154010"
    }
  ],
  "_buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/28517819979",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/drdaviddelorenzo/pits",
  "_commit": {
    "id": "a1cd9bea602730199b3f2f898c09fbbe1e13c2e6",
    "author": "David de Lorenzo <drdaviddelorenzo@gmail.com>",
    "committer": "David de Lorenzo <drdaviddelorenzo@gmail.com>",
    "message": "Add its-power-fundamentals vignette (Box 1 reference implementation)\n\nCompanion \"glass box\" vignette for the ITS power methods manuscript,\nresolving broken references in the manuscript to standalone scripts\nthat don't exist in this repo. Reproduces the Monte Carlo simulation\nengine (AR(1) DGP, segmented-regression GLS fit, detection loop) that\ncalculate_power() wraps, so the method itself can be inspected.\n\nlevel_change was raised from -3 to -5.5 relative to the initial draft\nso the illustrative example lands in the 80-90% power band: with\nn_pre = n_post = 24, the linear time trend is highly collinear with\nthe step indicator (cor = 0.87), which roughly doubles the SE of the\nlevel-change coefficient versus a naive comparison, so -3 only reached\n~40-44% power. This numeric change needs to be mirrored in Box 1 of\nthe manuscript draft.\n\nBumps version 0.1.0 -> 0.1.1 (documentation-only change; no exported\nfunction behaviour changed). R CMD check --as-cran: 0 errors, 0\nwarnings, 3 NOTEs (all pre-existing/environmental).\n",
    "time": 1782905149
  },
  "_maintainer": {
    "name": "David de Lorenzo",
    "email": "drdaviddelorenzo@gmail.com",
    "login": "drdaviddelorenzo",
    "linkedin": "in/drdaviddelorenzo",
    "orcid": "0000-0003-2042-0961",
    "description": "Passionate about unlocking the secrets of data for better health",
    "uuid": 2121511
  },
  "_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": 2
    }
  ],
  "_tags": [
    {
      "name": "v0.1.0",
      "date": "2026-06-23"
    }
  ],
  "_stars": 1,
  "_contributors": [
    {
      "user": "drdaviddelorenzo",
      "count": 12,
      "uuid": 2121511
    }
  ],
  "_userbio": {
    "uuid": 2121511,
    "type": "user",
    "name": "David de Lorenzo",
    "followers": 18,
    "description": "Passionate about unlocking the secrets of data for better health"
  },
  "_downloads": {
    "count": 0,
    "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/NEWS.html",
    "extra/NEWS.txt",
    "extra/PITS.html",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE",
    "manual.pdf"
  ],
  "_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"
  ],
  "_previous": "0.1.0",
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.1",
      "date": "2026-07-01T12:39:32.000Z",
      "distro": "resolute",
      "commit": "a1cd9bea602730199b3f2f898c09fbbe1e13c2e6",
      "fileid": "0774a8a0ea3b25ed14f687f41f1afe65e6c39d31c9684d06718ea81725895abd",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/28517819979"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.1.1",
      "date": "2026-07-01T12:40:11.000Z",
      "distro": "resolute",
      "commit": "a1cd9bea602730199b3f2f898c09fbbe1e13c2e6",
      "fileid": "ce19c79d7009e0a762e11cca9a3f8c7ce58c02692b6ec7b2c66bca7d3e61164a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/28517819979"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.1",
      "date": "2026-07-01T12:39:17.000Z",
      "commit": "a1cd9bea602730199b3f2f898c09fbbe1e13c2e6",
      "fileid": "27622da2c9c2a14fa9f324368cb4aef3d1e917f49aafb492a3f8f7d985cf0a0a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/28517819979"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.1.1",
      "date": "2026-07-01T12:38:56.000Z",
      "commit": "a1cd9bea602730199b3f2f898c09fbbe1e13c2e6",
      "fileid": "21764fcb2596284970d9fa34d058a386fe9b26796cab5c1f92af02f2db5073f8",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/28517819979"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.1",
      "date": "2026-07-01T12:39:21.000Z",
      "commit": "a1cd9bea602730199b3f2f898c09fbbe1e13c2e6",
      "fileid": "5e0c67769c85ccd73fe6bba26f29e04a04079495fab56f621f88cecc38f012c6",
      "status": "success",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/28517819979"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-07-01T12:38:43.000Z",
      "commit": "a1cd9bea602730199b3f2f898c09fbbe1e13c2e6",
      "fileid": "5c1baee8c325dded63822698517bb89760c1fef375825dad83147da23f41afc2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/28517819979"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-07-01T12:38:34.000Z",
      "commit": "a1cd9bea602730199b3f2f898c09fbbe1e13c2e6",
      "fileid": "2af0e6e6b86aa9369d71d2a47dc0a3435bdd2ad706e6d2cc021efb6e603bd001",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/28517819979"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.1.1",
      "date": "2026-07-01T12:38:39.000Z",
      "commit": "a1cd9bea602730199b3f2f898c09fbbe1e13c2e6",
      "fileid": "f6be371ca75b44adfeade17596ef0f7edaa256eaa5e52f021686df46468895ed",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/drdaviddelorenzo/actions/runs/28517819979"
    }
  ]
}