Saturday, January 31, 2009

LaTeX file management using Subversion

Here are several helpful articles on this topic:

Geany is a saver

Again, I find Geany is a very convenient IDE tool to work with single file C programs such as those provided with the Apophenia library. With compiler command of "gcc -Wall -std=c99 -c -lapophenia -lgsl -lgslcblas -lsqlite3 "%f"" and build command of "gcc -Wall -std=c99 -lapophenia -lgsl -lgslcblas -lsqlite3 -o "%e" "%f"", it saved a lot of typing.

C99 vs. C90

In playing with the source code coming with the book "Modeling with Data" on my Ubuntu box, I discovered one thing: code looks like this:

for (int i = 0; i < N; i ++) {

does not work with the default gcc command line options and issues error message of "Error: 'for' loop initial declaration used outside c99 mode".

The way to fix is either to change the code to:

int i;
for (i = 0; i < N; i ++) {

or put a "-std=c99" in the command line switch and do nothing with the source code.


This is the place to look for Linux-based netbook computer:

Some important tips to unleash the full Linux power on EeePC:

Thursday, January 29, 2009

On "average causal effects"

Schafer and Kang compared the following methods of estimating average causal effects:
  1. Simple difference in means;
  2. Regression and ANCOVA;
  3. Regression estimation;
  4. Matching;
  5. Inverse-propensity weighting;
  6. Subclassification;
  7. Weighted residual bias corrections;
  8. Weighted regression estimation;
  9. Regression estimation with propensity-related covariates.
I like No. 9 and plan to begin from there.

Atom Is Going to Hurt Software Industry?

This guy is being ridiculous:

Somebody once said that Linux was goint to hurt the software industry...

Wednesday, January 28, 2009

HP Mini 1000 Mi Edition

For a Linux-based low-cost netbook, this seems to be the way to go:

Just found that that the command line interface was disabled in this version and users cannot install their own application (, are they kidding? 

Monday, January 26, 2009

A Software Populist Who Doesn’t Do Windows

ADMB-RE examples

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.

Saturday, January 24, 2009

Reading objects into R

This file ( can be tailored to read results of other formats (i.e. aML) into R for further manipulation.

Also the package "X2R" ( However, this package does not seem to work with GCC 4 yet (it worked with MingW fine, which has GCC 3, but not on my Ubuntu, which has GCC 4).

Ubuntu on Dell Mini 9

AD Model Builder, revisted

Following the instruction (, I got ADMB installed and running on my Ubuntu laptop. I have not spent much time on it, but its design philosophy, convert text input into C++ source file and then compile and run the resulted C++ file, seems to be promising, and is certainly advantageous over its competitor with regard to performance. After all, what runs faster than fully optimized C++ code?

It also works on Windows using MingW. 

Here is the interface between ADMB (and a few other languages) and R:

This is an Emacs editing environment for ADMB:, but the Emacs version is quite old. 

This is the ADMB random effect modeling homepage:

Wednesday, January 21, 2009

Obama's inaugural speech

The Frailty Model

This is a very good book:

Unfortunately, the sample programs provided at the web site are limited to the first five chapters and the really fun stuffs such as multifrailty model, multilevel frailty model, correlate frailty model, and joint modeling are not there. This is surprise because none of the stuff is impossible to implement with currently available software.

Monday, January 19, 2009

C vs. Fortran

How to write a lot

A good (although short) book on academic writing, highly recommended:

Data Analysis and Graphics Using R

Good book. 


JAGS ( is a cross-platform version of BUGS, which can only be used on Windows. There are couple of R packages that can be used to bridge JAGS and R to facilitate convergence diagnosis and results presentation. 

Thursday, January 15, 2009

Books to check out tomorrow

  1. Resampling methods : a practical guide to data analysis / Phillip I. Good (QA278.8 .G66 2006)

Tuesday, January 13, 2009

Note taking

I have tried various note taking software and eventually settled with Google Notebook because
  1. It is free;
  2. It is cross-platform;
  3. It is very lightweight;
  4. It is evolving.

Monday, January 12, 2009

Relative distribution as a way to look at famine mortality?

I am not sure. It is difficult to tackle the issue of the differential mortality caused by famine. Maybe it can be reduced to a series of statistical simulations and look at the relative distribution of some health indicators. I need to put more thoughts in this.

Saturday, January 10, 2009

Why R is bad

A funny post:

Wednesday, January 07, 2009

R on New York Times

It generated a great deal of interest on the R mailing list.

Saturday, January 03, 2009

Modeling with Data

Good book for scientific computing:


Demography accepts PDF submission, which is almost the same thing as accepting LaTeX. I am going to make a LaTeX style file based on the one for Political Analysis.

Thursday, January 01, 2009

Exciting new begining

I was quite depressed yesterday because the sex ratio research did not go as well as I expected. But earlier today I have some exciting new results regarding another paper, an extension of my famine research, and the new year does represent an exciting new beginning.