---恢复内容开始---

1、提取总结表格

showSummaryTable(summaryStats, keepCols=c("Title", "LL", "AIC", "BIC", "CFI"), sortBy="AIC")showSummaryTable(summaryStats, dropCols=c("InputInstructions", "Observations", "Parameters"), sortBy="CFI")

2、提取单独参数估计结果

standardizedResults <- modelResults[["stdyx.standardized"]]
unstandardizedResults <- modelResults$unstandardized

3、提取一组参数估计结果

allModelParameters <- extractModelParameters("C:/Data_Analysis/ComparingLCAvCFA", recursive=TRUE)
The names of the returned list elements would be based on the directory and file names of each file (note that spaces, slashes, and the minus sign have been replaced by periods to be compatible with R naming conventions):
> names(allModelParameters)
ComparingLCAvCFA.LCA.1.class.LCA.outComparingLCAvCFA.LCA.2.class.LCA.outComparingLCAvCFA.LCA.3.class.LCA.out ComparingLCAvCFA.CFA.1.factor.CFA.out ComparingLCAvCFA.CFA.2.factor.CFA.outComparingLCAvCFA.CFA.3.factor.CFA.out
So, to extract the STDYX standardized results for the 2-factor CFA, one would access that data.frame as follows:
TwoFacCFA.STDYX <- allModelParameters$ComparingLCAvCFA.CFA.2.factor.CFA.out$stdyx.standardized

4、 Comparing summaries and parameters across models

 parallelModels <- readModels("10_14_Harsh_SelfCon_Impul")
> compareModels(parallelModels[["backport.from.grand.model.out"]],    parallelModels[["backport.from.grand.model.slopesonw1.out"]],    show=c("diff", "pdiff", "summaries", "unique"), equalityMargin=c(param=.05, pvalue=.02),    sort="type", diffTest=TRUE, showNS=FALSE)

5、 Creating a group of models from an Mplus template file (createModels)从模板文件创造一组模型

The createModels function converts a single Mplus template file into a set of related Mplus input files。

Mplus template syntax files are divided into two sections: the init section and the body section.

 A Complete Example
Here, we provide a complex complete example of a template file that generates 480 input files in numerous subfolders. This is probably overkill for most applications, but it gives a sense of what the language is capable of. The application here is growth mixture modeling for symptoms of DSM-IV personality disorders over time. There are 10 personality disorders and two groups of participants: high risk and low risk. In addition, one question of interest is whether a class constrained to 0 at the first measurement occasion with 0 growth captures a subgroup of participants. In addition, one might be interested in comparing whether these count data are better modeled by a continuous normal model versus a Poisson model, and whether Poisson GMM provides a better fit than Poission latent class growth analysis (LCGA). All of these considerations are reflected in this single template file. As a sane default, we chose to generate models that vary between 1 and 4 latent trajectory classes.
[[init]] iterators = outcome group model classes zeroclass; outcome = 1:10; group = 2 5; model = 1:3; classes = 1:4; zeroclass = 1:2;
outcomenames#outcome = Paranoid Schizoid Schizotypal Antisocial Borderline Histrionic Narcissistic Avoidant Dependent OCPD;
groupnames#group = "Low Risk" "High Risk";
modelnames#model = "Normal LGCM" "Poisson GMM" "Poisson LCGA";
zeroclassnames#zeroclass = "" " with zero class";
#wave names are with respect to the outcome iterator w1name#outcome = Paran1 Szoid1 Sztyp1 Anti1 Border1 Hist1 Narc1 Avoid1 Depend1 OCPD1; w2name#outcome = Paran2 Szoid2 Sztyp2 Anti2 Border2 Hist2 Narc2 Avoid2 Depend2 OCPD2; w3name#outcome = Paran3 Szoid3 Sztyp3 Anti3 Border3 Hist3 Narc3 Avoid3 Depend3 OCPD3;
filename = "[[classes]]-class [[groupnames#group]] [[outcomenames#outcome]] [[modelnames#model]][[zeroclassnames#zeroclass]].inp"; outputDirectory = "PD GMM/[[outcomenames#outcome]]/[[groupnames#group]]/Unconditional_Models/[[modelnames#model]]"; [[/init]]
TITLE: [[classes]]-class [[outcomenames#outcome]] [[groupnames#group]] [[modelnames#model]] Unconditional Model[[zeroclassnames#zeroclass]] DATA: FILE = "personality_mplus.dat"; VARIABLE: NAMES ARE id group sex age Paran1 Szoid1 Sztyp1 Anti1 Border1 Hist1 Narc1 Avoid1 Depend1
OCPD1 PaAg1 Sadist1 SelfDef1 Paran2 Szoid2 Sztyp2 Anti2 Border2 Hist2 Narc2 Avoid2 Depend2 OCPD2 Paran3 Szoid3 Sztyp3 Anti3 Border3 Hist3 Narc3 Avoid3 Depend3 OCPD3;
MISSING ARE .; USEVARIABLES ARE [[w1name#outcome]] [[w2name#outcome]] [[w3name#outcome]]; USEOBSERVATIONS ARE group EQ [[group]]; ![[groupnames#group]] Only
[[model > 1]] COUNT ARE [[w1name#outcome]] [[w2name#outcome]] [[w3name#outcome]]; [[/model > 1]] CLASSES = c ([[classes]]);
ANALYSIS: TYPE = MIXTURE; STARTS = 1000 10; K-1STARTS = 750 6; PROCESSORS = 4; [[model = 2]] ALGORITHM = INTEGRATION; [[/model = 2]] MODEL:
%OVERALL% Int Slope | [[w1name#outcome]]@0 [[w2name#outcome]]@0.97 [[w3name#outcome]]@2.77;
[[classes > 1]] [[zeroclass = 2]] !creates a class with all zeros at all time points [[model=1]] %c#2% [Int@0 Slope@0]; Int@0 Slope@0; [[/model=1]] [[model>1]] %c#2% [Int@-15 Slope@-15]; Int@0 Slope@0; [[/model>1]] [[/zeroclass = 2]] [[/classes > 1]]
PLOT: Type = PLOT3; Series = [[w1name#outcome]] (0) [[w2name#outcome]] (0.97) [[w3name#outcome]] (2.77); OUTPUT: TECH1 TECH4 [[model != 1]]TECH10 [[/model != 1]][[classes > 1]]TECH11 TECH14 [[/classes > 1]]STANDARDIZED RESIDUAL;

  

转载于:https://www.cnblogs.com/JoAnnal/p/6723667.html

MplusAutomation包的使用 二相关推荐

  1. Linux内核网络数据包发送(二)——UDP协议层分析

    Linux内核网络数据包发送(二)--UDP协议层分析 1. 前言 2. `udp_sendmsg` 2.1 UDP corking 2.2 获取目的 IP 地址和端口 2.3 Socket 发送:b ...

  2. AndroidStudio生成自定义的混淆jar包(同时将assets目录打入jar包)(二)(by 星空武哥)

    转载请标注原文地址:http://blog.csdn.net/lsyz0021/article/details/53107595 在以前曾经写过两篇文章,关于是生成jar包和引用jar的文章,建议先看 ...

  3. 抓包工具Charles(二)-移动端APP抓包(设置手机代理、安装证书)

    安装好Charles之后,还只能捕获电脑的接口请求 想要抓取移动设备的APP还需要设置代理.安装证书. 文章目录 一.抓包原理 二.手机设置网络代理 1. 查看电脑的IP地址(local IP add ...

  4. Charles 抓包工具教程(二) Charles 抓包HTTPS请求

    本文为在霍格沃兹测试开发学社中学习到的一些技术,写出来分享给大家,希望有志同道合的小伙伴可以一起交流技术,一起进步~ Charles 抓包HTTPS请求 一.MacOS 安装 Chares 证书 二. ...

  5. segy地震数据的读取python_Python-segy格式地震资料segyio读写包说明(二),pythonsegy,数据,学习,笔记...

    python segy格式地震数据读写包segyio学习笔记(二) 最近大致搞明白了segyio读取叠后和叠前segy数据的方法,以及内部存储结构,以两段代码为例: 叠后数据读取.这是一个从给定时窗内 ...

  6. Linux下采用lapack科学计算包来实现二维矩阵

    1.调用lapack包的方式,写一个头文件 my_lapack.h (Linux如何安装lapack包?) #ifndef MY_LAPACK_H #define MY_LAPACK_Hextern ...

  7. Shiny平台构建与R包开发(二)——数据输入

    作为Shiny平台构建与R包开发教程的第二小节,本节向读者介绍如何利用Shiny server处理用户输入的各种信息.这些信息既包括用户向Shiny上传的数据集,也包括用户对Shiny页面的各种控件( ...

  8. 我的第一个python web开发框架(11)——工具函数包说明(二)

    db_helper.py是数据库操作包,主要有两个函数,分别是read()数据库读操作函数和write()数据库写操作函数.这个包的代码是从小戴同学分享的博文改造过来的. 1 #!/usr/bin/e ...

  9. 分析udp数据报_Linux内核网络udp数据包发送(二)——UDP协议层分析

    1. 前言 本文分享了Linux内核网络数据包发送在UDP协议层的处理,主要分析了udp_sendmsg和udp_send_skb函数,并分享了UDP层的数据统计和监控以及socket发送队列大小的调 ...

  10. wireshark抓包分析(二)之链路层Frame

    Ethernet II(链路层): 数据链路层以太网帧头部信息 数据链路层主要有两个功能 :帧编码和误差纠正控制.帧编码意味着定义一个包含信息频率.位同步.源地址.目标地址以及其他控制信息的数据包.数 ...

最新文章

  1. 秒解决PHP 500的问题
  2. python分布式日志收集系统_Go实现海量日志收集系统(一)
  3. [美文欣赏]清华胡宇迪教授谈
  4. Spring - Java/J2EE Application Framework 应用框架 第 10 章 使用JDBC进行数据访问
  5. 洛谷 P1242 新汉诺塔
  6. 常用的7个SQl优化技巧
  7. delphi tclientsocket接收不到返回数据_RS—485中教你主站发送报文结构、从站返回报文结构?系列11...
  8. 计算机四级数据库真题,2015年计算机四级数据库真题
  9. Go基础系列:接口类型断言和type-switch
  10. libvirt API管理hypervisors
  11. 跟兄弟连学PHP PDF 分享
  12. 同志社交Blued赴美上市背后的三个问号
  13. LaTex软件安装方式
  14. Win10安装Eclipse教程
  15. win10 删除文件好慢解决方法
  16. 如何核算一个软件开发项目的成本?
  17. latex图片排版技巧总结
  18. 110配线架打法图解_110配线架详解[来自互联网]
  19. 玛格曼达 狂暴_我从狂暴听硅谷作家中学到的东西
  20. 阿里云添加云盘并挂载使用步骤

热门文章

  1. 推荐一个专业的正则表达试学习网站
  2. 计算机网络ip地址博客,计算机网络中,这些IP地址你知道吗?
  3. php 循环删除文件,php循环删除目录及目录下的文件
  4. mysql 并发锁_MySQL的并发控制与加锁分析
  5. Shark简介、部署及编译小结
  6. Spring Boot干货系列:(十二)Spring Boot使用单元测试
  7. 2011通信展:应用为王 国内3G终端企业集体发力
  8. 强人工智能:抑制神经元的意义
  9. CentOS下Red5安装
  10. 更“优秀”? 必须的!!