OpenMx Structural Equation Modeling
http://openmx.psyc.virginia.edu/taxonomy/term/2/0
enConvert RAM Model to LISREL
http://openmx.psyc.virginia.edu/thread/4069
<p>I need to compute factor scores which only works in OpenMx if the model type is LISREL. I've attached the model code that includes creating a path diagram for the RAM version. The RAM model code works fine in estimating the parameters. When I convert it to "type="LISREL"", I get various error messages. </p>
<p>This shows the specification for the endogenous and exogenous variables in the LISREL version:</p>
<p> manifestVars=list(<br />
endo=c("c_el","c_nc_el","c_or","c_nc_or",<br />
"c_el_1","c_el_nc_1","c_or_1","c_or_nc_1"),<br />
exo=c("t0s1","t0s2","t0s3","t0s4",<br />
"t1s1","t1s2","t1s3","t1s4",<br />
"t2s1","t2s2","t2s3","t2s4",<br />
"t3s1","t3s2","t3s3","t3s4")<br />
), </p>
<p> latentVars=list(endo=c("mu_e","mu_o"),exo=c("mu_e_1","mu_o_1")),</p>
<p>From the path diagram for the RAM version, it appears (at least to me) that manifest variables t0s1, t0s2, ... , t3s4 are all exogenous and latent variables mu_e_1 and mu_o_1 are exogenous. All the remaining variables are endogenous. Yet when I paste the LISREL model code into R:</p>
<p>Error: non-square MxMatrix attempted in 'nrow' and 'ncol' arguments to mxMatrix(matrixtype, values = values, free = free, labels = labels, name = matrixname)</p>
<p>Not sure where I am going wrong. I also tried to convert from RAM model to a LISREL model by changing the model type to LISREL after saving the RAM model, but this also did not work.</p>
<p>carbon.temp.ar.model.6.mat <- mxModel(carbon.temp.ar.model.6,type="default")<br />
carbon.temp.ar.model.6.lisrel <- mxModel(carbon.temp.ar.model.6.mat,type="LISREL")</p>
<p>But this fails (after a few minutes) when I try to fit the lisrel model:</p>
<p>> mxRun(carbon.temp.ar.model.6.lisrel)<br />
Running Carbon Temperature AR Model 6 with 91 parameters<br />
Error in model@manifestVars$exogenous :<br />
$ operator is invalid for atomic vectors</p>
<p>I was able to obtain a LISREL model version for a simpler related model (no t0s1, etc. variables and only two latent variables mu_e and mu_o) and then compute the factor scores. Although this worked only by specifying ALL of the manifest and latent variables as exogenous.</p>
<p>Obviously, there is something I am missing.</p>
<table id="attachments" class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/openmx_forum_lisrel_example.r">openmx_forum_lisrel_example.r</a></td><td>19.84 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/4069#commentsOpenMx Structural Equation ModelingWed, 28 Oct 2015 18:28:52 +0000rabil4069 at http://openmx.psyc.virginia.eduP value of 1 in mxCompare
http://openmx.psyc.virginia.edu/thread/4067
<p>Hello,<br />
I am working on an analysis of a univariate sex limitation model for depression and I have run into a potential problem. When comparing the homogeneity ACE model to the AE model, I get a p-value of 1 in mxCompare. The fit of the models are very similar:</p>
<p><div class="geshifilter"><pre class="rsplus geshifilter-rsplus" style="font-family:monospace;"><span style="color: #080;">></span> mxCompare<span style="color: #080;">(</span>HomACEModelFit,HomAEModelFit<span style="color: #080;">)</span>
base comparison ep minus2LL <span style="color: #0000FF; font-weight: bold;">df</span> <span style="color: #0000FF; font-weight: bold;">AIC</span> diffLL diffdf p
<span style="color: #ff0000;">1</span> HomACE <span style="color: #080;"><</span>NA<span style="color: #080;">></span> <span style="color: #ff0000;">4</span> <span style="color: #ff0000;">16217.9</span> <span style="color: #ff0000;">21258</span> <span style="color: #080;">-</span><span style="color: #ff0000;">26298.1</span> NA NA NA
<span style="color: #ff0000;">2</span> HomACE HomAE <span style="color: #ff0000;">3</span> <span style="color: #ff0000;">16217.9</span> <span style="color: #ff0000;">21259</span> <span style="color: #080;">-</span><span style="color: #ff0000;">26300.1</span> <span style="color: #080;">-</span>1.426603e<span style="color: #080;">-</span>05 <span style="color: #ff0000;">1</span> <span style="color: #ff0000;">1</span></pre></div></p>
<p>Does this mean there is something wrong with the models, or is open mx rounding off the value? When I compare them to the full heterogeneity model it works fine and I get p values of 0.20 and 0.12.<br />
Due to confidentiality reasons I am not able to include the data but I have attached the script for the models.<br />
Any input would be greatly appreciated,<br />
Kind regards/<br />
Lisa </p>
<table id="attachments" class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/script open mx.txt">script open mx.txt</a></td><td>10.05 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/4067#commentsOpenMx Structural Equation ModelingThu, 22 Oct 2015 13:38:01 +0000Lisa M4067 at http://openmx.psyc.virginia.eduConstraining loadings on factor so average of loadings equals 1 and average of intercepts equals 0
http://openmx.psyc.virginia.edu/thread/4007
<p>I am running a CFA and would like to use the "effects coding" method of identification described by Little, Slegers, and Card (2006). In the effects coding method, the loadings of a factor are constrained so that the average of the loadings equals 1 and the average of the intercepts equals 0. How can I do this with OpenMx? I imagine it involves mxConstraint or mxAlgebra, but am not sure where to begin. Here's a small example of a model that I'd like to modify to use effects coding:</p>
<p>oneFactorModel <- mxModel("CFA",<br />
type="RAM",<br />
manifestVars=c("x1","x2","x3","x4","x5","x6"),<br />
latentVars="LatentFactor1",</p>
<p> #Data<br />
mxData(observed=myFADataRaw, type="raw"),</p>
<p> #Residual Variances<br />
mxPath(from=c("x1","x2","x3","x4","x5","x6"),<br />
arrows=2,<br />
free=TRUE,<br />
values=c(1,1,1,1,1,1),<br />
labels=c("e1","e2","e3","e4","e5","e6")),</p>
<p> #Latent Variance<br />
mxPath(from="LatentFactor1",<br />
arrows=2,<br />
free=TRUE,<br />
values=1,<br />
labels ="varF1"),</p>
<p> #Factor Loadings<br />
mxPath(from="LatentFactor1",<br />
to=c("x1","x2","x3","x4","x5","x6"),<br />
arrows=1,<br />
free=c(FALSE,TRUE,TRUE,TRUE,TRUE,TRUE),<br />
values=c(1,1,1,1,1,1),<br />
labels =c("loading1","loading2","loading3","loading4","loading5","loading6")),</p>
<p> #Means<br />
mxPath(from="one",<br />
to=c("x1","x2","x3","x4","x5","x6","LatentFactor1"),<br />
arrows=1,<br />
free=c(TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE),<br />
values=c(1,1,1,1,1,1,0),<br />
labels =c("meanx1","meanx2","meanx3","meanx4","meanx5","meanx6",NA)))</p>
<p>Thanks!<br />
-Isaac</p>
http://openmx.psyc.virginia.edu/thread/4007#commentsOpenMx Structural Equation ModelingTue, 16 Jun 2015 14:09:37 +0000dadrivr4007 at http://openmx.psyc.virginia.eduTrivariate Cholesky with thresholds -> Mx status RED
http://openmx.psyc.virginia.edu/thread/3950
<p>Dear all,</p>
<p>I would like to fit a trivariate Cholesky model in OpenMx. I have data of twins aged 7, 10, and 12 years old with longitudinal data for a part of the sample. My data are skewed, so I made three categories and I would like to fit a threshold model on them. I fixed the thresholds to be equal across ages, so I estimate two thresholds in total. The means and the variances of the phenotype increase with age though, so I would like to fix the mean at time point 1 to zero and the variance to one and freely estimate the means and variances of the subsequent ages. There are also quantitative and qualitative sex differences. When I run the script that is attached to this posting, I keep getting the following warning message:</p>
<p>Running CholACE<br />
Warning message:<br />
In model 'CholACE' Optimizer returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED) </p>
<p>I have changed the starting values many times and each time I get a different -2LL and totally different path estimates. I thought that there might be too few observations in some of the cells (especially for the longitudinal data), however the model does not run on simulated data either (see script).</p>
<p>There is no problem when I run univariate threshold models for each age separately.</p>
<p>Does anyone know what is going wrong here? Could it be that the variances need to be one for all ages?</p>
<p>Many thanks in advance!</p>
<p>Best regards<br />
Charlotte</p>
<table id="attachments" class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/Cholesky_thresholds.R">Cholesky_thresholds.R</a></td><td>14.62 KB</td> </tr>
<tr class="even"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/myFunctions.R">myFunctions.R</a></td><td>3.44 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/3950#commentsOpenMx Structural Equation ModelingThu, 05 Feb 2015 09:40:13 +0000Charlotte3950 at http://openmx.psyc.virginia.eduSimplex model & sex differences
http://openmx.psyc.virginia.edu/thread/3905
<p>Dear all,</p>
<p>I am working on a simplex script in openMx. There are quantitative and qualitative sex differences for my phenotype, so I estimate separate paths for males and females and I would also like to freely estimate the dos correlations between the latent As. However, I am struggling with the transmission paths.<br />
Probably, someone else has already dealt with this. I would like to know whether there are any simplex scripts available that take into account sex differences?</p>
<p>Regards<br />
Charlotte </p>
http://openmx.psyc.virginia.edu/thread/3905#commentsOpenMx Structural Equation ModelingFri, 03 Oct 2014 08:38:44 +0000Charlotte3905 at http://openmx.psyc.virginia.eduMultilevel SEM with complex sampling
http://openmx.psyc.virginia.edu/thread/3890
<p>Dear all,</p>
<p>Would you confirm if OpenMx supports multilevel SEM on complex sampling survey data, with categorical outcome? (each datapoint has different weight)</p>
<p>Thank you!</p>
http://openmx.psyc.virginia.edu/thread/3890#commentsOpenMx Structural Equation ModelingFri, 29 Aug 2014 15:05:14 +0000yoosoo3890 at http://openmx.psyc.virginia.eduReturned matrices (expCov, expMean, A,S, etc) only reflect last row of data
http://openmx.psyc.virginia.edu/thread/3277
<p>Hi folks. I mentioned this to Joshua who asked me to post it here for further input. While wondering about some strange output in one of my functions the other day I discovered that the matrices output by openmx only reflect the last calculated row of data. I believe this only becomes evident when definition variables are used, such that the A S or M matrices (when using RAM format, though I don't believe it's limited to this case) depend on the definition variable. I think a better option may be some sort of weighted output based on the number of observations in each row... </p>
http://openmx.psyc.virginia.edu/thread/3277#commentsOpenMx Structural Equation ModelingMon, 16 Jun 2014 12:45:13 +0000CharlesD3277 at http://openmx.psyc.virginia.eduStandardized estimates under equality constraints
http://openmx.psyc.virginia.edu/thread/2833
<p>I was wondering how OpenMx treats standardized estimates under equality constraints. </p>
<p>I ran a linear latent growth curve model in OpenMx and constrained all residual variances to be equal. Not surprisingly, they all get to be the same unstandardized estimate. However, OpenMx reports only a single standardized estimate for the residual, which happens to be the one associated with the first observation. Even if the unstandardized estimates are constrained to be equal, the unstandardized ones need not be and in reality seldom are the same.</p>
<p><div class="geshifilter"><pre class="rsplus geshifilter-rsplus" style="font-family:monospace;"> name <span style="color: #0000FF; font-weight: bold;">matrix</span> <span style="color: #0000FF; font-weight: bold;">row</span> <span style="color: #0000FF; font-weight: bold;">col</span> Estimate Std.<span style="">Error</span> Std.<span style="">Estimate</span> Std.<span style="">SE</span> lbound ubound
<span style="color: #ff0000;">1</span> e S x1 x1 <span style="color: #ff0000;">1.0607526</span> <span style="color: #ff0000;">0.08676699</span> <span style="color: #ff0000;">0.6267662</span> <span style="color: #ff0000;">0.05126796</span> </pre></div></p>
<p> I attach the diagram of my exemplary model, which I created with Onyx. Standardized coefficients are given in parentheses next to unstandardized estimates. For parameter epsilon, OpenMx reports 0.63, which is the value associated with x1. My feeling is that OpenMx should report the complete set of standardized coefficients. Or was this a deliberate design decision?</p>
<p>Thanks,<br />
Andreas</p>
<table id="attachments" class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/lgcm.png">lgcm.png</a></td><td>141.1 KB</td> </tr>
<tr class="even"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/lgcmdel.csv">lgcmdel.csv</a></td><td>9.24 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/2833#commentsOpenMx Structural Equation ModelingWed, 09 Apr 2014 12:00:41 +0000brandmaier2833 at http://openmx.psyc.virginia.eduAdding new algebras in submodels and constraining them
http://openmx.psyc.virginia.edu/thread/2616
<p>Hi.<br />
I am running a bivariate moderation model and would like to set some constraints in order to test for some nonlinear effects. I am struggling though with adding new algebras into submodels (with subsequent equating them). Let's say that I specify </p>
<p><div class="geshifilter"><pre class="rsplus geshifilter-rsplus" style="font-family:monospace;">pathAm <span style="color: #080;"><-</span> mxMatrix<span style="color: #080;">(</span>name <span style="color: #080;">=</span> <span style="color: #ff0000;">"am"</span>, type <span style="color: #080;">=</span> <span style="color: #ff0000;">"Lower"</span>, <span style="color: #0000FF; font-weight: bold;">nrow</span> <span style="color: #080;">=</span> nv, <span style="color: #0000FF; font-weight: bold;">ncol</span> <span style="color: #080;">=</span> nv, free<span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">T</span>, <span style="color: #0000FF; font-weight: bold;">labels</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">(</span><span style="color: #ff0000;">"amM"</span>,<span style="color: #ff0000;">"amC"</span>,<span style="color: #ff0000;">"amU"</span><span style="color: #080;">)</span>, values<span style="color: #080;">=</span>pathVal<span style="color: #080;">)</span>
pathCm <span style="color: #080;"><-</span> mxMatrix<span style="color: #080;">(</span>name <span style="color: #080;">=</span> <span style="color: #ff0000;">"cm"</span>, type <span style="color: #080;">=</span> <span style="color: #ff0000;">"Lower"</span>, <span style="color: #0000FF; font-weight: bold;">nrow</span> <span style="color: #080;">=</span> nv, <span style="color: #0000FF; font-weight: bold;">ncol</span> <span style="color: #080;">=</span> nv, free<span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">T</span>, <span style="color: #0000FF; font-weight: bold;">labels</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">(</span><span style="color: #ff0000;">"cmM"</span>,<span style="color: #ff0000;">"cmC"</span>,<span style="color: #ff0000;">"cmU"</span><span style="color: #080;">)</span>, values<span style="color: #080;">=</span>pathVal<span style="color: #080;">)</span>
pathEm <span style="color: #080;"><-</span> mxMatrix<span style="color: #080;">(</span>name <span style="color: #080;">=</span> <span style="color: #ff0000;">"em"</span>, type <span style="color: #080;">=</span> <span style="color: #ff0000;">"Lower"</span>, <span style="color: #0000FF; font-weight: bold;">nrow</span> <span style="color: #080;">=</span> nv, <span style="color: #0000FF; font-weight: bold;">ncol</span> <span style="color: #080;">=</span> nv, free<span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">T</span>, <span style="color: #0000FF; font-weight: bold;">labels</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">(</span><span style="color: #ff0000;">"emM"</span>,<span style="color: #ff0000;">"emC"</span>,<span style="color: #ff0000;">"emU"</span><span style="color: #080;">)</span>, values<span style="color: #080;">=</span>pathVal<span style="color: #080;">)</span>
pathAf <span style="color: #080;"><-</span> mxMatrix<span style="color: #080;">(</span>name <span style="color: #080;">=</span> <span style="color: #ff0000;">"af"</span>, type <span style="color: #080;">=</span> <span style="color: #ff0000;">"Lower"</span>, <span style="color: #0000FF; font-weight: bold;">nrow</span> <span style="color: #080;">=</span> nv, <span style="color: #0000FF; font-weight: bold;">ncol</span> <span style="color: #080;">=</span> nv, free<span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">T</span>, <span style="color: #0000FF; font-weight: bold;">labels</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">(</span><span style="color: #ff0000;">"afM"</span>,<span style="color: #ff0000;">"afC"</span>,<span style="color: #ff0000;">"afU"</span><span style="color: #080;">)</span>, values<span style="color: #080;">=</span>pathVal<span style="color: #080;">)</span>
pathCf <span style="color: #080;"><-</span> mxMatrix<span style="color: #080;">(</span>name <span style="color: #080;">=</span> <span style="color: #ff0000;">"cf"</span>, type <span style="color: #080;">=</span> <span style="color: #ff0000;">"Lower"</span>, <span style="color: #0000FF; font-weight: bold;">nrow</span> <span style="color: #080;">=</span> nv, <span style="color: #0000FF; font-weight: bold;">ncol</span> <span style="color: #080;">=</span> nv, free<span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">T</span>, <span style="color: #0000FF; font-weight: bold;">labels</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">(</span><span style="color: #ff0000;">"cfM"</span>,<span style="color: #ff0000;">"cfC"</span>,<span style="color: #ff0000;">"cfU"</span><span style="color: #080;">)</span>, values<span style="color: #080;">=</span>pathVal<span style="color: #080;">)</span>
pathEf <span style="color: #080;"><-</span> mxMatrix<span style="color: #080;">(</span>name <span style="color: #080;">=</span> <span style="color: #ff0000;">"ef"</span>, type <span style="color: #080;">=</span> <span style="color: #ff0000;">"Lower"</span>, <span style="color: #0000FF; font-weight: bold;">nrow</span> <span style="color: #080;">=</span> nv, <span style="color: #0000FF; font-weight: bold;">ncol</span> <span style="color: #080;">=</span> nv, free<span style="color: #080;">=</span><span style="color: #0000FF; font-weight: bold;">T</span>, <span style="color: #0000FF; font-weight: bold;">labels</span> <span style="color: #080;">=</span> <span style="color: #0000FF; font-weight: bold;">c</span><span style="color: #080;">(</span><span style="color: #ff0000;">"efM"</span>,<span style="color: #ff0000;">"efC"</span>,<span style="color: #ff0000;">"efU"</span><span style="color: #080;">)</span>, values<span style="color: #080;">=</span>pathVal<span style="color: #080;">)</span></pre></div><br />
and so on in the model <span class="geshifilter"><code class="rsplus geshifilter-rsplus">CholACEModel</code></span> (with MZM, DZM, MZF and DZF as submodels).</p>
<p>I would like to introduce certain constraints and test the submodels against <span class="geshifilter"><code class="rsplus geshifilter-rsplus">CholACEModel</code></span>:<br />
amC/amM=cmC/cmM=emC/emM=betaM<br />
afC/afM=cfC/cfM=efC/efM=betaF<br />
but am not sure how I should proceed. Let's say I specify</p>
<p><div class="geshifilter"><pre class="rsplus geshifilter-rsplus" style="font-family:monospace;">NonlinearEfModel <span style="color: #080;">=</span> mxModel <span style="color: #080;">(</span>CholACEModel, name<span style="color: #080;">=</span><span style="color: #ff0000;">'NonlinearEf'</span><span style="color: #080;">)</span>
bM <span style="color: #080;">=</span> mxAlgebra<span style="color: #080;">(</span>amC<span style="color: #080;">/</span>amM, name<span style="color: #080;">=</span><span style="color: #ff0000;">'betaM'</span><span style="color: #080;">)</span>
bM <span style="color: #080;">=</span> mxAlgebra<span style="color: #080;">(</span>cmC<span style="color: #080;">/</span>cmM, name<span style="color: #080;">=</span><span style="color: #ff0000;">'betaM'</span><span style="color: #080;">)</span>
bM <span style="color: #080;">=</span> mxAlgebra<span style="color: #080;">(</span>emC<span style="color: #080;">/</span>emM, name<span style="color: #080;">=</span><span style="color: #ff0000;">'betaM'</span><span style="color: #080;">)</span>
bF <span style="color: #080;">=</span> mxAlgebra<span style="color: #080;">(</span>afC<span style="color: #080;">/</span>afM, name<span style="color: #080;">=</span><span style="color: #ff0000;">'betaF'</span><span style="color: #080;">)</span>
bF <span style="color: #080;">=</span> mxAlgebra<span style="color: #080;">(</span>cfC<span style="color: #080;">/</span>cfM, name<span style="color: #080;">=</span><span style="color: #ff0000;">'betaF'</span><span style="color: #080;">)</span>
bF <span style="color: #080;">=</span> mxAlgebra<span style="color: #080;">(</span>efC<span style="color: #080;">/</span>efM, name<span style="color: #080;">=</span><span style="color: #ff0000;">'betaF'</span><span style="color: #080;">)</span></pre></div></p>
<p>but how should I put all these new algebras into the model? Should I specify MZM, DZM, MZF and DZF models again?</p>
<p>And is it a right way to equate the algebras by giving them the same name? Would that work?</p>
<p>Thank you beforehand!<br />
Julia</p>
http://openmx.psyc.virginia.edu/thread/2616#commentsOpenMx Structural Equation ModelingTue, 11 Feb 2014 12:36:09 +0000Julia2616 at http://openmx.psyc.virginia.eduFactor loadings, residual variances and means estimation
http://openmx.psyc.virginia.edu/thread/2580
<p>Dear users,</p>
<p>I was trying to model latent variable via the common factor model using path-centric model specification as it is shawn in the examples in OpenMx User Guide, Release 1.2.0-1919, chapter 2.2 Factor Analysis, Path Specification (<a href="http://openmx.psyc.virginia.edu/docs/OpenMx/latest/OpenMxUserGuide.pdf" title="http://openmx.psyc.virginia.edu/docs/OpenMx/latest/OpenMxUserGuide.pdf">http://openmx.psyc.virginia.edu/docs/OpenMx/latest/OpenMxUserGuide.pdf</a>). My purpose was to to estimate factor loadings, residual variances and means. But in all my attmpts I did not receive the chi-square statistics and some other goodness of fit measures like CFI, TLI and RMSEA. Even in the example exactly copied from the above source (<a href="http://openmx.psyc.virginia.edu/svn/tags/stable-1.2/demo/OneFactorModel_PathRaw.R" title="http://openmx.psyc.virginia.edu/svn/tags/stable-1.2/demo/OneFactorModel_PathRaw.R">http://openmx.psyc.virginia.edu/svn/tags/stable-1.2/demo/OneFactorModel_...</a>) I have not received the chi-square value. Is there any mistakes?</p>
<p>best regards,<br />
Krzysiek</p>
http://openmx.psyc.virginia.edu/thread/2580#commentsOpenMx Structural Equation ModelingSun, 19 Jan 2014 23:39:41 +0000krzysiek2580 at http://openmx.psyc.virginia.eduUnable to reproduce MASEM results from a published study
http://openmx.psyc.virginia.edu/thread/2546
<p>Hi,</p>
<p>I'd like to reproduce the meta-analytic structural equation modeling (MASEM) results from this study:<br />
soonang[dot]com/wp-content/uploads/2011/04/2007-MISQ-Ang1.pdf</p>
<p>I used the correlation matrix (Table 3, p. 559) as input and specified the paths according to Figure 2 (p. 560).<br />
Additionally, I set the number of observations to 701 (p. 558).<br />
The full openMx code is attached.</p>
<p>The openMx output for the parameter estimates fits the values in Figure 2 quite well.<br />
However, the openMX fit statistics are quite different from the ones in the paper.<br />
openMx: chi square = 2442.81, CFI = 0.27, RMSEA = 0.23<br />
paper: chi square = 160.84, CFI = 0.95, RMSEA = 0.054 (p. 558)<br />
Any idea why these values differ that much?</p>
<p>Thanks and best regards<br />
lind0r</p>
<table id="attachments" class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/partially mediated model.txt">partially mediated model.txt</a></td><td>2.72 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/2546#commentsOpenMx Structural Equation ModelingTue, 31 Dec 2013 16:32:21 +0000lind0r2546 at http://openmx.psyc.virginia.eduDoes OpenMx support SEM analysis using ordinal/binary indicators and sampling weights
http://openmx.psyc.virginia.edu/thread/2348
<p>Hi,</p>
<p>I'd like to know if it's possible to estimate a sem model with ordinal and binary indicators using a WLS estimator based on the raw data including the sampling weights. The data set contains a weight column with an individual weight for each case and I don’t need multilevel modeling.</p>
<p>I am currently using the R package lavaan for SEM analysis. As lavaan does not support this functionality, I’m considering changing to OpenMx. </p>
<p>Looking into feature lists and forum topics I found that OpenMx supports ordinal indicators as well as sampling weights, but I couldn’t figure out if the combination of both is also supported. </p>
<p>Any hint is very appreciated. If anything is unclear I'm happy to give further information.</p>
<p>Best,<br />
Markus</p>
http://openmx.psyc.virginia.edu/thread/2348#commentsOpenMx Structural Equation ModelingThu, 26 Sep 2013 12:35:40 +0000mari2348 at http://openmx.psyc.virginia.eduCorrelated residuals of manifest variables
http://openmx.psyc.virginia.edu/thread/2309
<p>Hi,</p>
<p>Is anybody knows how to model correlated residuals of some manifest variables in OpenMx? Can you give me any example of mxPath()<br />
application to this issue?</p>
<p>best regards,<br />
Krzysztof </p>
http://openmx.psyc.virginia.edu/thread/2309#commentsOpenMx Structural Equation ModelingThu, 05 Sep 2013 12:56:30 +0000krzysiek2309 at http://openmx.psyc.virginia.eduConstraining path loading to values of a latent
http://openmx.psyc.virginia.edu/thread/2209
<p>I would like to constrain the loading between two variables to the values of a 3rd, where that 3rd is generated by additional structures. I guess I need a way to reference the estimated latent directly, but as it stands I seem to be only able to reference it's parameters.</p>
<p>I've been mainly generating the model with mxPath rather than mxMatrix, but this can change as needed...</p>
<p>Cheers for any suggestions!</p>
http://openmx.psyc.virginia.edu/thread/2209#commentsOpenMx Structural Equation ModelingFri, 12 Jul 2013 13:33:09 +0000CharlesD2209 at http://openmx.psyc.virginia.eduDefinition Variables in Constraints and Confidence Intervals
http://openmx.psyc.virginia.edu/thread/2034
<p>I'm trying to build a simple auto-lagged model for some simulated data. The observations are simple ar(1) with 6 observations per subject and where the time points are irregular within and between subjecs. Eid in the Daily Life handbook (pp. 398-402) shows how to do this in MPlus.</p>
<p>The model works fine with equally spaced time points - I can get back the ar(1) value used in the simulation. </p>
<p>To handle unequal spacing, I'm using definition variables. The trick is to constrain the ar loadings. Suppose you have (a simple path diagram):</p>
<p>x1 --> x2 --> x3 --> x4 --> x5 --> x6</p>
<p>The loading for the path from 1 to 2 has parameter p1, from 2 to 3, p2 etc. The lag length for the paths are the differences between the time points (i.e., lag2_1 = t2 - t1, lag3_2 = t3 - t2, where t1 is the first time point, etc.). You constrain as follows:</p>
<p>p1 = beta^(lag2_1)<br />
p2 = beta^(lag3_2)<br />
p3 = beta^(lag4_3)</p>
<p>and so on. I implemented this with mxConstraint's and mxAlgebra's. I get no error messages and no warnings but the results are not right - at least the estimate of beta is not near to the ar(1) used in the simulation. In my simulation with irregular spacing, the average difference between t2 and t1 is about 2 units (about the same fro t3 and t2, etc.). If I take the estimated p1, p2, etc, and square root them (i.e., raise to the power of 1 over the average lag which is approximately equal to 2), then I seem to get values near to the ar(1) used in the simulation.</p>
<p>I can't get OpenMx to compute the average lags across subjects - it seems to just print the difference betweenlast individual value of the definition variables.</p>
<p>How can I correctly implement this model?</p>
<p>GIven the contraints are nonlinear, is it still possible to get likelihood confidence intervals? The intervals I get have lower bounds higher than the estimate.</p>
http://openmx.psyc.virginia.edu/thread/2034#commentsOpenMx Structural Equation ModelingFri, 29 Mar 2013 20:32:03 +0000rabil2034 at http://openmx.psyc.virginia.edu