library(DImodels)
## Load data
data(sim1)
## Fit model
mod1 <- lm(response ~ 0 + (p1 + p2 + p3 + p4)^2, data = sim1)
## Get data for diagnostics plot
diagnostics_data <- model_diagnostics_data(mod1,
prop = c("p1", "p2", "p3", "p4"))
print(head(diagnostics_data))
## The compositional predictors in the data are added as attributes to the data
attr(diagnostics_data, "prop")
Run the code above in your browser using DataLab