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.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.edutwinData zygosity
http://openmx.psyc.virginia.edu/thread/2277
<p>Hello!</p>
<p>I use Australian twin sample biometric data to test my scripts, but there is something unclear with zygosity variable: it has 10 levels instead of 5 (as declared on help page). How should I actually interpret these levels?</p>
http://openmx.psyc.virginia.edu/thread/2277#commentsOpenMx General HelpSun, 18 Aug 2013 18:43:01 +0000IvanVoronin2277 at http://openmx.psyc.virginia.eduWill someone check over my script and model (latent change model)?
http://openmx.psyc.virginia.edu/thread/2187
<p>So I just started learning SEM this past year, teaching myself with some guidance from my advisor. I learned on AMOS, but I'm trying to teach myself OpenMX (just started last week). </p>
<p>Would anyone be willing to look over the model and script I have? Model I am trying to achieve (though I'm not sure it's entirely correct) is attached as pdf "Extraversion Latent Change Model". It is a latent change model, intercept and slope created from two latent models of extraversion (time 1 and time 2). It is not the best visual representation, but did what I could in ppt! I've also attached the script in pdf format, which I would greatly appreciate if someone would check over. It seems to mostly work except I get "Warning message:In sqrt(diag(expCov)) : NaNs produced" and fit indices are all NA. </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/Extraversion Latent change Model_1.pdf">Extraversion Latent change Model.pdf</a></td><td>262.69 KB</td> </tr>
<tr class="even"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/Extraversion Model script.pdf">Extraversion Model script.pdf</a></td><td>59.87 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/2187#commentsOpenMx General HelpTue, 02 Jul 2013 15:49:35 +0000a9mike2187 at http://openmx.psyc.virginia.eduOpenMx Refuses to Compute Confidence Intervals Using Ubuntu and Windows - But Not Mac
http://openmx.psyc.virginia.edu/thread/2169
<p>I adapted OpenMx ordinal threshold model example code to estimate a model with 5 raters using a 5-point ordinal scale. (The code uses threshold deviations.) The model converges (after some tweaking of starting values) with no errors and no warning messages - this is on a computer running Ubuntu 13.04 and the latest version of OpenMx. The same model was estimated using MPlus - both yield very similar factor loading estimates and threshold estimates (although MPlus used weighted least squares - ML wouldn't work). All attempts at getting OpenMx to produce confidence intervals fail - lower and upper bounds are always NA - whether for factor loadings or thresholds. (Standard errors are shown for every parameter.)</p>
<p>I tried running this on a computer running Ubuntu 12.10 and another running 12.04. They produce the same parameter estimates but no confidence intervals. (Using the same starting values, however, the show code red.) I also tried running this under Windows 7 - nearly identical parameter estimates but no confidence intervals.</p>
<p>Finally, a colleague ran the same model on his Mac - it produced nearly identical parameter estimates AND confidence intervals (still code red).</p>
<p>I've run a lot of models with OpenMx using Ubuntu and had no problems getting what seem like reasonable intervals. Occasionally I've had problems with some upper and some lower bounds (typically equal to the parameter estimate).</p>
<p>Has anyone else run into this problem?</p>
http://openmx.psyc.virginia.edu/thread/2169#commentsOpenMx General HelpThu, 13 Jun 2013 22:36:05 +0000rabil2169 at http://openmx.psyc.virginia.eduhow to deal with twin data with inexact zygosity diagnosis in OpenMx
http://openmx.psyc.virginia.edu/thread/2084
<p>Dear OpenMx experts,</p>
<p>I'm now working on a twin dataset with zygosity diagnosis is not exact, i.e. I only have one variable indicating the probability of one twin pair being MZ or DZ. In Mx we can "specify" this variable and "weight" it when estimating the covariance matrix. Dr. Neale has discussed this issue and provided the Mx script file here:<br />
<a href="ftp://ftp.vcu.edu/pub/mx/examples/zygosity" title="ftp://ftp.vcu.edu/pub/mx/examples/zygosity">ftp://ftp.vcu.edu/pub/mx/examples/zygosity</a></p>
<p>The key commands are below:</p>
<p>G2: All twin pairs<br />
Data NInput_vars=3 Nmodel=2<br />
Labels t1 t2 pmz<br />
Rectangular File=sim1.mz<br />
Select t1 t2 pmz ;<br />
Definition pmz ;</p>
<p>Matrices= Group 1<br />
P Full 1 1<br />
End Matrices;</p>
<p>Specify P pmz</p>
<p>Means N;<br />
Covariances A+C+D+E | A+C+D _<br />
A+C+D | A+C+D+E _<br />
A+C+D+E | H@A+C+Q@D _<br />
H@A+C+Q@D | A+C+D+E ;<br />
Weights P_I-P;</p>
<p>My question is how we can do the same analysis in OpenMx? Any help will be greatly appreciated.</p>
<p>Best,<br />
Shaoyong</p>
http://openmx.psyc.virginia.edu/thread/2084#commentsOpenMx General HelpTue, 30 Apr 2013 14:33:53 +0000shaoyong.su2084 at http://openmx.psyc.virginia.eduEstimate individuals' values or scores on a latent variable
http://openmx.psyc.virginia.edu/thread/1988
<p>Is it possible with OpenMx to estimate individuals' values or scores on a latent variable? For example, using the one factor model (<a href="http://openmx.psyc.virginia.edu/svn/trunk/demo/OneFactorModel_PathRaw.R" title="http://openmx.psyc.virginia.edu/svn/trunk/demo/OneFactorModel_PathRaw.R">http://openmx.psyc.virginia.edu/svn/trunk/demo/OneFactorModel_PathRaw.R</a>), is it possible to estimate what each case's value is on the latent factor? If so, how can this be done?</p>
<p>Thanks in advance!</p>
http://openmx.psyc.virginia.edu/thread/1988#commentsOpenMx General HelpTue, 05 Mar 2013 21:16:58 +0000dadrivr1988 at http://openmx.psyc.virginia.edu