plot_delta_comp {codaredistlm} | R Documentation |
Plot redistributed time-use predictions from compositional ilr multiple linear regression model fit
Description
Plot redistributed time-use predictions from compositional ilr multiple linear regression model fit by predict_delta_comps()
Usage
plot_delta_comp(dc_obj, comp_total = NULL, units_lab = NULL)
Arguments
dc_obj |
A |
comp_total |
A numeric scalar that is the original units of the composition to make the x-axis the original scale instead of in the range |
units_lab |
Character string of the units of the compositions relating to |
Value
Returns a plot object from the ggplot2
package (that is, class of gg
and ggplot
).
Author(s)
Ty Stanford <tystan@gmail.com>
Examples
data(fairclough)
deltacomp_df <-
predict_delta_comps(
dataf = fairclough,
y = "z_bmi",
comps = c("sleep","sed","lpa","mvpa"),
covars = c("decimal_age","sex"),
deltas = seq(-20, 20, by = 5) / (24 * 60),
comparisons = "prop-realloc",
alpha = 0.05
)
class(deltacomp_df)
plot_delta_comp(
dc_obj = deltacomp_df,
comp_total = 24 * 60,
units_lab = "min"
)
deltacomp_df <-
predict_delta_comps(
dataf = fairclough,
y = "z_bmi",
comps = c("sleep","sed","lpa","mvpa"),
covars = c("decimal_age","sex"),
deltas = seq(-20, 20, by = 5) / (24 * 60),
comparisons = "one-v-one",
alpha = 0.05
)
plot_delta_comp(
dc_obj = deltacomp_df,
comp_total = 24 * 60,
units_lab = "min"
)
[Package codaredistlm version 0.1.0 Index]