OpenMx General Help
https://openmx.ssri.psu.edu/taxonomy/term/7/0
enStaying informed with OpenMx
https://openmx.ssri.psu.edu/thread/470
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<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>
</div>
</div></div></div>Tue, 30 Mar 2010 14:24:47 +0000mspiegel470 at https://openmx.ssri.psu.eduWelcome to the OpenMx General Help Forum
https://openmx.ssri.psu.edu/thread/17-welcome-openmx-general-help-forum
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<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>
</div>
</div></div></div>Fri, 31 Jul 2009 18:51:09 +0000Steve17 at https://openmx.ssri.psu.eduPerformance issues many algebras
https://openmx.ssri.psu.edu/node/4315
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>Hey,</p>
<p>I am currently implementing a new model specification language for longitudinal panel models. As "backend", I use OpenMx. Everything works but it is painfully slow.</p>
<p>The model specification language uses mean and kernel functions to describe a model on a Gaussian process. The mean function gets some variables as input (for example time) and returns the model implied mean for that input (for example time point). The covariance function gets two inputs (for example time point 1, and time point 2) and returns the model implied covariance for that input (for example covariance between time point1 and time point 2). Thus, model specification in this language consists of formulating parametric mean and covariance functions. The latent growth curve model (with no correlation between intercept and slope) looks like this in this language:</p>
<p>$$m(t;[\mu_{Int},\mu_{Slope}])=\mu_{Int}+\mu_{Slope} \quad k(s,t;[\sigma_{Int}^2,\sigma_{Slope}^2,\sigma_\epsilon^2])=\sigma_{Int}^2+st\sigma_{Slope}^2+\delta(s-t)\sigma_\epsilon^2$$<br />
I use the same parameter names here as in (http://openmx.psyc.virginia.edu/docs/openmx/latest/TimeSeries_Path.html). $\delta(x)$ is 1 if $x=0$ and $0$ otherwise.</p>
<p>The model can be defined like that</p>
<div class="geshifilter">
<pre class="rsplus geshifilter-rsplus" style="font-family:monospace;">gppModel<span style="color: #080;">(</span><span style="color: #ff0000;">'muInt+muSlope*t'</span>,<span style="color: #ff0000;">'varInt+varSlope*t*t!+omxApproxEquals(t,t!,0.0001)*error'</span>,myData<span style="color: #080;">)</span>.</pre></div>
<p>To transform this into an OpenMx model, I use mxExpectationNormal and construct the appropriate covariance matrix and mean vector. That is, every entry of mean vector is an algebra, which is really only 'muI+muS*t' where t is replaced with the appropriate input, which is in the data set (myData). I use the same idea to create the appropriate algebra for every entry of the covariance matrix.</p>
<p>This all works fine. I get the same results using this approach as using the regular path specification approach for all models. However, it is painfully slow (like a couple of thousands times slower than the regular approach). It is also much slower than a matlab implementation of this language I did, which uses a completely different software as backend. I started profiling the code and it seems that, not surprisingly, a lot of time is spent evaluating the algebras. <strong>Any ideas how to make this faster?</strong></p>
</div>
</div></div></div>Tue, 05 Dec 2017 18:32:24 +0000jkarch4315 at https://openmx.ssri.psu.eduSingle Common Factor Model with Some Residual Errors Correlated
https://openmx.ssri.psu.edu/node/4245
<div class="field field-name-upload field-type-file field-label-hidden"><div class="field-items"><div class="field-item even"><table class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><span class="file"><img class="file-icon" alt="Plain text icon" title="text/plain" src="/modules/file/icons/text-plain.png" /> <a href="https://openmx.ssri.psu.edu/sites/default/files/forum_openmx_code.txt" type="text/plain; length=2205">forum_openmx_code.txt</a></span></td><td>2.15 KB</td> </tr>
</tbody>
</table>
</div></div></div><div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>I want to fit a single common factor model to seven different types of measurements of the same thing. However, 6 of the methods I expect to have residual errors that are positively correlated. I expect the intercorrelations to be the same among these 6 methods (fortunately) so I want to build in this assumption. There would be too many correlations to estimate separately. So I want to assume rho is the same and need to constrain, say, cov23 = sigma2<em>sigma3</em>rho, cov24=sigma2<em>sigma4</em>rho, etc. But I don't see how to do this using mxConstraints. If I include all the covariances cov23, cov24 etc. in mxPath statements, and build in the constraints directly, it tells me it doesn't know what rho is. If I code it as shown in the attached file, it estimates a model that is unidentified - every time I run it the parameter estimates change drastically. There is no way as far as I can see to code the mxPath statements so that the covariances equal the standard deviations multiplied by rho.</p>
<p>How can force it to estimate a common correlation rho so that the model is identified?</p>
</div>
</div></div></div>Fri, 24 Mar 2017 14:21:36 +0000rabil4245 at https://openmx.ssri.psu.eduPower estimation for the detection of rG and rE
https://openmx.ssri.psu.edu/thread/4195
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>How can one estimate the power for the detection of significant rG and rE in multivariate Cholesky models?</p>
<p>Specifically, the analysis employed a trivariate Cholesky (AE providing the best fit, with all significant rGs, and one significant rE). The CIs have been calculated for all estimates. The sample is on the small side: 200 same-sex pairs (half MZ, half DZ) and may have been underpowered for the other smaller rEs but I’m not sure what size effect I had enough power to detect.</p>
<p>I can estimate power for variance components in univariate decomposition models but cannot find anything specific to multivariate models or correlations. Any advice or script to get a power estimate specific to correlations would be super helpful!</p>
<p>Thanks in advance,<br />
M</p>
</div>
</div></div></div>Thu, 20 Oct 2016 23:41:48 +0000Marianna4195 at https://openmx.ssri.psu.eduHow to set the value of a computed parameter to that computed value?
https://openmx.ssri.psu.edu/thread/4181
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>Is there a function to put the computed value of all parameters determined by a bracket address (e.g. var[1,1] ) into the appropriate values cell(s) in the model?</p>
<p>Background and use-case: OpenMx allows us to use labels to set the value of a parameter (matrix cell). Here's a RAM model where I insert the value of covXY into the row 2, column1 of the symmetric path (S) matrix:</p>
<div class="geshifilter">
<pre class="rsplus geshifilter-rsplus" style="font-family:monospace;">m1$S
$labels
x y
x <span style="color: #ff0000;">"x_with_x"</span> <span style="color: #ff0000;">"covXY[1,1]"</span>
y <span style="color: #ff0000;">"covXY[1,1]"</span> <span style="color: #ff0000;">"y_with_y"</span> </pre></div>
<div class="geshifilter">
<pre class="rsplus geshifilter-rsplus" style="font-family:monospace;">$values
x y
x <span style="color: #ff0000;">1.198632</span> <span style="color: #ff0000;">0.000000</span>
y <span style="color: #ff0000;">0.000000</span> <span style="color: #ff0000;">2.018483</span></pre></div>
<p>For summary and plot (in umx) the x-y covariance path is MIA. That zero should in fact be .97, as we can verify with <span class="geshifilter"><code class="rsplus geshifilter-rsplus">mxEval<span style="color: #080;">(</span>covXY<span style="color: #080;">[</span><span style="color: #ff0000;">1</span>,<span style="color: #ff0000;">1</span><span style="color: #080;">]</span>, m1<span style="color: #080;">)</span></code></span>.</p>
<p>Now, I can mxEval the relevant parameters, and get the right answer, and even manually push this to the correct place. But is there an "update computed cells" function to do all this automatically?</p>
</div>
</div></div></div>Sat, 03 Sep 2016 16:59:23 +0000tbates4181 at https://openmx.ssri.psu.eduRmpi
https://openmx.ssri.psu.edu/thread/4130
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>I am trying to parallelize OpenMx on a computing cluster at my university. I'm using Rmpi, and I keep getting the same error:</p>
<p>Error in { : task 18 failed - "job.num is at least 2."<br />
Calls: %dopar% -></p>
<h2>Execution halted</h2>
<p>mpirun has exited due to process rank 0 with PID 1077 on<br />
node compute-0-11.local exiting improperly. There are two reasons this could occur:</p>
<ol>
<li>
<p>this process did not call "init" before exiting, but others in<br />
the job did. This can cause a job to hang indefinitely while it waits<br />
for all processes to call "init". By rule, if one process calls "init",<br />
then ALL processes must call "init" prior to termination.</p>
</li>
<li>
<p>this process called "init", but exited without calling "finalize".<br />
By rule, all processes that call "init" MUST call "finalize" prior to<br />
exiting or it will be considered an "abnormal termination"</p>
</li>
</ol>
<p>This may have caused other processes in the application to be</p>
<h2>terminated by signals sent by mpirun (as reported here).</h2>
<p>Googling led me to this website: https://github.com/snoweye/Rmpi_PROF/blob/master/R/Rparutilities.R. Evidently "job.num is at least 2" is given when mpi.comm.size(comm) - 1 < 2 in the function mpi.parLapply, which is called by the function omxLapply if Rmpi is loaded.</p>
<p>Does anyone know why this is happening? I've tried getting OpenMx to not parallelize on its own and I've tried using OpenMx to do the parallelization as opposed to another package, and neither works. What am I doing wrong?</p>
</div>
</div></div></div>Tue, 19 Apr 2016 00:36:43 +0000jonno3124130 at https://openmx.ssri.psu.eduStandard Errors versus Confidence Intervals
https://openmx.ssri.psu.edu/thread/4129
<div class="field field-name-upload field-type-file field-label-hidden"><div class="field-items"><div class="field-item even"><table class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><span class="file"><img class="file-icon" alt="Binary Data" title="application/octet-stream" src="/modules/file/icons/application-octet-stream.png" /> <a href="https://openmx.ssri.psu.edu/sites/default/files/example_0.R" type="application/octet-stream; length=2587" title="example.R">example.R</a></span></td><td>2.53 KB</td> </tr>
<tr class="even"><td><span class="file"><img class="file-icon" alt="Binary Data" title="application/octet-stream" src="/modules/file/icons/application-octet-stream.png" /> <a href="https://openmx.ssri.psu.edu/sites/default/files/fake.data_.R" type="application/octet-stream; length=8143" title="fake.data_.R">fake.data_.R</a></span></td><td>7.95 KB</td> </tr>
</tbody>
</table>
</div></div></div><div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>When I run this code (a threshold model for ordinal data), the standard errors are incredibly large but the confidence intervals are relatively narrow. Are any of the results trustworthy? I've tried simplifying the thresholds (using labeling to reduce the number of parameters) but it doesn't help. I'm not sure why this data is so hard to model.</p>
<p>If I treat the ordinal data as if it were quantitative, I have no trouble fitting a common factor model.</p>
<p>I've also noticed that when I used mxGenerateData, the resulting data is noticeably different from the original. The original ordinal data goes from 0 to 9. mxGenerateData changes this to 1 to 10 - which I could live with, but the percentage of 1s is MUCH larger than the percentage of 0s for each of the seven ordinal variables.</p>
</div>
</div></div></div>Mon, 18 Apr 2016 02:11:12 +0000rabil4129 at https://openmx.ssri.psu.eduHow to use "mxFitFunctionAlgebra" instead of "mxAlgebraObjective"
https://openmx.ssri.psu.edu/thread/4113
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>This code used to work using "mxAlgebraObjective", but now says I have to use "mxFitFunctionAlgebra" instead of "mxAlgebraObjective".</p>
<h6>#</h6>
<p>models_1_v4 <- mxModel("Models_1",<br />
Model_1_t1_v4,<br />
Model_1_t2_v4,<br />
mxAlgebra(<br />
Model_1_t1_v4.objective+<br />
Model_1_t2_v4.objective,<br />
name="multi"),</p>
<h1>mxAlgebraObjective("multi"),</h1>
<pre><code>mxFitFunctionAlgebra(algebra = "multi")
</code></pre><p>)</p>
<p>m1_fit_v4 <- mxRun(models_1_v4)</p>
<h6>#</h6>
<p>I tried changing ".objective" to ".fitfunction" but this did not work either. What am I doing wrong?</p>
</div>
</div></div></div>Thu, 10 Mar 2016 16:22:21 +0000rabil4113 at https://openmx.ssri.psu.eduOutput from mxFactorScores - Order of rows?
https://openmx.ssri.psu.edu/thread/4109
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>In the help file for mxFactorScores, it says:</p>
<p>The rows are in the order of the <em>sorted</em> data.</p>
<p>I'm not sure what this means. The data I have is in order by date and it's clear that the estimated factor scores for "ML" are no longer in the same order. There are two correlated factors each with 2 indicators (and nothing else). How can I get the factor scores into the same order as the rest of the data?</p>
<p>BTW, I'm using OpenMx 2.3.1 under R 3.2.2 (Ubuntu 15.04). mxFactorScores does not work with the RAM model so I converted it to LISREL in order to get the factor scores. (I had this problem before but I don't remember if it was ever resolved.)</p>
</div>
</div></div></div>Mon, 07 Mar 2016 18:27:43 +0000rabil4109 at https://openmx.ssri.psu.eduHandling Exogenous Latent Variables in OpenMx
https://openmx.ssri.psu.edu/thread/4099
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>Suppose you have two exogenous latent variable. (There will be directed paths from them to a response variable.) Is the covariance between the two exogenous latent variables part of the model? That is, do I have to include a path specification for the covariance or otherwise the covariance will be constrained to zero? I understand that the covariances among exogenous manifest variables are not part of the model.</p>
</div>
</div></div></div>Tue, 16 Feb 2016 14:54:59 +0000rabil4099 at https://openmx.ssri.psu.eduHow can you tell if OpenMx is using multiple cores?
https://openmx.ssri.psu.edu/thread/4092
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>I'm running OpenMx on 4 different computers running Ubuntu 15.04 and the latest version of OpenMx and current versions of R. On one, when look at the output for htop, it seems clear that all 4 cores are being used by OpenMx. Yet on two of the others, htop seems to indicate that not all 4 cores are being used simultaneously and the same model takes 2 to 3 times longer to run. I've tried using the suggestion to tell OpenMx to use more threads - but this seems to have no effect and I never had to do this on the computer that seems to be using all 4 cores and runs the model much more quickly. I don't think its processing power is greater than the other computers. When I used to install OpenMx, it seemed that it asked you if you wanted parallel processing enabled. But lately it no longer asks.</p>
</div>
</div></div></div>Wed, 20 Jan 2016 23:44:36 +0000rabil4092 at https://openmx.ssri.psu.eduaccess model estimated parameters (EP) without calling summary?
https://openmx.ssri.psu.edu/thread/4083
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>Hi OpenMxers,<br />
I want to determine automatically which order to put models into mxCompare so that the model with more degrees of freedom comes first.</p>
<p>Both models have been run, and I can access a models number of estimated parameters from summary(model).</p>
<p>summary() however, can be costly in terms of execution time: Is there a way to access the EP (or df) property from the model directly without calling summary?</p>
<p>Besten Wünsche,<br />
tim</p>
<p>FYI, the situation I am trying to automate is avoiding this:</p>
<pre>
|Model | EP|Delta-2LL |Delta df|p | AIC|Compare with Model |
|:------------|--:|:----------|:------|:--|--------:|:------------------|
|fix_C_2_zero | 25| | | | 2227.444| |
|Final | 27|1.29e-05 |-2 | | 2231.444|fix_C_2_zero |
Warning message:
In pchisq(otherSummary$Minus2LogLikelihood - refSummary$Minus2LogLikelihood, :
NaNs produced
</pre></div>
</div></div></div>Thu, 26 Nov 2015 18:46:00 +0000tbates4083 at https://openmx.ssri.psu.edumxTryHard status codes
https://openmx.ssri.psu.edu/thread/4045
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>Dear all,</p>
<p>I have been running a model within a loop over several variables, which does not converge well for all variables. Therefore, I applied mxTryHard. There are two things I noticed:</p>
<p>1) for models that run well without calling mxTryHard the best fit does not seem to change using mxTryHard, but the status code changes from 0 to -1</p>
<p>> fit1 <- mxRun(model,intervals =F)<br />
> fit1$output$Minus2LogLikelihood<br />
[1] 4595.342<br />
> fit1$output$status<br />
$code<br />
[1] 0<br />
$status<br />
[1] 0</p>
<p>fit2<-mxTryHard(model,intervals=F)<br />
> fit2$output$Minus2LogLikelihood<br />
[1] 4595.342<br />
fit2$output$status<br />
$code<br />
[1] -1</p>
<p>$status<br />
[1] 0</p>
<p>2) even when I set "intervals=F" (like in the example above) the mxTryHard option computes intervals.</p>
<p>Can you help?<br />
Thanks in advance</p>
</div>
</div></div></div>Tue, 15 Sep 2015 20:55:35 +0000Rachel4045 at https://openmx.ssri.psu.eduCan't move paths
https://openmx.ssri.psu.edu/thread/4042
<div class="field field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above"><div class="field-label">Forums: </div><div class="field-items"><div class="field-item even"><a href="/forums/openmx-help/openmx-general-help">OpenMx General Help</a></div></div></div><div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even"><div class="tex2jax">
<p>Hi, I'm using Onyx, which I think is based on OpenMx, for a confirmatory factor analysis.</p>
<p>I'm using a Macbook Air, and I can't work out how to modify the path arrows so they look neat. Can anyone help?</p>
<p>There is nothing in the documentation. The models in the examples all look nice, whereas everytime I add a path or covariance path, the program sticks them in anywhere and I can't move the end-points around to different parts of the observed or latent variable.</p>
<p>Please help!</p>
<p>Jay.</p>
</div>
</div></div></div>Mon, 14 Sep 2015 04:10:31 +0000Anonymous4042 at https://openmx.ssri.psu.edu