Provides tools to fit joinpoint regression models with a log-linear specification by levels of one or two categorical variable(s) using the grid-search method. It includes functions to estimate the Annual Percent Change (APC) and the Average Annual Percent Change (AAPC), along with their 95% confidence intervals, and to generate formatted summary tables and plots of results.

The goal of joinpointR is to fit joinpoint regression models by groups and generate tidy summaries of the Annual Percent Change (APC) and the Average Annual Percent Change (AAPC), facilitating trend analysis in epidemiological studies.
The development version of joinpointR can be installed from Github using the command:
remotes::install_github("https://github.com/datos-ine/joinpointR")
The package provides a simple and reproducible workflow:
model_jp_grid() or model_jp() → Fits joinpoint regression models by groups of up to two categorical variables.get_summary(), get_apc(), and get_aapc() → Returns a table with summary statistics for a model or a list of models of class "model_jp".gg_jpoint() → Generate summary plots for a model or a list of models of class "model_jp".# Load packages
library(joinpointR)
# Load data
data(hiv_data)
data_mod <- hiv_data |>
dplyr::filter(admin == "ARG")
# Fit the joinpoint models
mods <- model_jp_grid(data = data_mod, rate = "hiv_rate", time = "year", group = "sex")
# BIC of the model
bic_jp(mods)
# Summary table
get_summary(mods)
# Plot results
gg_jpoint(mods)
method.flextable objects using the argument as.ft = TRUE.El objetivo de joinpointR es ajustar modelos de regresión joinpoint por grupos y generar resúmenes en formato tidy del Cambio Porcentual Anual (APC) y del Cambio Porcentual Anual Promedio (AAPC), facilitando el análisis de tendencias en estudios epidemiológicos.
La versión en desarrollo de joinpointR se puede descargar desde Github con el comando:
remotes::install_github("https://github.com/datos-ine/joinpointR")
El paquete cuenta con un flujo de trabajo simple y reproducible:
model_jp_grid() y model_jp() → Ajustan modelos de regresión joinpoint según niveles de hasta dos variables categóricas.get_summary(), get_apc(), y get_aapc() → Devuelven una tabla resumen para un modelo o lista de modelos de clase "model_jp".gg_jpoint() → Genera gráficos de resumen para un modelo o lista de modelos de clase "model_jp".# Cargar paquetes
library(joinpointR)
# Cargar datos
data(hiv_data)
data_mod <- hiv_data |>
dplyr::filter(admin == "ARG")
# Ajustar modelos
mods <- model_jp_grid(data = data_mod, rate = "hiv_rate", time = "year", group = "sex")
# BIC
bic_jp(mods)
# Tabla resumen
get_summary(mods)
# Graficar resultados
gg_jpoint(mods)
method.flextable usando el argument as.ft = TRUE.MIT License
Tamara Ricardo
Instituto Nacional de EpidemiologÃa (INE), Argentina