我正在尝试使用此代码模拟预测(而不是采用均值):
<android.support...Toolbar
android:layout_width=".."
android:layout_height=".."
..
...>
<Button
android:layout_width=".."
android:layout_height=".."
...
...
/>
</android....Toolbar>
我在模拟列中得到相同的值。
但是,如果我在set.seed(100)
df <- data.frame("lower" = c(-1, 0.5, 0), "upper" = c(0, 2, 4), "mean" = c(-0.5, 1.2, 2.5))
df$simulation <- rnorm(1, df$mean, (df$upper - df$lower) / 2 / 1.96)
df
# lower upper mean simulation
#1 -1.0 0 -0.5 -0.6281103
#2 0.5 2 1.2 -0.6281103
#3 0.0 4 2.5 -0.6281103
参数中提供向量,我会得到看起来更好的结果:
n
后面的解决方案是否是正确的方法?