ObsvsPred | R Documentation |
ObsvsPred
allows the user to have a straight forward idea about how the model is fitting the data, providing
plots of the predicted regression lines versus the actual data points.
ObsvsPred(model, nrow = 4, ncol = 5, ...)
model |
An object of class "lme" representing the linear mixed-effects model fitted by |
nrow |
Number of rows of the layout to organize the observed vs predicted plots. |
ncol |
Number of columns of the layout to organize the observed vs predicted plots. |
... |
Additional arguments to be passed to |
The function provides visual and quantitative information about the performance of the model:
A layout of the observed and predicted values of log
(relative tumor volume) vs Time for each SampleID (i.e. subject),
with the actual measurements, the regression line for each SampleID, and the marginal, treatment-specific,
regression line for each treatment group.
Performance metrics of the model obtain calculated using performance::model_performance()
. The maximum likelihood-based Akaike's Information Criterion (AIC),
small sample AIC (AICc), and Bayesian Information Criterion, and the Nakagawa's r-squared
root mean squared error (RMSE) of the residuals, and the standard deviation of the residuals (sigma) are provided.
Performance metrics of the model obtain calculated using performance::model_performance()
and a layout of plots of the observed vs predicted values for each SampleID.
Andrzej Galecki & Tomasz Burzykowski (2013) Linear Mixed-Effects Models Using R: A Step-by-Step Approach First Edition. Springer, New York. ISBN 978-1-4614-3899-1
Lüdecke et al., (2021). performance: An R Package for Assessment, Comparison and Testing of Statistical Models. Journal of Open Source Software, 6(60), 3139. https://doi.org/10.21105/joss.03139
Sakamoto, Y., M. Ishiguro, and G. Kitagawa. 1984. Akaike Information Criterion Statistics. Mathematics and Its Applications. Reidel.
Nakagawa, Shinichi, and Holger Schielzeth. 2013. A General and Simple Method for Obtaining r2 from Generalized Linear Mixed-effects Models. Methods in Ecology and Evolution 4 (February): 133–42. https://doi.org/10.1111/j.2041-210x.2012.00261.x.
Johnson, Paul C. D. 2014. Extension of Nakagawa & Schielzeth’s r 2 GLMM to Random Slopes Models. Methods in Ecology and Evolution 5 (September): 944–46. https://doi.org/10.1111/2041-210X.12225.
Nakagawa, Shinichi, Paul C. D. Johnson, and Holger Schielzeth. 2017. The Coefficient of Determination r2 and Intra-Class Correlation Coefficient from Generalized Linear Mixed-Effects Models Revisited and Expanded. Journal of The Royal Society Interface 14 (September): 20170213. https://doi.org/10.1098/rsif.2017.0213.
# Load the example data
data(grwth_data)
# Fit the model
lmm <- lmmModel(
data = grwth_data,
sample_id = "subject",
time = "Time",
treatment = "Treatment",
tumor_vol = "TumorVolume",
trt_control = "Control",
drug_a = "DrugA",
drug_b = "DrugB",
combination = "Combination"
)
# Obtain Observed vs Predicted plots, and model performance metrics
ObsvsPred(model = lmm, nrow = 4, ncol = 8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.