UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

Mplus FAQ
How can I obtain bootstrap standard errors in Mplus?

Consider this seemingly unrelated regression using Stata.

use http://www.ats.ucla.edu/stat/stata/notes/hsb2
sureg (read write math science) (socst write math science)
Seemingly unrelated regression
----------------------------------------------------------------------
Equation          Obs  Parms        RMSE    "R-sq"       chi2        P
----------------------------------------------------------------------
read              200      3    6.930412    0.5408     235.54   0.0000
socst             200      3    8.180626    0.4164     142.73   0.0000
----------------------------------------------------------------------

------------------------------------------------------------------------------
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
read         |
       write |   .2376706   .0689943     3.44   0.001     .1024443    .3728968
        math |   .3784015   .0738838     5.12   0.000     .2335919    .5232111
     science |   .2969347   .0669546     4.43   0.000     .1657061    .4281633
       _cons |   4.369926   3.176527     1.38   0.169    -1.855954    10.59581
-------------+----------------------------------------------------------------
socst        |
       write |   .4656741   .0814405     5.72   0.000     .3060536    .6252946
        math |   .2763008   .0872121     3.17   0.002     .1053682    .4472334
     science |   .0851168   .0790329     1.08   0.281    -.0697848    .2400185
       _cons |   8.869885   3.749558     2.37   0.018     1.520886    16.21888
------------------------------------------------------------------------------

You could preface the command with the bootstrap prefix, as illustrated below, to obtain bias corrected bootstrap standard errors based on 20,000 replications.

bootstrap, reps(20000) bca: sureg (read write math science) (socst write math science)
Seemingly unrelated regression
----------------------------------------------------------------------
Equation          Obs  Parms        RMSE    "R-sq"       chi2        P
----------------------------------------------------------------------
read              200      3    6.930412    0.5408     235.54   0.0000
socst             200      3    8.180626    0.4164     142.73   0.0000
----------------------------------------------------------------------

------------------------------------------------------------------------------
             |              Bootstrap
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
read         |
       write |   .2376706   .0689077     3.45   0.001     .1026139    .3727272
        math |   .3784015    .072022     5.25   0.000     .2372409    .5195621
     science |   .2969347   .0732453     4.05   0.000     .1533766    .4404928
       _cons |   4.369926   2.958737     1.48   0.140    -1.429093    10.16894
-------------+----------------------------------------------------------------
socst        |
       write |   .4656741   .0915943     5.08   0.000     .2861525    .6451957
        math |   .2763008   .0941304     2.94   0.003     .0918087    .4607929
     science |   .0851168   .0842935     1.01   0.313    -.0800954     .250329
       _cons |   8.869885   3.412316     2.60   0.009     2.181869     15.5579
------------------------------------------------------------------------------

The same analysis can be run in Mplus and obtaining bias corrected standard errors. Here we run this based on the hsb2.dat data file. Note that in the analysis section we use the bootstrap = 20000; command to request 20,000 bootstrap iterations, and then in the output section we use cinterval (bcbootstrap); to request confidence intervals using bias corrected bootstrap standard errors (by using bootstrap in place of bcbootstap we would get bootstrap standard errors that were not bias corrected).

As you compare the first analysis (with standard confidence intervals) with the second analysis (with bootstrap confidence intervals), note the slight discrepancies in the confidence intervals for _cons for the two equations.

Title: 
  Bootstrap standard errors. 
Data:
  File = hsb2.dat ;
Variable:
  Names = id female race ses schtyp prog read write math science socst;
  usevar = read socst write math science;
Analysis: 
  Type = meanstructure ;
  bootstrap = 20000;
model:
  read on write math science ;
  socst on write math science;
output:
  cinterval (bcbootstrap);

And here is the output.

MODEL RESULTS

                   Estimates     S.E.  Est./S.E.

 READ     ON
    WRITE              0.238    0.070      3.410
    MATH               0.378    0.072      5.271
    SCIENCE            0.297    0.073      4.052

 SOCST    ON
    WRITE              0.466    0.091      5.122
    MATH               0.276    0.094      2.931
    SCIENCE            0.085    0.085      1.004

 SOCST    WITH
    READ              18.286    4.168      4.387

 Intercepts
    READ               4.370    2.947      1.483
    SOCST              8.870    3.420      2.594

 Residual Variances
    READ              48.030    4.419     10.869
    SOCST             66.922    6.326     10.579


CONFIDENCE INTERVALS OF MODEL RESULTS

                   Lower .5%  Lower 2.5%  Estimates  Upper 2.5%  Upper .5%

 READ     ON
    WRITE             0.055       0.101      0.238       0.374      0.414
    MATH              0.200       0.240      0.378       0.521      0.566
    SCIENCE           0.101       0.148      0.297       0.434      0.478

 SOCST    ON
    WRITE             0.226       0.284      0.466       0.640      0.694
    MATH              0.036       0.093      0.276       0.461      0.523
    SCIENCE          -0.135      -0.083      0.085       0.249      0.303

 SOCST    WITH
    READ              8.219      10.776     18.286      27.222     30.064

 Intercepts
    READ             -3.200      -1.351      4.370      10.152     12.136
    SOCST             0.140       2.260      8.870      15.653     18.054

 Residual Variances
    READ             38.242      40.671     48.030      58.322     61.399
    SOCST            52.587      56.277     66.922      81.379     85.557

The first and last column represent the LCL and UCL for a 99% confidence interval, and the second and fourth columns represent the LCL and UCL for a 95% confidence interval. The middle (third) column contains the point estimate for each of the parameters.

Note how the Mplus confidence intervalue for the Intercepts change in a similar way to the Stata values for _cons when using the bootstrap confidence intervals.


How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.