time_varying {rcausim} | R Documentation |
Generate time-varying data
Description
Generate time-varying data
Usage
time_varying(func, data, T_max)
Arguments
func |
Functions, an object class generated by
|
data |
Data, a data frame generated by |
T_max |
Maximum time for every instance, a numeric vector of length equal to the number of rows in 'data' and must be non-negative and non-decimal. |
Value
A data frame which include the simulated data for each vertex as a column for each time up to maximum time for every instance.
Examples
data(functions)
simulated_data <- data_from_function(functions, n = 100)
function_B <- function(B){
B + 1
}
functions <- define(functions, which = "B", what = function_B)
T_max <- rpois(nrow(simulated_data), lambda = 25)
time_varying(functions, data = simulated_data, T_max = T_max)