我正在计算贝叶斯方差分析,以调查我的方向变量如何影响FirstSteeringTime。以下是我的数据集的一个示例:
x <- structure(list(FirstSteeringTime = c(0.433389999999999, 0.449999999999989,
0.383199999999988, 0.499899999999997, 0.566800000000001, 0.58329999999998,
0.5, 0.449799999999982, 0.566600000000022, 0.466700000000003,
0.433499999999981, 0.466799999999978, 0.549900000000036, 0.483499999999992,
0.533399999999972, 0.433400000000006, 0.533200000000022, 0.450799999999999,
0.45022, 0.46651, 0.68336, 0.483400000000003, 0.5167, 0.383519999999997,
0.583200000000005, 0.449999999999989, 0.58329999999998, 0.4999,
0.5334, 0.4666, 0.433399999999978, 0.41670000000002, 0.416600000000017,
0.45010000000002, 0.666700000000048, 0.433399999999949, 0.466700000000003,
0.666600000000017, 0.516800000000046, 0.199900000000014, 0.400039999999997,
0.150100000000009, 0.583399999999983, 0.483400000000017, 0.400099999999952,
0.666600000000017, 0.434087937888119, 0.516692671379801, 0.533482992494996,
0.516702632558399), pNum = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 10L, 10L, 10L, 10L), heading = structure(c(4L,
1L, 4L, 3L, 4L, 3L, 4L, 3L, 4L, 1L, 4L, 4L, 4L, 4L, 4L, 3L, 3L,
3L, 4L, 4L, 2L, 3L, 4L, 2L, 1L, 2L, 1L, 3L, 1L, 2L, 4L, 3L, 3L,
4L, 2L, 4L, 4L, 1L, 3L, 4L, 3L, 4L, 3L, 3L, 2L, 3L, 2L, 2L, 2L,
3L), .Label = c("0.5", "1", "1.5", "2"), class = "factor")), row.names = c(NA,
50L), class = "data.frame")首先,我使用贝叶斯方差分析模型:
op <- options(contrasts = c("contr.helmert", "contr.poly"))
fit_aov <- stan_aov(FirstSteeringTime ~ heading, data = x, prior = R2(0.5))我的模型显示我有4个预测因子。这是正确的,因为我对我的标题变量的级别- 0.5,1,1.5和2:
fit_aov
stan_aov
family: gaussian [identity]
formula: FirstSteeringTime ~ heading
observations: 50
predictors: 4
------
Median MAD_SD
(Intercept) 0.5 0.0
heading1 0.0 0.0
heading2 0.0 0.0
heading3 0.0 0.0
Auxiliary parameter(s):
Median MAD_SD
R2 0.1 0.1
log-fit_ratio 0.0 0.1
sigma 0.1 0.0
ANOVA-like table:
Median MAD_SD
Mean Sq heading 0.0 0.0
Sample avg. posterior predictive distribution of y:
Median MAD_SD
mean_PPD 0.5 0.0 然而,当我计算我的实际等价(ROPE)区间并将其与我的HDI进行比较时,我似乎只有三个预测因子显示?
pd <- p_direction(fit_aov)
percentage_in_rope <- rope(fit_aov, ci = 1)
# Visualise the pd
plot(pd)
pd
Parameter pd
(Intercept) 100.00%
heading1 80.35%
heading2 79.47%
heading3 98.78%
log-fit_ratio 60.48%
R2 100.00%

现在我的第一个想法是,一个级别的标题变量可能会有非常小的影响,因此它不足以创建HDI?但我不确定。有谁有什么想法吗?另外,谁能给我解释一下对数拟合比/R2是什么,他们告诉我的是什么信息?
如有任何帮助,我们不胜感激!
发布于 2019-11-06 22:47:53
经过一些思考,也许不同的HDI对应于积累数据和重建我的HDI的顺序性质?也就是说,我从预测器的一个级别开始,然后为每个HDI添加另一个级别。当我添加它们时,我的HDI变得更小,因为我可以对我的效果大小参数的可能值更有信心?只是我的一些想法。
https://stackoverflow.com/questions/58727075
复制相似问题