brms パッケージで ranef() を使用してランダム効果の結果を管理しています。
bmodel<- brm(pop ~ RDB2000pop + Temperature2003 + Population2003 +
(1+RDB2000pop+Temperature2003+Population2003 |species_id),
data = dfpop_chenv,
family = cumulative(link = "logit", threshold = "flexible"),
prior = c(set_prior("normal(0,10)", class = "b")),
warmup = 1000,
iter = 10000,
chains = 4,
save_all_pars = TRUE)
ranef(bmodel)[[1]]
「Population2003」の結果を抽出したいと思います。
ranef(bmodel)$Population2003
NULL
モデル内の特定の変数の結果を抽出するにはどうすればよいですか?