Description Usage Arguments Value Examples
This function calculates the biphasic or single phase model given a subject's data and best-fit parameters
1 | get_curve(data, best_param, param_names, whichcurve = get_biphasic)
|
data |
data frame with columns for the subject's identifier ('id') and timing of sampling ('time') |
best_param |
named numeric vector of best fit parameters obtained from fitting the biphasic or single phase model to the subjects data |
param_names |
character vector containing the names of the parameters in 'best_param' |
whichcurve |
character indicating which model function should be used. Use 'get_biphasic' for the biphasic model, or 'get_singlephase' for the single phase model. Defaults to 'get_biphasic'. |
data frame with columns for the sampling times ('time'), fitted viral load predictions ('fit'), and the corresponding subject identifier ('id')
1 2 3 4 5 6 7 8 9 | nobs <- 7
example_param <- c(A = 10000, delta = 0.03, B = 1000, gamma = 0.68)
vldata <- get_biphasic(params = example_param, timevec = seq(5, 100, length.out = nobs))
subjectdata <- data.frame(id = 123, time = seq(5, 100, length.out = nobs),
vl = 10^ (log10(vldata) + rnorm(nobs, 0, 0.2)))
get_curve(data = subjectdata, best_param = example_param, param_names = names(example_param))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.