get_summary: Get summary metrics for one or more simulations

Description Usage Arguments Details Value Examples

View source: R/datacollation.R

Description

Get summary metrics for one or more simulations

Usage

1
get_summary(data, start_size_range, gap_range, final_size, num_parameters)

Arguments

data

dataframe

start_size_range

vector of NumCells at time of initial measurement for forecasting

gap_range

vector of projection periods (gap between time of initial measurement and second measurement)

final_size

waiting time is measured until tumour reaches this NumCells value

num_parameters

number of parameters, accounting for the first set of columns in the dataframe

Details

The special value start_size = -2 means we should use the measurement recorded just before treatment; start_size = -1 means we should use the measurement recorded just after treatment

Value

a dataframe with one row for each unique combination of parameter values (including seed), "gap" and "start_size", (i.e. it summarises over time) and which has added columns "start_time" (generations until NumCells reached start_size), "end_time" (generations until NumCells reached end_size), "waiting_time" (difference between start_time and end_time), and "outcome" (NumCells after "gap")

Examples

1
2
3
4
num_parameters = count_parameters(system.file("extdata", "", 
package = "demonanalysis", mustWork = TRUE))
comb_df <- combine_dfs(system.file("extdata", "", package = "demonanalysis", mustWork = TRUE))
get_summary(comb_df, c(100, 300), c(10, 20), 1000, num_parameters)

robjohnnoble/demonanalysis documentation built on June 30, 2020, 12:47 a.m.