Description Usage Arguments Examples
View source: R/model_diagnostics.R
Plot model diagnostics for lm or lmer models fit separately for each feature. One page of plots is saved per feature. Uses autoplot function from ggfortify
1 2 |
object |
a MetaboSet object |
formula_char |
character, the formula to be used in the linear model (see Details) |
model_type |
the type of model, either "lm" or "lmer" |
file |
the file where the plots will be saved |
all_features |
should all features be included? |
width, height |
the dimension of the plot |
... |
other parameters passed to lm/lmer and/or autoplot function from the ggfortify package |
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
save_lm_diagnostic_plots(example_set, formula_char = "Feature ~ Group", model_type = "lm", file = "test.pdf")
# Add colouring by time point (don't mind the warnings)
save_lm_diagnostic_plots(example_set, formula_char = "Feature ~ Group",
model_type = "lm", file = "test.pdf", colour = "Group")
# Linear mixed model
save_lm_diagnostic_plots(example_set, formula_char = "Feature ~ Group + (1|Subject_ID)",
model_type = "lmer", file = "test.pdf")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.