OpenMx General Help
http://openmx.psyc.virginia.edu/taxonomy/term/7/0
enStaying informed with OpenMx
http://openmx.psyc.virginia.edu/thread/470
<p>The easiest way to keep up with the latest changes to the OpenMx software is to subscribe to receive email notification of any news updates. Assuming that you are logged in, click on the "My account" link on the left-hand panel of your screen. Next click on "Subscriptions" and then "Content types". Enable the checkbox for "News" and click on "Save". Once you have followed these steps, you will start receiving an email whenever something is posted under the "Recent News" section of the website (the top left panel, underneath the Guinea Pig). If you are concerned about inbox cluttering, it's ok you can expect a fairly low frequency of announcements.</p>
http://openmx.psyc.virginia.edu/thread/470#commentsOpenMx General HelpTue, 30 Mar 2010 14:24:47 +0000mspiegel470 at http://openmx.psyc.virginia.eduWelcome to the OpenMx General Help Forum
http://openmx.psyc.virginia.edu/thread/17-welcome-openmx-general-help-forum
<p>This forum is designed for general questions about how to use OpenMx. If you can't find another place where your question fits, then this is the place to be!</p>
http://openmx.psyc.virginia.edu/thread/17-welcome-openmx-general-help-forum#commentsOpenMx General HelpFri, 31 Jul 2009 18:51:09 +0000Steve17 at http://openmx.psyc.virginia.eduCategorical Data in both independent and dependent variables
http://openmx.psyc.virginia.edu/thread/3883
<p>I have a data set with six binary variables, which I am trying to determine the temporal relationship. I was using lavaan R package, where they suggested to use dummy variable for endogenous variables (independent) and use ordered for exogenous (dependent variables). I was using the model as described in pdf file. I have gotten following results: </p>
<p>lavaan (0.5-16) converged normally after 31 iterations</p>
<p> Number of observations 51</p>
<p> Estimator DWLS Robust<br />
Minimum Function Test Statistic 5.699 7.295<br />
Degrees of freedom 7 7<br />
P-value (Chi-square) 0.575 0.399<br />
Scaling correction factor 1.006<br />
Shift parameter 1.632<br />
for simple second-order correction (Mplus variant)</p>
<p>Model test baseline model:</p>
<p> Minimum Function Test Statistic 61.153 45.447<br />
Degrees of freedom 14 14<br />
P-value 0.000 0.000</p>
<p>User model versus baseline model:</p>
<p> Comparative Fit Index (CFI) 1.000 0.991<br />
Tucker-Lewis Index (TLI) 1.055 0.981</p>
<p>Root Mean Square Error of Approximation:</p>
<p> RMSEA 0.000 0.029<br />
90 Percent Confidence Interval 0.000 0.153 0.000 0.178<br />
P-value RMSEA <= 0.05 0.654 0.486</p>
<p>According to lavaan since it was using DWLS, AIC and BIC are calculated. However, we had someone analyze the data before for us was using AIC and BIC to compare which temporal relationship is better at explaining our data. So I decided to try OpenMx, I am very new to path analysis and OpenMx, so I am not quite sure if I am treating the variables correctly. I have attached the code and dataset and the model was run and gave me some estimates, however, RMSEA was not computed. And the estimates for each path was different compared to lavaan. At this point, I am not sure how to compare my results from these two methods and if it's even comparable since OpenMx I turned everything into ordinal but in lavaan I used dummy variables. And why is that OpenMx didn't calcualte RMSEA for categorical data.</p>
<p>rl</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/model.R">model.R</a></td><td>2.79 KB</td> </tr>
<tr class="even"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/Models.pdf">Models.pdf</a></td><td>19 KB</td> </tr>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/path input alt1.csv">path input alt1.csv</a></td><td>707 bytes</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/3883#commentsOpenMx General HelpTue, 26 Aug 2014 21:15:14 +0000rl3883 at http://openmx.psyc.virginia.edumatrix logarithm function for mxAlgebra
http://openmx.psyc.virginia.edu/thread/3459
<p>Any chance of this being implemented at some point? Would seem to be consistent with the omxExponential implementation. Currently I optimize some free parameters over the range 0 to -inf, which is exponentially scaled, and I suspect this probably poses optimization difficulties....</p>
http://openmx.psyc.virginia.edu/thread/3459#commentsOpenMx General HelpThu, 26 Jun 2014 12:10:17 +0000CharlesD3459 at http://openmx.psyc.virginia.eduMultiple group analysis
http://openmx.psyc.virginia.edu/thread/3440
<p>Hi,</p>
<p>I hope this is not asked yet. Is there a maximum number of groups that can be specified with multiple group analysis on OpenMx? For example, 100 groups? And are there special steps to be taken when doing multiple group analysis if a number of groups is exceeded (e.g. 50 or 100)? </p>
<p>Thank you.</p>
<p>metavid</p>
http://openmx.psyc.virginia.edu/thread/3440#commentsOpenMx General HelpWed, 25 Jun 2014 17:48:55 +0000metavid3440 at http://openmx.psyc.virginia.eduDoes OpenMx support multilevel, ordinal/binary outcomes/indicators with sampling weights?
http://openmx.psyc.virginia.edu/thread/3321
<p>Hi,</p>
<p>I am hoping to perform a multilevel SEM on complex-sampling survey data, with known weight and binary outcome and ordinal independent variables. </p>
<p>Similar posts on this forum don't seem to support that this is simple to do on OpenMx, but any advice would be much appreciated. (<a href="http://openmx.psyc.virginia.edu/thread/2348" title="http://openmx.psyc.virginia.edu/thread/2348">http://openmx.psyc.virginia.edu/thread/2348</a>, <a href="http://openmx.psyc.virginia.edu/thread/861#comment-form" title="http://openmx.psyc.virginia.edu/thread/861#comment-form">http://openmx.psyc.virginia.edu/thread/861#comment-form</a>) </p>
<p>Thank you. </p>
http://openmx.psyc.virginia.edu/thread/3321#commentsOpenMx General HelpThu, 19 Jun 2014 18:22:03 +0000yoosoo3321 at http://openmx.psyc.virginia.eduObtain number of Objective function evaluations
http://openmx.psyc.virginia.edu/thread/3122
<p>Hi,</p>
<p>I am interested in obtaining both the number of major iterations and the overall number of objective function evaluations (how many times is the log likelihood and its gradient computed).<br />
I found model@output$iterations and model@output$evaluations. model@output$iterations is the number of major iterations. model@output$evaluations contains a vector with two integer entries. Does somebody know what the entries are?</p>
http://openmx.psyc.virginia.edu/thread/3122#commentsOpenMx General HelpMon, 26 May 2014 16:55:29 +0000jkarch3122 at http://openmx.psyc.virginia.edumodified model
http://openmx.psyc.virginia.edu/thread/2669
<p>hi, I am a beginner using Mx open packages, so I do not quite understand. I have run my program. output is given as attached.<br />
The value of RSMEA, CFI and TLI its very ugly because its value doesn't meet either criteria . What can I do in advance to improve the model?<br />
thank you.</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/output awal.png">output awal.png</a></td><td>21.41 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/2669#commentsOpenMx General HelpThu, 13 Mar 2014 15:28:39 +0000siti nur azizah2669 at http://openmx.psyc.virginia.eduReferring to an OpenMx matrix in the OpenMx environment
http://openmx.psyc.virginia.edu/thread/2640
<p>I'm trying to run a model in which I have several matrices that should contain the same parameter estimates (they overlap partly). I know I can use labels or mxConstraint to put equality constraints on parameter estimates, but I was wondering if it is also possible to refer directly to the parameter estimates of a matrix in other parts of the OpenMx environment. For example, I have tried to build an mxAlgebra that refers to the parameter estimates of an mxMatrix by using: </p>
<p>mxAlgebra(expression=cbind(Model.mxMatrix[,i],Model.mxMatrix[,j]), name="part_mxMatrix")</p>
<p>but this doesn't seem to work. </p>
<p>If anybody has any suggestion on how to make this work, it is more than welcome!</p>
http://openmx.psyc.virginia.edu/thread/2640#commentsOpenMx General HelpMon, 03 Mar 2014 20:14:39 +0000mverdam2640 at http://openmx.psyc.virginia.eduComputing R squared with missing data
http://openmx.psyc.virginia.edu/thread/2619
<p>This may be an easy question, but I can't think of the answer. I've built a regression model (predicting Y) with two independent variables (X and Z). I want to compute R^2. Is that built into the model somehow? If not, any ideas on how to compute it? Here's the model I have:</p>
<p>multiRegModel <- mxModel("Multiple Regression, All Variables",<br />
type="RAM",<br />
manifestVars=c("x", "y", "z"),<br />
# variance paths<br />
mxPath(<br />
from=c("x", "y", "z"),<br />
arrows=2,<br />
free=TRUE,<br />
values = c(.5, .5, .5),<br />
labels=c("varx", "residual", "varz")<br />
),<br />
# covariance of x and z<br />
mxPath(<br />
from="x",<br />
to="z",<br />
arrows=2,<br />
free=TRUE,<br />
values=0.2,<br />
labels="covxz"<br />
),<br />
# regression weights<br />
mxPath(<br />
from=c("x","z"),<br />
to="y",<br />
arrows=1,<br />
free=TRUE,<br />
values=.5,<br />
labels=c("betax","betaz")<br />
),<br />
# means and intercepts<br />
mxPath(<br />
from="one",<br />
to=c("x", "y", "z"),<br />
arrows=1,<br />
free=TRUE,<br />
values=c(.5, .5),<br />
labels=c("meanx", "beta0", "meanz")<br />
)<br />
) # close model</p>
<p>I know "residual" is the residual variance of Y, but I would think I'd need an estimate of the total variance of Y to compute it from that. Any help would be appreciated. Thanks!</p>
http://openmx.psyc.virginia.edu/thread/2619#commentsOpenMx General HelpMon, 17 Feb 2014 19:06:59 +0000fife2619 at http://openmx.psyc.virginia.eduConfidence Intervals
http://openmx.psyc.virginia.edu/thread/2598
<p>I'm not sure the best way to get confidence intervals for my estimates. I'm doing a bifactor model with a large dataset (HRS) with lots of missing data, and the mxCI are taking impossibly long (days long). </p>
<p>Anyone have suggestions? Would bootstrapping be faster? If so, what would that script look like? (I've never bootstrapped before)</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/refined CSS Model 2_0.R">refined CSS Model 2.R</a></td><td>4.8 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/2598#commentsOpenMx General HelpWed, 29 Jan 2014 00:55:53 +0000a9mike2598 at http://openmx.psyc.virginia.eduOpenMx in the Cloud
http://openmx.psyc.virginia.edu/thread/2585
<p>Iām looking to integrate MSEM (one of: OpenMx, MPlus, LISREL, etc) into an application I am developing for schools on a .NET Microsoft Azure Cloud platform ā multiple schools will access the application simultaneously, and the application will call the MSEM modelling unit to estimate a specific model and return the estimates to a database for benchmarking purposes.</p>
<p>Would I need to run OpenMx inside a VM, or is there a server version? Can multiple instances of OpenMx run inside the same VM? or Would we need to run multiple VMs, each for an instant of OpenMx?</p>
<p>How does OpenMx utilise multiple-cores ā can it can run multiple models (jobs) simultaneously? or does it simply run parallel processing for a single job via the multiple-cores?</p>
<p>The Azure Cloud expands elastically to meet requirements ā while serial processing (pseudo batch mode) would work OK, processing multiple jobs in parallel would be preferred.</p>
<p>What type of licensing would apply to the above application.</p>
http://openmx.psyc.virginia.edu/thread/2585#commentsOpenMx General HelpThu, 23 Jan 2014 00:23:43 +0000cuttance2585 at http://openmx.psyc.virginia.eduGenetic correlation equals to 1 or -1 in Bivariate ACE model
http://openmx.psyc.virginia.edu/thread/2581
<p>Hello All,</p>
<p>I had just done bivariate ACE model for two continuous variables (bivariate correlated factors model). The results turned out to be a little weird as follows:</p>
<p>A1 = 0.25, A2 = 0.09<br />
C1 = 0.12, C2 = 0.08<br />
E1 = 0.62, E2 = 0.82<br />
Rph = -0.24<br />
Ra = -1<br />
Rc = 1<br />
Re = -0.26</p>
<p>We observe Ra is -1, but we personally think it is not reasonable that the two variables are perfectly correlated. Is it possible that there are some problems with the program? </p>
<p>I have tested other variables, sometimes their genetic correlation is 1 or -1, especially when A1 or A2 is very small. How can I avoid 1( or -1) genetic correlation in the program?</p>
<p>I attached the data I was using. Could anybody help me to check whether the above results are correct?</p>
<p>Thanks very much in advance.<br />
Regards,<br />
Yue Cui<br />
Brainnetome Center, Chinese Academy of Sciences</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/Yue_sentOpenMxForum.csv">Yue_sentOpenMxForum.csv</a></td><td>5.32 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/2581#commentsOpenMx General HelpMon, 20 Jan 2014 03:08:00 +0000c30942132581 at http://openmx.psyc.virginia.eduexcessive memory usage when definition variables vary substantially
http://openmx.psyc.virginia.edu/thread/2551
<p>Hi. I've been doing some work on a package to overlay openmx and manage continuous time SEM models. Everything is working great but I am quite stuck with what seems to be some sort of memory management issue with openmx. I've spoken with Tim Brick regarding this previously, but thought I'd put it up here for all to see :)</p>
<p>Basically I'm estimating n-variate vector autoregressive models, and constraining the discrete observations to an underlying continuous time model with various algebra constraints and definition variables. See <a href="http://psycnet.apa.org/index.cfm?fa=search.displayRecord&id=7833EC1B-FEBA-3F1B-2A07-5321A5AE363A&resultID=4&page=1&dbTab=all&search=true" title="http://psycnet.apa.org/index.cfm?fa=search.displayRecord&id=7833EC1B-FEBA-3F1B-2A07-5321A5AE363A&resultID=4&page=1&dbTab=all&search=true">http://psycnet.apa.org/index.cfm?fa=search.displayRecord&id=7833EC1B-FEB...</a> for more details.</p>
<p>When each individual shares the same pattern of definition variables, ie all individuals are measured at the same time for each wave, things are fine. However as soon as individuals vary in their measurement timings, memory usage skyrockets and in many cases I'm unable to complete mxRun without R memory errors. </p>
<p>2 data files and an openmx script, reflecting a bivariate, 5 time point case are available here:<br />
<a href="https://www.dropbox.com/sh/c70cc0c6ghqefbi/F_HiRsutpU" title="https://www.dropbox.com/sh/c70cc0c6ghqefbi/F_HiRsutpU">https://www.dropbox.com/sh/c70cc0c6ghqefbi/F_HiRsutpU</a> </p>
<p>data1 is rounded such that individuals share the same time intervals (seen in variables i1 to i4)<br />
data2 shows individually varying time intervals<br />
the openmx script runs very quickly when data1 is used, but crashes out on me when data2 is used.</p>
<p>Cheers for any help!</p>
http://openmx.psyc.virginia.edu/thread/2551#commentsOpenMx General HelpThu, 09 Jan 2014 18:26:20 +0000CharlesD2551 at http://openmx.psyc.virginia.eduSpecifying a Mediation Model in OpenMx using metaSEM
http://openmx.psyc.virginia.edu/thread/2424
<p>Hello All,</p>
<p>First of all thank you for your hard work over the years to provide us with unique ways to combine meta-analytic principles with SEM--and providing a conduit to do this in R. My research team and I really appreciate it.</p>
<p>I am doing a two stage MASEM with the metaSEM package, and am having some difficulty specifying a mediation analysis in the A/Smatrix. I have four variables: w,x,y,z. And my linear equations are as follows:</p>
<p>X ~ W + e<br />
Z ~ W + e<br />
Y ~ W + X + Z + e</p>
<p>I would like to see if X or Z (or X and Z) mediate the relationship between W and Y.</p>
<p>I specified the Amatrix and Smatrix as follows:<br />
A1 <- mxMatrix("Full", nrow=4, ncol=4, byrow =TRUE, values=c(rep(0,4),1,rep(0,3),1,rep(0,3),1,1,1, 0),<br />
free=c(rep(FALSE,4),TRUE,rep(FALSE,3),TRUE,rep(FALSE,3),TRUE,TRUE,TRUE, rep(FALSE,1)),<br />
labels=c(rep(NA,4),"ethint",rep(NA,3),"ethind",rep(NA,3),"ethnicity","inter","indep", rep(NA,1)),<br />
name="A1")</p>
<p>S1 <- mxMatrix(type="Symm",nrow=4,ncol=4,byrow=TRUE,values=c(1, 0, 0, 0, 0, 1, .5, 0, 0,.5, 1, 0, 0, 0, 0, 1),<br />
free=c(T,F,F,F,F,T,T,F,F,T,T,F,F,F,F,T),<br />
labels=c("vareth",NA,NA, NA,NA,"varint","covintind", NA, NA, "covintind","varind", NA, NA, NA, NA, "residual"),<br />
name="S")</p>
<p>Is this the correct way to specify this mediation? I modeled it after the multivariate regression shown on (<a href="http://openmx.psyc.virginia.edu/docs/OpenMx/latest/Regression_Matrix.html" title="http://openmx.psyc.virginia.edu/docs/OpenMx/latest/Regression_Matrix.html">http://openmx.psyc.virginia.edu/docs/OpenMx/latest/Regression_Matrix.html</a>).<br />
When I run it with tssem2(), my model fit indices are all 0, 1, or Inf.</p>
<p>Thank you so much for your help!</p>
<p>-Xander</p>
http://openmx.psyc.virginia.edu/thread/2424#commentsOpenMx General HelpSun, 10 Nov 2013 01:53:29 +0000xander2424 at http://openmx.psyc.virginia.edu