prob_of_instant_dropout: Compute probability of dropout just after a time point based...

Description Usage Arguments Value Author(s) References Examples

View source: R/prob_of_instant_dropout.R

Description

Takes an input value 'y' which is an endpoint at a given time. Returns a probability interpolated based on a spline interpolating paired y_vector_i = endpoint_i, dropout_hazard_map_i = dropout_probability_i pairs.

Usage

1
2
3
4
5
6
7
8
prob_of_instant_dropout(
  x_vector,
  y_vector,
  dropout_hazard_map = data.frame(y = seq(0, 2000, by = 200), drop_haz = c(rep(0.025,
    3), seq(0.1, 0.3, length = 7), log(2))),
  MIN_endpoint = min(dropout_hazard_map[, 1]),
  MAX_endpoint = max(dropout_hazard_map[, 1])
)

Arguments

x_vector

numeric vector of time points at which endpoint values are observed.

y_vector

numeric vector of endpoint values.

dropout_hazard_map

data.frame with the first column a set of endpoint values spanning the relevant range of endpoints, the second column dropout probabilities corresponding to the endpoint values.

MIN_endpoint

numeric lowest value of endpoint to be evaluated.

MAX_endpoint

numeric highest value of endpoint to be evaluated.

Value

a numeric vector the same length as y_vector.

Author(s)

Bill Forrest <forrest@gene.com>

Bill Forrest forrest@gene.com

References

www.r-project.org

Examples

1
2
3
4
5
6
7
cat('no current example for unexported function prob_of_instant_dropout.')
## Not run: 
prob <- prob_of_instant_dropout( c( 1:5, 10, 12, 20 ), c( rep(100,5), 2001, 1500, 800 ) )



## End(Not run)

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