View source: R/predict_delta_comps.R
predict_delta_comps | R Documentation |
Provided the data (containing outcome, compositional components and covariates), fit a ilr multiple linear regression model and provide predictions from reallocating compositional values pairwise amunsnst the components model.
predict_delta_comps( dataf, y, comps, covars = NULL, deltas = c(0, 10, 20)/(24 * 60), comparisons = c("prop-realloc", "one-v-one")[1], alpha = 0.05 )
dataf |
A |
y |
Name (as string/character vector of length 1) of outcome variable in |
comps |
Character vector of names of compositions in |
covars |
Optional. Character vector of covariates names (non-comp variables) in |
deltas |
A vector of time-component changes (as proportions of compositions , i.e., values between -1 and 1). Optional.
Changes in compositions to be computed pairwise. Defaults to 0, 10 and 20 minutes as a proportion of the 1440 minutes
in a day (i.e., approximately |
comparisons |
Currently two choices: |
alpha |
Optional. Level of significance. Defaults to 0.05. |
Values in the comps
columns must be strictly greater than zero. These compositional values are NOT assumed to be constrained to (0, 1)
values as the function normalises the compositions row-wise to sum to 1 in part of it's processing of the dataset before analysis.
Please see the deltacomp
package README.md
file for examples and explanation of the comparisons = "prop-realloc"
and comparisons = "one-v-one"
options.
Note from version 0.1.0 to current version, comparisons == "one-v-all"
is depreciated, comparisons == "prop-realloc"
is probably the alternative you are after.
Ty Stanford <tystan@gmail.com>
predict_delta_comps( dataf = fat_data, y = "fat", comps = c("sl", "sb", "lpa", "mvpa"), covars = c("sibs", "parents", "ed"), deltas = seq(-60, 60, by = 5) / (24 * 60), comparisons = "one-v-one", alpha = 0.05 ) predict_delta_comps( dataf = fat_data, y = "fat", comps = c("sl", "sb", "lpa", "mvpa"), covars = NULL, deltas = seq(-60, 60, by = 5) / (24 * 60), comparisons = "one-v-one", alpha = 0.05 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.