<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.socr.umich.edu/index.php?action=history&amp;feed=atom&amp;title=SMHS_BigDataBigSci_SEM_sem_vs_cfa</id>
	<title>SMHS BigDataBigSci SEM sem vs cfa - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.socr.umich.edu/index.php?action=history&amp;feed=atom&amp;title=SMHS_BigDataBigSci_SEM_sem_vs_cfa"/>
	<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_BigDataBigSci_SEM_sem_vs_cfa&amp;action=history"/>
	<updated>2026-06-04T10:37:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_BigDataBigSci_SEM_sem_vs_cfa&amp;diff=15428&amp;oldid=prev</id>
		<title>Dinov: /* See also */</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_BigDataBigSci_SEM_sem_vs_cfa&amp;diff=15428&amp;oldid=prev"/>
		<updated>2016-05-05T17:06:26Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;See also&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:06, 5 May 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l104&quot; &gt;Line 104:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 104:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==See also==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==See also==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[SMHS_BigDataBigSci_SEM| Back to Structural Equation Modeling (SEM)]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[SMHS_BigDataBigSci_SEM| Back to Structural Equation Modeling (SEM)]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;SMHS_BigDataBigSci_SEM_Ex1&lt;/del&gt;| Back to SEM Example &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1&lt;/del&gt;: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;School Kids Mental Abilities&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;SMHS_BigDataBigSci_SEM_Ex2&lt;/ins&gt;| Back to SEM Example &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2&lt;/ins&gt;: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Parkinson’s Disease Data&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[SMHS_BigDataBigSci_GCM| Next: (Latent) Growth Curve Modeling (GCM)]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[SMHS_BigDataBigSci_GCM| Next: (Latent) Growth Curve Modeling (GCM)]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dinov</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_BigDataBigSci_SEM_sem_vs_cfa&amp;diff=15427&amp;oldid=prev</id>
		<title>Dinov at 17:05, 5 May 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_BigDataBigSci_SEM_sem_vs_cfa&amp;diff=15427&amp;oldid=prev"/>
		<updated>2016-05-05T17:05:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:05, 5 May 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==[[SMHS_BigDataBigSci_SEM_Ex2| Structural Equation Modeling (SEM) Example 2 (Parkinson’s Disease Data)]] - sem() vs. cfa() &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==[[SMHS_BigDataBigSci_SEM_Ex2| Structural Equation Modeling (SEM) Example 2 (Parkinson’s Disease Data)]] - sem() vs. cfa() ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The&amp;#160; function &amp;lt;b&amp;gt;sem()&amp;lt;/b&amp;gt; is very similar to the function &amp;lt;b&amp;gt;cfa()&amp;lt;/b&amp;gt;.&amp;#160; As we did not include &amp;lt;b&amp;gt;fit.measures=TRUE&amp;lt;/b&amp;gt;, the report only includes the basic chi-square test statistic.&amp;#160; The argument &amp;lt;b&amp;gt;standardized=TRUE&amp;lt;/b&amp;gt;, reports standardized parameter values.&amp;#160; Two extra columns of standardized parameter values are printed. In the first column (labeled, Std.lv), only the latent variables are standardized.&amp;#160; In the second column (labeled Std.all), both latent and observed variables are standardized.&amp;#160; The latter is often called the `completely standardized solution'.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The&amp;#160; function &amp;lt;b&amp;gt;sem()&amp;lt;/b&amp;gt; is very similar to the function &amp;lt;b&amp;gt;cfa()&amp;lt;/b&amp;gt;.&amp;#160; As we did not include &amp;lt;b&amp;gt;fit.measures=TRUE&amp;lt;/b&amp;gt;, the report only includes the basic chi-square test statistic.&amp;#160; The argument &amp;lt;b&amp;gt;standardized=TRUE&amp;lt;/b&amp;gt;, reports standardized parameter values.&amp;#160; Two extra columns of standardized parameter values are printed. In the first column (labeled, Std.lv), only the latent variables are standardized.&amp;#160; In the second column (labeled Std.all), both latent and observed variables are standardized.&amp;#160; The latter is often called the `completely standardized solution'.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dinov</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.socr.umich.edu/index.php?title=SMHS_BigDataBigSci_SEM_sem_vs_cfa&amp;diff=15426&amp;oldid=prev</id>
		<title>Dinov: Created page with &quot;== Structural Equation Modeling (SEM) Example 2 (Parkinson’s Disease Data) - sem() vs. cfa() ===  The  function &lt;b&gt;sem()&lt;/b&gt; is very similar t...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.socr.umich.edu/index.php?title=SMHS_BigDataBigSci_SEM_sem_vs_cfa&amp;diff=15426&amp;oldid=prev"/>
		<updated>2016-05-05T17:05:45Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==&lt;a href=&quot;/index.php/SMHS_BigDataBigSci_SEM_Ex2&quot; title=&quot;SMHS BigDataBigSci SEM Ex2&quot;&gt; Structural Equation Modeling (SEM) Example 2 (Parkinson’s Disease Data)&lt;/a&gt; - sem() vs. cfa() ===  The  function &amp;lt;b&amp;gt;sem()&amp;lt;/b&amp;gt; is very similar t...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==[[SMHS_BigDataBigSci_SEM_Ex2| Structural Equation Modeling (SEM) Example 2 (Parkinson’s Disease Data)]] - sem() vs. cfa() ===&lt;br /&gt;
&lt;br /&gt;
The  function &amp;lt;b&amp;gt;sem()&amp;lt;/b&amp;gt; is very similar to the function &amp;lt;b&amp;gt;cfa()&amp;lt;/b&amp;gt;.  As we did not include &amp;lt;b&amp;gt;fit.measures=TRUE&amp;lt;/b&amp;gt;, the report only includes the basic chi-square test statistic.  The argument &amp;lt;b&amp;gt;standardized=TRUE&amp;lt;/b&amp;gt;, reports standardized parameter values.  Two extra columns of standardized parameter values are printed. In the first column (labeled, Std.lv), only the latent variables are standardized.  In the second column (labeled Std.all), both latent and observed variables are standardized.  The latter is often called the `completely standardized solution'.&lt;br /&gt;
&lt;br /&gt;
 # remove all objects from the R console (current workspace)&lt;br /&gt;
 rm(list = ls())&lt;br /&gt;
&lt;br /&gt;
 # library(&amp;quot;lavaan&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
 #load data   &amp;lt;b&amp;gt;05_PPMI_top_UPDRS_Integrated_LongFormat1.csv ( dim(myData) 1764   31 ), long format&amp;lt;/b&amp;gt;&lt;br /&gt;
 # myData &amp;lt;- read.csv(&amp;quot;https://umich.instructure.com/files/330397/download?download_frd=1&amp;amp;verifier=3bYRT9FXgBGMCQv8MNxsclWnMgodiJRYo3ODFtDq&amp;quot;,header=TRUE)&lt;br /&gt;
 # dichotomize the &amp;quot;ResearchGroup&amp;quot; variable&lt;br /&gt;
&lt;br /&gt;
 myData$\$$ResearchGroup &amp;lt;- ifelse(myData$\$$ResearchGroup == &amp;quot;Control&amp;quot;, 1, 0)&lt;br /&gt;
&lt;br /&gt;
 # library(&amp;quot;MASS&amp;quot;)&lt;br /&gt;
 myData2&amp;lt;-scale(myData); head(myData2)&lt;br /&gt;
 myData2[, 20] &amp;lt;- myData$\$$ResearchGroup;  # replace the ResearchGroup by orig binary labels (do not rescale)&lt;br /&gt;
 attach(myData2)&lt;br /&gt;
 head(myData2)&lt;br /&gt;
&lt;br /&gt;
 # model3 &amp;lt;-&lt;br /&gt;
    '&lt;br /&gt;
 # latent variable definitions - defining how the latent variables are “manifested by” a set of observed &lt;br /&gt;
 # (or manifest) variables, aka “indicators”&lt;br /&gt;
 # (1) Measurement Model &lt;br /&gt;
 # Imaging =~ L_cingulate_gyrus_ComputeArea + cerebellum_Volume&lt;br /&gt;
 Imaging =~  R_insular_cortex_ComputeArea + R_insular_cortex_Volume&lt;br /&gt;
 DemoGeno =~ Weight+Sex+Age&lt;br /&gt;
 # UPDRS =~ UPDRS_Part_I_Summary_Score_Baseline+X_Assessment_Non.Motor_Geriatric_Depression_Scale_GDS_Short_Summary_Score_Baseline&lt;br /&gt;
 UPDRS =~  UPDRS_part_I  +UPDRS_part_II + UPDRS_part_III&lt;br /&gt;
 # (2) Regressions &lt;br /&gt;
 ResearchGroup ~ Imaging + DemoGeno + UPDRS &lt;br /&gt;
 '&lt;br /&gt;
&lt;br /&gt;
Here is why we needed to scale the data first before we fit the SEM model:&lt;br /&gt;
&lt;br /&gt;
 # using raw data provides unreliable estimates&lt;br /&gt;
 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;# some observed variances are (at least) a factor 1000 times larger than others;&amp;lt;/font&amp;gt;&lt;br /&gt;
 fit3 &amp;lt;- sem(model3, data=&amp;lt;b&amp;gt;myData&amp;lt;/b&amp;gt;, estimator=&amp;quot;MLM&amp;quot;)&lt;br /&gt;
 summary(fit3)&lt;br /&gt;
&lt;br /&gt;
 # using scaled data provides stable estimates&lt;br /&gt;
 fit3 &amp;lt;- sem(model3, data=myData2, estimator=&amp;quot;MLM&amp;quot;)&lt;br /&gt;
 summary(fit3)&lt;br /&gt;
&lt;br /&gt;
 # report the standardized coefficients of the model&lt;br /&gt;
 standardizedSolution(fit3)&lt;br /&gt;
&lt;br /&gt;
 # variation explained by model components (The R-square value for all endogenous variables)&lt;br /&gt;
 inspect(fit3, &amp;quot;r2&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Note that all variances are supposed to be positive, however, occasionally, model estimates may generate a residual variance that is negative.  This may happen due to random sampling error where a very small true value may sometimes produce a negative estimate, or it can occur when the model is unstable.&lt;br /&gt;
&lt;br /&gt;
 # Inspect the fitted values variance-covariance matrix:&lt;br /&gt;
 fitted(fit3)$\$$cov&lt;br /&gt;
&lt;br /&gt;
 #&lt;br /&gt;
 Model fitting&lt;br /&gt;
 &amp;lt;b&amp;gt;Name	Command&amp;lt;/b&amp;gt;&lt;br /&gt;
 fit CFA to data	cfa(model, data=Data)&lt;br /&gt;
 fit SEM to data	sem(model, data=Data)&lt;br /&gt;
 standardized solution	sem(model, data=Data, std.ov=TRUE)&lt;br /&gt;
 orthogonal factors	cfa(model, data=Data, orthogonal=TRUE)&lt;br /&gt;
 Matrices&lt;br /&gt;
 &amp;lt;b&amp;gt;Name	Command&amp;lt;/b&amp;gt;&lt;br /&gt;
 Factor covariance matrix	inspect(fit, &amp;quot;coefficients&amp;quot;)$\$$psi&lt;br /&gt;
 Fitted covariance matrix	fitted(fit)$\$$cov&lt;br /&gt;
 Observed covariance matrix	inspect(fit, 'sampstat')$\$$cov&lt;br /&gt;
 Residual covariance matrix	resid(fit)$\$$cov&lt;br /&gt;
 Factor correlation matrix	cov2cor(inspect(fit, &amp;quot;coefficients&amp;quot;)$\$$psi) or use covariance command with standardised solution e.g., cfa(..., std.ov=TRUE)&lt;br /&gt;
 Fit Measures&lt;br /&gt;
 &amp;lt;b&amp;gt;Name	Command&amp;lt;/b&amp;gt;&lt;br /&gt;
 Fit measures:	fitMeasures(fit)&lt;br /&gt;
 Specific fit measures e.g.:	fitMeasures(fit)[c('chisq', 'df', 'pvalue', 'cfi', 'rmsea', 'srmr')]&lt;br /&gt;
 Parameters&lt;br /&gt;
 &amp;lt;b&amp;gt;Name	Command&amp;lt;/b&amp;gt;&lt;br /&gt;
 Parameter information	parTable(fit)&lt;br /&gt;
 Standardised estimates	standardizedSolution(fit) or summary(fit, standardized=TRUE)&lt;br /&gt;
 R-squared | inspect(fit, 'r2')&lt;br /&gt;
 Compare models&lt;br /&gt;
 &amp;lt;b&amp;gt;Name	Command&amp;lt;/b&amp;gt;&lt;br /&gt;
 Compare fit measures	cbind(m1=inspect(m1_fit, 'fit.measures'), m2=inspect(m2_fit, 'fit.measures'))&lt;br /&gt;
 Chi-square difference test	anova(m1_fit, m2_fit)&lt;br /&gt;
 Model improvement&lt;br /&gt;
 &amp;lt;b&amp;gt;Name	Command&amp;lt;/b&amp;gt;&lt;br /&gt;
 Modification indices	mod_ind &amp;lt;- modificationindices(fit)&lt;br /&gt;
 10 greatest	head(mod_ind[order(mod_ind$\$$mi, decreasing=TRUE), ], 10)&lt;br /&gt;
 mi &amp;gt; 5	subset(mod_ind[order(mod_ind$\$$mi, decreasing=TRUE), ], mi &amp;gt; 5)&lt;br /&gt;
&lt;br /&gt;
 # to account for groupings (gender)&lt;br /&gt;
 # fit3 &amp;lt;- sem(model3, data=myData, group=&amp;quot;Sex&amp;quot;, estimator=&amp;quot;MLM&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
 # install.packages(&amp;quot;semPlot&amp;quot;)&lt;br /&gt;
 library(semPlot)&lt;br /&gt;
&lt;br /&gt;
 # Plot standardized model (numerical):&lt;br /&gt;
 # semPaths(fit3, what = &amp;quot;est&amp;quot;, layout = &amp;quot;tree&amp;quot;, title = TRUE, style = &amp;quot;LISREL&amp;quot;)&lt;br /&gt;
 semPaths(fit3)&lt;br /&gt;
&lt;br /&gt;
[[Image:SMHS_BigDataBigSci7.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[SMHS_BigDataBigSci_SEM| Back to Structural Equation Modeling (SEM)]]&lt;br /&gt;
* [[SMHS_BigDataBigSci_SEM_Ex1| Back to SEM Example 1: School Kids Mental Abilities]]&lt;br /&gt;
* [[SMHS_BigDataBigSci_GCM| Next: (Latent) Growth Curve Modeling (GCM)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
* SOCR Home page: http://www.socr.umich.edu&lt;br /&gt;
&lt;br /&gt;
{{translate|pageName=http://wiki.socr.umich.edu/index.php?title=SMHS_BigDataBigSci_SEM_Ex2}}&lt;/div&gt;</summary>
		<author><name>Dinov</name></author>
		
	</entry>
</feed>