interpolate_time_to_threshold: Interpolate the first time at which a group's fitted curve...

Description Usage Arguments Value Author(s) References Examples

View source: R/interpolate_time_to_threshold.R

Description

Interpolate the first time at which a group's fitted curve increases by a given threshold over its baseline.

Usage

1
2
3
4
5
6
7
8
9
interpolate_time_to_threshold(
  YY,
  metric,
  full_inverse_function,
  threshold = 2,
  grid_n = 1000,
  auto_round = TRUE,
  round_to = 1
)

Arguments

YY

a one-group subset of the 'clean_DF_pred' data frame returned from maeve::fit_longitudinal_models().

metric

character vector specifying what metric(s) to use in longitudinal modeling.

full_inverse_function

R function inverting the data transformation, taking the fitted values from YY back to the original units.

threshold

numeric fold-change (in the original units, after "full_inverse_function()") from baseline that is desired to detect.

grid_n

numeric number of points in the grid for interpolation.

auto_round

logical: whether to automatically round the interpolated time to precision specified by "round_to"

round_to

numeric number of digits to which we should round the interpolated progression time.

Value

A numeric progression time.

Author(s)

Bill Forrest <forrest@gene.com>

Bill Forrest forrest@gene.com

References

www.r-project.org

Examples

1
 cat('No working example for unexported function interpolate_time_to_threshold().')

wfforrest/maeve documentation built on Jan. 1, 2021, 12:47 p.m.