Saving posteriors with ESTIMATOR = BAYES PreviousNext
Mplus Discussion > Structural Equation Modeling >
 Mike Zyphur posted on Friday, March 09, 2012 - 9:39 am
Hi Linda and Bengt,
Is there any way to retrieve the posterior estimates from MCMC estimation that are used to populate the graphs of their distribution? It would be great for manually testing hypotheses regarding the probability that a parameter is in a specific region.

 Linda K. Muthen posted on Friday, March 09, 2012 - 4:06 pm
You can use the BPARAMETERS option of the SAVEDATA command:

BPARAMETERS = filename;

You will get the Bayesian iterations saved into that file. It is the same information that is used to plot Bayesian posterior distribution plots and Bayesian tracelines. In Version 6.12, we show in the summary the order the parameters are saved.
 S.Arunachalam posted on Friday, July 05, 2013 - 10:00 am
Hello Prof. Muthen,
I am using Bparameters to save the Bayesian parameters. However the Mplus code doesn't run when I use OUTPUT statement along with SAVEDATA: BParamaters statement?
The reason I am using OUTPUT is to request for STDYX parameters as well.

 Linda K. Muthen posted on Saturday, July 06, 2013 - 6:36 am
Please send the output and your license number to
 Scott R. Colwell posted on Wednesday, August 13, 2014 - 6:46 pm
For an ALT model, is it possible to save the posterior distribution of the estimated means of the time points?

I figured out how to get the posterior distribution for intercepts of the time points using BPARAMETERS but I'm wondering if you can get the estimated means (ie: those plotted in the estimated means plot)
 Bengt O. Muthen posted on Thursday, August 14, 2014 - 3:22 pm
You can express the estimated means in Model Constraint using parameters labeled in the Model command and making the estimated means "NEW" parameters.
 Scott R. Colwell posted on Thursday, August 14, 2014 - 7:37 pm
Perfect thank you.

May I just check with you that the slight differences I have in my output estimates (using Model Constraint) versus the values from the save plot data output (from the estimated means plot) are likely just rounding errors.

The plot data, which goes to 5 decimal points, shows time0 through time5 as:

-0.64379, -0.73301, -0.82224, -0.91146, -1.00068, -1.08991

In the output using the model constraints option, which is presumably calculating off of 3 decimal places, I get:

-0.644, -0.725, -0.825, -0.898, -1.001, -1.112

I am estimating these values in the model constraint as follows with [i] (p1) and [s] (p2);

MUi = p1;
MUs = p2;
EMt0 = MUi;
EMt1 = EMt0 + 1*MUs;
EMt2 = EMt0 + 2*MUs;
EMt3 = EMt0 + 3*MUs;
EMt4 = EMt0 + 4*MUs;
EMt5 = EMt0 + 5*MUs;

Thanks again.
 Scott R. Colwell posted on Thursday, August 14, 2014 - 7:41 pm
Sorry I should have also clarified that I removed the autoregressive paths from the ALT model for the above.
 Bengt O. Muthen posted on Friday, August 15, 2014 - 7:55 am
Model Constraint does not use only 3-digit estimates. We need to see the full output to understand the difference. Send to support.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message