95% CI for the standardized variance estimates?

2 replies [Last post]
peno66's picture
Offline
Joined: 08/14/2011

Hi! I'm really a new beginner but had a lot of help from the Simplified OpenMx manual. In the end of this manual there is a script that I used to explore my own data. However, this script give 95% CIs for the unsquared path estimates but for standardized variance estimates which would be of great interest. Is there a simple way to modify this script to get 95% CIs also for the variance estimates?? Really grateful for any help!

AttachmentSize
Script handstyrka 110801.doc53 KB
Ryne's picture
Offline
Joined: 07/31/2009
I can't look at your code for

I can't look at your code for more than about 20 seconds at a time, because your file keeps crashing my version of Word (for future submissions, submit code in either an R file or a plain text file). From what I can see, this script calculates confidence intervals manually by taking an estimated parameter (which I presume is the variance) and adding or subtracting 1.96 times the standard error.

First, standardizing a model or path is just a linear transformation, so whatever process by which you standardize can be applied to the confidence interval as well. Say you had a raw parameter (a covariance, for example) that had an estimated value of 3 and a confidence interval from 2 to 4. If you standardized that parameter into a correlation by dividing by the product of the SDs of the two variables, which happen to be 1 and 5. You'd divide 3 by 1 * 5, yielding a correlation of 0.60. You can apply the same transformation to the confidence interval, yielding a CI of 2/5 to 4/5, or 0.40 to 0.80.

Now for the bad news. Standard-error based confidence intervals can be pretty inaccurate when parameters are (a) bounded, like variance terms are, and (b) interdependent, like ACE components are. You'd be better off using something like the mxCI function, which calculates likelihood-based confidence intervals for each parameter or transformation of a parameter you want. It works by taking your final fitted model and changing the value of each parameter until the fit of the model changes by a specified amount, usually 3.84, as that is the criterion value for 95% confidence on a chi-square distribution with 1 df. mxCI can calculate confidence intervals for not just free parameters, but also for matrices and algebras as well. So if you want the confidence interval for a free parameter "a" divided by a variance "b", a/b in an mxAlgebra statement, add an mxCI statement for that algebra, and rerun your model with the intervals=TRUE option. Look at the help file for mxCI (type ?mxCI into R) for more info.

peno66's picture
Offline
Joined: 08/14/2011
Thanks!

Thanks a lot for your help and sorry about the word document (I have a Mac). I should have explained that I am a doctor and basically know very little about what you would refer to as basic mathematics or statistics. I understood that the transformation was linear, but was not sure about how the accurately transform the unstandardized CIs. I will make another try. I also understood that the line in my script including 1.96 created the 95% CI, but I didn't understand what in the script to put there from the script to get also the CIs for the standardized product? I've understood from studying the manual, and from the other threads, that the mxCI is used to get CIs but have no idea what to write. Will try your help file! So in summary I have a lot to learn. Is there a good site where all OpenMx work shops are listed? I'm from Sweden so somewhere in Europe would be very good (I have Googled so far). Finally, are there any good sites where demo scripts are stored? I'm very interested in investigating an association where the explaining variable is numeric and the outcome only could be yes or no (i.e. fracture or not during follow up). The script saved as .txt is enclosed.

AttachmentSize
Script handstyrka 110801.txt 12.24 KB