fit_cp_model: Fit Change Point

Description Usage Arguments Examples

View source: R/main_functions.R

Description

Fit Change Point

Usage

1
fit_cp_model(count_data, low, high, model = "lm", plot = TRUE, level = 0.95)

Arguments

count_data

A dataset of visit counts, must contain variables 'days_since_dx' and 'n'. Where 'days_since_dx' is the number of days since diagnosis (negative values before diagnosis) and 'n' are the number of visits

low

the low value in the training window (i.e., the point closest to diagnosis to include in the training window)

high

the high value in the training window (i.e., the point furthest from diagnosis to include in the training window)

model

the model to be used. Current options include "lm", "exp", "lm_period", "exp_period"

Examples

1
2
3
4
fit_cp_model(count_data = visit_counts,
             low = 40,high = 180,
             model = "lm",
             plot = FALSE)

aarmiller/predictBoundCP documentation built on Dec. 31, 2020, 6:38 p.m.