Saturday, January 30, 2010
An example of MCMCglmm
Here is a very useful example of how to estimate multinomial logit with random effect using MCMCglmm package.
Friday, January 29, 2010
Thursday, January 28, 2010
Wednesday, January 27, 2010
IPad
Apple's new toy, ipad, looks interesting. But 10 hour's battery life per charge seems to be less impressive than I originally thought. Some laptop computers can do that. Also, I was surprised to find out its operating system is IPhone OS instead of OSX.
Being an Apple product also means that, in order to do anything useful, you have to buy and buy and buy...
Monday, January 25, 2010
Submitting to a sociology journal
This blog has some useful information for those who are thinking about submitting to a sociology journal.
Monday, January 18, 2010
Wednesday, January 13, 2010
Word count for PDF (LaTeX) file
Friday, January 08, 2010
Thursday, January 07, 2010
Wednesday, January 06, 2010
Apophenia
The January 2010 source release of the Apophenia library cannot be compiled on my Ubuntu machines (64-bit 9.10 and 32-bit 9.04); but the developmental version (downloaded via git) compiles flawlessly. Not sure what is going on.
R AnalyticFlow
R AnalyticFlow is an interesting piece of software. From its web site:
"R AnalyticFlow is a software which enables
state-of-the-art data analysis by drawing analysis flowcharts.
You can effectively share processes of data analysis
in collaborative works"
state-of-the-art data analysis by drawing analysis flowcharts.
You can effectively share processes of data analysis
in collaborative works"
Monday, January 04, 2010
A customized Ubuntu-based Chinese distro
Linux Deepin looks promising. But it does not seem to provide a 64-bit version.
Sunday, January 03, 2010
Friday, January 01, 2010
Create LaTeX table for descriptive statistics using Estout
I want to create a table of descriptive statistics. To be more specific, The table should contains 6 rows and 4 columns, something like this:
Descriptive Statistics
-----------------------------------------------------------
Cohort A Cohort B Cohort C
-----------------------------------------------------------
Urban Residence 0.263 0.313 0.264
Years of Schooling 5.585 7.280 7.592
Ethnic Majority 0.928 0.918 0.915
Want Children 0.990 0.992 0.991
Ever Pregnant 0.991 0.987 0.992
-----------------------------------------------------------
Observations 3553 2450 4694
-----------------------------------------------------------
The official document for Estout provides some clues but does not make it crystal clear. Here are the steps I followed:
- Generate an arbitrary variable;
- Run regression, separately for each cohort;
- Collect the results;
- Make the table
Here are the code:
eststo clear
gen y=uniform()
quietly regress y urban eduy han want_birth preg if cohort==1, noconstant
estadd mean
eststo d1
quietly regress y urban eduy han want_birth preg if cohort==2, noconstant
estadd mean
eststo d2
quietly regress y urban eduy han want_birth preg if cohort==3, noconstant
estadd mean
eststo d3
esttab d1 d2 d3, cells(mean(fmt(%8.3f))) label nonotes nonumber nodepvars mtitles("Cohort A" "Cohort B" "Cohort C") width(1\hsize) title(Descriptive Statistics)
Subscribe to:
Posts (Atom)