如何获得MPLU';s";“概率量表中的结果”;通过R MplusAutomation包输出?

如何获得MPLU';s";“概率量表中的结果”;通过R MplusAutomation包输出?,r,R,我正在使用Mplus执行一个潜在类分析,并试图通过MplusAutomation包将输出输入到R中(因为我多次这样做,我希望避免手动复制)。我想在Mplus输出的“Model Results”部分获取“Results in Probability Scale”小节,但在MplusAutomation从.out文件创建的R对象中找不到它。该对象包含一个“参数”数据框,其中包括“模型结果”部分的其他信息,因此“概率尺度中的结果”是其他模型结果数据的简单转换,我可以在R中自己做吗?如果没有,是否有其他

我正在使用Mplus执行一个潜在类分析,并试图通过MplusAutomation包将输出输入到R中(因为我多次这样做,我希望避免手动复制)。我想在Mplus输出的“Model Results”部分获取“Results in Probability Scale”小节,但在MplusAutomation从.out文件创建的R对象中找不到它。该对象包含一个“参数”数据框,其中包括“模型结果”部分的其他信息,因此“概率尺度中的结果”是其他模型结果数据的简单转换,我可以在R中自己做吗?如果没有,是否有其他方法根据我在R中的信息重新创建本节的结果?或者我要查找的信息是否存储在输出中的其他位置?

MplusAutomation似乎没有解析“结果在概率尺度”部分

但是,您可以使用公式
prob=1/(1+exp(est))
将阈值参数自己转换为概率标度

例如,以下代码应以概率标度的形式再现以下结果:

library(dplyr)
library(tidyr)
library(MplusAutomation)

# Fetch & write output from UCLA LCA-example to temp file
lca_ex_out = tempfile(fileext = '.out')
fileConn <- file(lca_ex_out)
writeLines(readLines('https://stats.idre.ucla.edu/stat/mplus/dae/lca1.out'), fileConn)
close(fileConn)
lca_ex_result = readModels(lca_ex_out) # extract results from temp file

# select threshold parameters, covert to probability & layout in table
lca_ex_result$parameters$unstandardized %>%
  filter(paramHeader == 'Thresholds') %>%
  mutate(est_probscale = 1 / (1 + exp(est))) %>%
  select(param, LatentClass, est_probscale) %>%
  spread(LatentClass, est_probscale)
    param     1     2     3
1 ITEM1$1 0.908 0.312 0.923
2 ITEM2$1 0.337 0.164 0.546
3 ITEM3$1 0.067 0.036 0.426
4 ITEM4$1 0.065 0.056 0.418
5 ITEM5$1 0.219 0.044 0.765
6 ITEM6$1 0.320 0.183 0.471
7 ITEM7$1 0.113 0.098 0.512
8 ITEM8$1 0.140 0.110 0.619
9 ITEM9$1 0.325 0.188 0.349