gdrate(input, pval, plots)
pval
), the model which minimizes the AIC is the selected model for a given patient from which tumor growth rates are obtained (this output is contained in results
). The port algorithm is attempted where the gdphi model does not converge.
Patients with insufficient or missing data, or patients with sufficient data where no model converged are excluded and noted individually in results
and summarized in models
with one of the following explanations: no data (cases with all missing data), only 1 or 2 data points (where the latter has less than 20 percent difference in tumor measurements), error data (where only one unique measurement value for a patient that is repeated 3 or more times, and/or where both the initial and final measurement value is zero), or not fit. Patient data that does not fall into one of the categories listed above are labeled as included. Plots can be generated for all included cases (cases fit by models) by setting the plot argument to TRUE, where the observed and predicted values from the selected model (labeled in plot legend) are depicted.# example data
data(sampleData)
# generate plots and results
par(mfrow=c(3, 2))
out <- gdrate(sampleData, 0.05, TRUE)
par(mfrow=c(1, 1))
# summary of cases
out$models
# descriptive statistics
out$sumstats
# plot g and d distributions
res <- out$results
par(mfrow=c(2,1))
hist(res$g, col='blue', main=paste('Median g=', round(median(na.omit(res$g)), digits=6)), xlab="g")
hist(res$d, col='blue', main=paste('Median d=', round(median(na.omit(res$d)), digits=6)), xlab="d")
par(mfrow=c(1,1))
Run the code above in your browser using DataLab