joinpoint: API to run a joinpoint model

View source: R/joinpoint.R

joinpointR Documentation

API to run a joinpoint model

Description

Use the Command-Line version of "Joinpoint Regression Software" provided by the NIH to run a regression. The software must be downloaded at https://surveillance.cancer.gov/joinpoint/callable/ and installed on a Windows computer. I am not aware of a version of this software for Linux or MacOS.

Usage

joinpoint(
  data,
  x,
  y,
  by = NULL,
  se = NULL,
  export_opts = export_options(),
  run_opts = run_options(),
  cmd_path = getOption("joinpoint_path",
    "C:/Program Files (x86)/Joinpoint Command/jpCommand.exe"),
  dir = get_tempdir(),
  verbose = FALSE
)

Arguments

data

A data frame

x

⁠<tidy-select>⁠ the independent variable (for instance the year)

y

⁠<tidy-select>⁠ the dependent variable

by

⁠<tidy-select>⁠ one or several stratification variable (for instance sex)

se

⁠<tidy-select>⁠ the standard error of the dependent variable. Can be left as NULL at the cost of a longer computation. See https://seer.cancer.gov/seerstat/WebHelp/Rate_Algorithms.htm for calculation formulas.

export_opts

the result of export_options()

run_opts

the result of run_options()

cmd_path

the path to the executable. Can usually be left default to "C:/Program Files (x86)/Joinpoint Command/jpCommand.exe". Can also be set through options(joinpoint_path="my/path/to/jp.exe").

dir

The temporary directory where all the temporary files will be written

verbose

Logical indicating whether or not to print out progress

Details

This function will generate the .ini files, run the software, and then parse the result files as an plain old R list.

Value

the list of the output tables


DanChaltiel/nih.joinpoint documentation built on Sept. 9, 2024, 4:23 a.m.