Hello, teacher. Thank you very much for creating such a useful R package. However, may I ask you a question?
I will enter the following code:
#pred_df <- predict_delta_comps(
- dataf = data,
- y = "outcome",
- comps = c( "Sleep_mean", "step_mean","stand_mean","sit_mean"),
- covars = c("sex"),
- deltas = seq(-60, 60, by = 10) / (data$total_time),
- comparisons = "one-v-one",
- alpha = 0.05
- )
the outcome as follows:
These are the quartiles of the summed compositions:
|
x |
| 0% |
1440 |
| 25% |
1440 |
| 50% |
1440 |
| 75% |
1440 |
| 100% |
1440 |
- The 'average' case to be used for prediction of covariate sex is
Female (factor)
The ilr transformation used is:
ilr1 = sqrt(3/4) * ln(Sleep_mean / (step_mean * stand_mean * sit_mean)^(1/3))
ilr2 = sqrt(2/3) * ln(step_mean / (stand_mean * sit_mean)^(1/2))
ilr3 = sqrt(1/2) * ln(stand_mean / sit_mean)
(note ln is log base e/the natural logarithm)
Summary of the linear model:
| term |
estimate |
std.error |
statistic |
p.value |
| (Intercept) |
1.0126227 |
0.0535502 |
18.909780 |
0.0000000 |
| ilr1 |
-0.5262000 |
0.0848153 |
-6.204071 |
0.0000000 |
| ilr2 |
0.4801061 |
0.0527061 |
9.109118 |
0.0000000 |
| ilr3 |
-0.0570783 |
0.0451629 |
-1.263830 |
0.2065872 |
| sexMale |
-0.4874593 |
0.0326244 |
-14.941554 |
0.0000000 |
The geometric mean composition, 'average' covariates, the ilr coords of the mean composition, and the predicted outcome value (fit) with 95% confidence interval are:
| ilr1 |
ilr2 |
ilr3 |
Sleep_mean |
step_mean |
stand_mean |
sit_mean |
sex |
fit |
lwr |
upr |
| 0.7749123 |
-1.292406 |
-0.7329822 |
0.3679263 |
0.0523444 |
0.1517777 |
0.4279516 |
Female |
0.0262091 |
-0.014944 |
0.0673622 |
I have four compositional variables; why was only one set of ilr coordinates constructed? this is my problem
thank you very much!
Hello, teacher. Thank you very much for creating such a useful R package. However, may I ask you a question?
I will enter the following code:
#pred_df <- predict_delta_comps(
the outcome as follows:
These are the quartiles of the summed compositions:
Female (factor)
The ilr transformation used is:
ilr1 = sqrt(3/4) * ln(Sleep_mean / (step_mean * stand_mean * sit_mean)^(1/3))
ilr2 = sqrt(2/3) * ln(step_mean / (stand_mean * sit_mean)^(1/2))
ilr3 = sqrt(1/2) * ln(stand_mean / sit_mean)
(note
lnis log base e/the natural logarithm)Summary of the linear model:
The geometric mean composition, 'average' covariates, the ilr coords of the mean composition, and the predicted outcome value (
fit) with 95% confidence interval are:I have four compositional variables; why was only one set of ilr coordinates constructed? this is my problem
thank you very much!