r - LPA - 基于 BIC 的模型选择,具有函数prior=priorControl()
问题描述
我正在尝试为潜在配置文件分析拟合模型(包:tidyLPA 和 mclust)。对于模型 VVI(方差 = 相等,协方差 = 零),当 n_profiles > 5 时,BIC 会得到很多“NA”。我发现函数“prior = priorControl()”可以解决这个问题,而且 - 确实 - 确实如此!但是现在当 n_profiles > 5 时,我的 BIC 得到了巨大的提升,这表明模型拟合更好。
有人猜到这里发生了什么吗?或者有没有人建议如何处理?任何想法表示赞赏。我希望下面的代码和附加的图表可以说明这个问题。
非常感谢!!
###not run
library(mclust)
library(tidyLPA)
library(dplyr)
# cluster_1 is an imputed subset of 9 variables
cluster_1 <- subset %>%
single_imputation() %>%
mutate_all(list(scale))
# mclustBIC without priorControl
set.seed(0408)
BIC_m12a <- mclustBIC(cluster_1, modelNames = c("EEI", "VVI"))
BIC1_m12a
Bayesian Information Criterion (BIC):
EEI VVI
1 -127005.8 -127005.8
2 -122298.6 -121027.1
3 -120579.4 -119558.0
4 -119883.4 -118765.7
5 -119244.2 -118293.6
6 -119064.4 NA
7 -118771.5 NA
8 -118681.0 NA
9 -118440.2 NA
# mclustBIC with priorControl
set.seed(0408)
BIC_m12b <- mclustBIC(cluster_1, modelNames = c("EEI", "VVI"), prior=priorControl())
BIC_m12b
Bayesian Information Criterion (BIC):
EEI VVI
1 -127006.0 -127006.0
2 -122299.5 -121028.2
3 -120587.9 -119560.0
4 -119884.4 -118771.7
5 -119235.4 -118296.9
6 -118933.9 -112761.8
7 -118776.2 -112579.7
8 -118586.2 -112353.3
9 -118472.0 -112460.2
解决方案
推荐阅读
- kotlin - Bean属性不可写。kotlin中的无效setter方法
- wordpress - 如何解决“JWT 配置不正确”的问题?
- css - 无法在本机反应中显示获取数据
- huggingface-transformers - Huggingface 的 `beam_search()` 和 `group_beam_search()` 有什么区别
- python - python高阶函数:我如何逐步阅读代码?
- gitlab - GitLab 服务的启动顺序是什么?
- angular - CDK 拖放延迟
- python - 我收到错误“张量()缺少 1 个必需的位置参数:'数据'”
- postgresql - 在更多条件下拆分字符串
- sql - 从包含特定 COLLID 且不包含另一个特定 COLLID 的 PACKLIST 中选择 PLANNAME?