Showing posts with label Mplus. Show all posts
Showing posts with label Mplus. Show all posts

Monday, May 16, 2011

Replicating multilevel analysis Mplus results

Since I am relatively unfamiliar with Mplus, The first step toward building a complicated model is to replicate some simpler results using statistical packages I have more knowledge on such Stata and R, then build it up piece by piece. 

As the effort to understand the multilevel mixture modeling capacity of Mplus, I have decided to use the Mplus sample data set, "ex10.1.dat", to try alternative model specifications in both Mplus, Stata and R. I am going to post a series of code and results. 

As the first step, I try this really simple Mplus code: 
-----------------------------------------------------------
DATA: FILE IS ex10.1.dat;
VARIABLE: NAMES ARE y x1 x2 w class clus;
USEVARIABLES = y x1 x2;
WITHIN = x1 x2;
CLUSTER = clus;
ANALYSIS: TYPE = TWOLEVEL;
STARTS = 0;
MODEL:
%WITHIN%
y ON x1 x2;
%BETWEEN%
y ON ;
-----------------------------------------------------------
which gives exactly the same results as the following Stata code: 
-----------------------------------------------------------
xtreg y x1 x2, i(clus) mle
-----------------------------------------------------------

Wednesday, May 04, 2011

Mplus for Bayesian analysis

The new Mplus has a quite rich set of Bayesian analysis feature. I cannot wait to play with it.

Thursday, March 19, 2009

LatentGold

The new version of LatentGold provides a command line interface. I found the syntax is quite intuitive and easy to learn. The fact that it also has a data viewer/editor is also an advantage, compared to Mplus.

Monday, February 09, 2009

Multilevel mixture model

The multilevel mixture model that Bengt and his group have been working on can be of significant importance to demographers, especially those who are obsessed with the idea of "frailty", like myself. I need to do more reading on this. 

Monday, January 26, 2009

Finite mixture modeling with ADMB

The one area that ADMB can potentially be of great importance is in those computation-intensive areas such as finite mixture modeling. I remember I used to run Mplus on a dual-core computer for days to estimate the sequential growth mixture model. Once I get some time, I will try to port my Mplus model into ADMB (if it is possible at all) and see how it compares with Mplus regarding computation time.

I hope open-sourcing ADMB does not mean stopping its development, as in the aML case. aML has some basic capabilities for finite mixture modeling, but it seems that the development is not going to continue.

Also, I wish the ADMB team can make available a more comprehensive set of examples, especially those with results that can be compared to other statistical packages such as R, Stata, SAS, even aML. This will certainly help gain more users outside fishery.

Tuesday, July 31, 2007

Mplus vs. aML

I am working on a joint model of miscarriage and child mortality. The idea is that higher rate of miscarriage may end up with a more highly selected newborns, who are less vulnerable to premture death. This is a Heckman selection type of model, with the exception that the main equation is a hazard model instead of a continuous model. I have been trying to make Mplus to do the job, as hinted by Bengt (http://www.statmodel.com/discussion/messages/11/740.html?1155563326). Then I got a direct response from Linda that this type of model cannot be estimated using Mplus (http://www.statmodel.com/discussion/messages/14/2459.html?1185842830). I guess this leaves me no other alternatives but to go to aML.

aML is a fine software. I used it in 2004 for a chapter of my dissertation (at that time it cost about 1,000 bucks). Now it is free and open-source, and everyone can look at the code (in FORTRAN) to see how certain things are done. I am a little surprised that it has not attracted more attention.

What I would really like to see is a wrapper program in Stata and can 1) export data to aML, 2) automatically generate sensible starting values and feed them to aML, and 3) gather coefficients estimated in aML for post-estimation manipulation.

If nobody has already started working on this, I might end up doing it myself.

Monday, December 11, 2006

Mplus vs. Stata for Heavy Computation

Both Stata and Mplus have multiple processor support. Stata/MP is licensed on per CPU basis, while Mplus is licensed on per machine basis, no matte how many processors a machine has. Combining a non-MP version of Stata and Mplus seems to provide an ideal solution for researchers who have to deal with complicated statistical models, especially those involve latent variables. One can use Stata for all the data manipulation and some light duty estimation, while relying on Mplus (on a fast core duo machine) for the heavy computation. The Stata ado file "stata2mplus.ado", provided by the ATS computing at UCLA provides an ideal solution to bridge the two packages.

Counter