model_growth: Create synthetic GRD data

View source: R/model_sensitivity.R

model_growthR Documentation

Create synthetic GRD data

Description

Create synthetic GRD data

Usage

model_growth(cell_tz, t, t_onset, k, maxeff, halfeff, conc, hill)

Arguments

cell_tz

parameter

t

parameter

t_onset

parameter

k

parameter

maxeff

parameter

halfeff

parameter

conc

parameter

hill

parameter

Value

model of growth curve with GRD

Examples

#define params
k = 0.3
t_ttm <- 1
nreps <- 5
time <- seq(0,3,0.1)
conc <- matrix(base::rep(c(0,seq(0.5,8,length.out = 6)),  each = nreps), dimnames = list(NULL, "concentration"))

params <- matrix(data = c(runif(nreps, min = 2, max = 2), seq(1,1.8,length.out = 5)), dimnames = list(NULL, c("halfeff", "t_onset")), nrow = nreps, ncol = 2)
params <- cbind(do.call("rbind", rep(list(params), 7)), conc)
params <- do.call(rbind, replicate(length(time), params, simplify=FALSE)) #replicate matrix to acommodate time
params <- cbind(params, time = rep(time, times = nreps))
#generate simulated data
sapply(1:dim(params)[1], function(x)
  model_growth(cell_tz = 5, t = params[x,'time'], t_onset = params[x,"t_onset"], k =  k, maxeff = 1.0, halfeff = params[x,"halfeff"], conc = params[x,"concentration"], hill = 1.6)
  ) -> sample_data

mauromiguelm/tdsR documentation built on Oct. 24, 2022, 6:42 p.m.