Saturday, August 04, 2007

New data wave from CLHNS

New wave of the Cebu Longitudinal Health and Nutrition Survey is out. I need to update my data and run the Mplus program for catch-up growth and see if anything changes.

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.

Friday, July 27, 2007

LyX 1.50 is out, with unicode support

LyX 1.50 seems to be a real alternative to MS Office and OpenOffice for serious writing. Now it has unicode support built in. I have tried it on both Windows and Linux and it works jus fine. What I have not figured out is how to get the file compiled with LaTeX into DVI file correctly when there are double-byte characters (Chinese, for example).

Saturday, June 16, 2007

Output Stata results into LaTeX table

http://repec.org/bocode/e/estout/

Thursday, June 07, 2007

Freebasic


An easy-to-use programming language is an invaluable tool for quantitative social scientists. I have learned several programming languages including C/C++, Java, Python, Pascal. My favorite language right now is FreeBasic (http://www.freebasic.net/). It is highly compatible with the once widely used QBasic and is 100% free. There are several editors that can be used with FreeBasic on Windows, including the one I am using, FbEdit (http://www.radasm.com/fbedit/). The picture on the left shows how to debug a FreeBasic program using Insight, a frontend of GNU debugging tool, GDB.


Sunday, June 03, 2007

Editing and comparing huge text files

I need to work on several huge text files, each being around 30M in size. The work involves cleaning them and comparing to each other. I have worked with several pretty good text editors before, some are free while others are commercial. For this particular work, I tried ultraedit, emeditor, vedit, madedit, and multiedit. For text comparison, I tried beyond compare and ultracompare. Overall, I would say that the winner is multiedit, for several reasons. First of all, even though all the editors I tested can handle large files, the process is not painless. Most editors show a significant slowdown after loading the files, even on my core 2 duo machine with 2 GB memory. Multiedit does not have this problem. The 30 MB file loads instantly and can easily scroll to anywhere in the file without delays. Second, most editors have very limited file comparison functions built-in, and is not suitable for the work I have at hand. I tried ultracompare, but it did not work in the way it is supposed to, and I gave it up after trying for several times (not a very patient man). Beyond compare delivers good results, then I realized that multiedit has a copy of beyond compare built-in!

The price for multiedit is a bit steep. When most other editors cost around $50 or less, it costs three times of that price ($149). That is probably why it is not used as widely as it could have been...

Friday, June 01, 2007

Best Linux Distro

I began using Linux in 2000, when I was a graduate student at UCLA. Since I have tried various distros including SuSE (open SuSE), RedHat (Fedora), Mandrake, Turbolinux, Debian, Slackware. I even bought a copy of a now discontinuted distro named "libranet". I settled on OpenSuSE for the past several years until I discovered Ubuntu. I have been running Ubuntu 7.04 on my desktop for more than a month and it has been a very pleasant experience so far.

The next distro I want to try is PCLinuxOS. It looks very nice and (from various reviewers) it runs very fast. I am going to install it once I have a new machine. Maybe at that time, I can have a good answer about which is, between Ubuntu and PCLinuxOS, the best Linux distro.

Sunday, May 06, 2007

Drawing maps using Stata

Don't need expensive specialized GIS anymore, just Stata.

http://www.stata.com/support/faqs/graphics/tmap.html

Counter