除了老化增加和先验之外,我如何帮助我的多个变化点R 中的 mcp 包模型收敛?

问题描述

我想确定我的数据中的变化点及其估计的相关误差项。 mcp 包似乎在识别我的数据中的变化点方面做得很好(在视觉上),但模型参数通常具有 >1.1 的 rhat 值。根据我的理解,我不能相信任何贝叶斯参数估计,除非模型中的所有 rhat 值 =

或者,我是否可以强制 mcp 拟合“最佳”二段和三段模型并返回那些有错误的参数估计值?理想情况下,我将能够提供带有与每个估计相关联的误差项的变更点估计,但诸如 segmented 和 struccchange 之类的包通常无法识别我的数据中的变更点。

代码如下:

http://localhost:49347/odata/v4/MeetingInfoes('id')?$expand=TimeMarkers

这些是我尝试过的模型,但没有一个模型能够达到一致的可容忍值。我用来测试它们的代码如下:

set.seed(42)

x <- c(227,227,228,230,232,233,236,237,238,239,243,244,245,246,247,250,251,253,257,260,264,265,267,271,273,274,274)

y <- c(8.43,6.9,8.93,7.33,7.28,7.24,6.62,8.36,8.17,8.07,7.63,7.6,7.54,7.37,7.31,7.21,7.03,6.93,6.88,6.82,6.78,6.7,6.5,8.35,10.97,7.48,7.46,7.17,6.72,6.68,6.08,7.42,7.14,6.92,7.49,6.67,9.4,7.04,6.89,6.52,6.45,6.39,8.48,8.04,7.52,7.35,6.57,6.86,7.39,7.16,7.08,6.83,6.54,6.47,9.75,7.38,5.96,10.49,8.32,7.22,7.05,8.55,10.34,8.23,7.9,8.18,7.8,7.18,7.13,7.02,6.84,10.62,10.09,9.26,10.8,10.37,10.9,10.52,10.23,9.28,9.18,8.85,8.81,11.03,8.84,6.29,11.36,10.91,10.87,10.4,10.17,9.61,9.5,9.36,9.17,9.13,8.88,8.73,8.37,8.33,8.25,7.82,9.77,9.53,9.39,9.1,8.68,8.64,8.47,8.41,8.38,8.28,7.74,10.67,10.64,10.54,10.36,10.35,9.51,9.37,9.24,9.22,8.96,8.95,8.94,8.89,8.82,8.79,8.72,8.22,8.13,7.91,7.85,7.79,8.59,8.44,8.42,8.06,7.34)

df <- data.frame(x,y)

#Writing the formula for a three-segment line
three_segment_model = list(
  y ~ x,# intercept + slope
  y ~ 1 ~ 0 + x,#segment 2,specifying a changepoint and joined slope
  y ~ 1 ~ 0 + x #segment 3,specifying a changepoint and joined slope
)

#Writing the formula for a two-segment line
two_segment_model = list(
  y ~ x,# intercept + slope
  y ~ 1 ~ 0 + x #segment 2,specifying a changepoint and joined slope
)

#disjointing the slopes of two segments
test_segment_model = list(
  y ~ x,# intercept + slope
  y ~ 1 ~ 1 + x #segment 2,specifying a changepoint and disjoined slope
)

#disjointing the slopes of the three expected segments
test_three_segment_model = list(
  y ~ x,# intercept + slope
  y ~ 1 ~ 1 + x,specifying a changepoint and disjoined slope
  y ~ 1 ~ 1 + x #segment 3,specifying a changepoint and disjoined slope
)

鉴于文献,我还尝试了先验(尽管我不能用 mcp 对截断和分布代码进行正面或反面),这似乎并未反映这种建模方法难以识别的模式。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)