Skip to content

Social contagion story update

June 8, 2011

July last year I wrote a note about the stream of papers by Nicholas Christakis and James Fowler (or CF) and coauthors on social contagion of many things (obesity, smoking, loneliness to name the few). I also wrote about a paper by Russel Lyons that provided a detailed critique of the analyzes presented in the papers by CF. See my earlier post for details.

Meanwhile, the paper by Lyons, which was available through ArXiv repository since July last year, got published in Statistics, Politics, and Policy journal here (thanks to Ilan Talmud for noticing that). All the substantial points remained largely unchanged as compared to the ArXiv paper. However, the author supplemented the paper with a truly hair-raising account of the struggle he had to go through to publish the paper: rejections from several journals without reviews or even reasonable explanations. I definitely recommend reading it.

Using the occasion, I also recommend two other papers related to this “debate”:

The first one is a response of Christakis & Fowler to some other critical comments on related issues:

Fowler, James H. and Nicholas A. Christakis. 2008b. “Estimating peer effects on health in social networks: A response to Cohen-Cole and Fletcher and Trogdon, Nonnemaker, and Pais.” Journal of Health Economics 27:1400–1405.

The second one is by Hans Noel and Brendan Nyhan

The “Unfriending” Problem The Consequences of Homophily in Friendship Retention for Causal Estimates of Social Influence” (download)

in which they use MCMC simulations to show, in short, how network homophily could have confounded the purported contagion effects reported in the studies by CF.


Origins and evolution of “The Evolution of Cooperation”

April 21, 2011

Robert Axelrod, the pioneer of studying the evolution of cooperation and the organizer of the famous Prisoners Dilemma (PD) tournament, and author of “The Evolution of Cooperation”, wrote a very nice piece summarizing his research on the topic as well as a little bit of his own history behind it. Among other things, you will find an interesting accounts of where the inspiration for studying PD and the tournament itself came from, as well as experiences of a collaboration with William D. Hamilton, a famous evolutionary biologist.

Apart from the cooperation topic per se what I find especially interesting is that the text convincingly shows the great merits and excitement of doing interdisciplinary research (in this case on the boundaries of social sciences, biology and artificial intelligence). Moreover, the strengths of mathematical modeling in the social sciences.

It was also funny for me to learn that prior to organizing the iterated PD tournament Axelrod asked some famous people to play the iPD against the computer. One of those persons was James Coleman. He is reported to have said that  “I am doing better than computer, so I guess I’m doing fine”…

The text: Launching “The Evolution of Cooperation”.

R Studio

March 8, 2011
R Studio on MS Windows

R Studio on MS Windows












If you think that R is The EnvironmentForStatisticalAnalysisAndGraphics but you do not think that Vim is The Editor for text files you might want to have a look at R Studio. It works on Windows, MacOS and Linux. I tried it out on my Ubuntu and it looks and works brilliantly. See more screenshots here. I will seriously consider it for teaching R.

My fingers are already addicted to Vim, so I do not plan to switch to any alternative interface any time soon.

Math in the social sciences, with discussion

March 8, 2011

Nice discussion on the usefulness, or lack thereof, of mathematics and formal theory building in the social sciences. Make sure you have a look at the comments. More or less chronologically:

With some appraisal here, here, and to some extent here.

Somewhat in parallel, a discussion about the death of theoretical (read mathematical) economics at econlog:

All in all, I subscribe to Fabio’s call with both hands.

My subjective list of advantages of formal theory building in social sciences supplementing the one at

  1. If a theory is, among other things, a logically coherent set of propositions then formalizing it is just a translation to a language that makes analyzing it, especially deducing consequences, much easier. And this applies to whatever the subject of the theory is.
  2. Most of the empirical studies in sociology are analyzed using some form of statistical reasoning, which is mathematical. Given that, building a formal theory of the studied phenomenon should in principle allow for a tighter connection between the theory and empirics (c.f. The Theory-Gap in Social Network Analysis by Mark Granovetter).
  3. I would also add the “accumulativeness”, much in the line of Formal Rational Choice Theory: A Cumulative Science of Politics by  David Lalman, Joe Oppenheimer, and Piotr Swistak. Although, I have to admit, after having spent 5 years or so studying mathematical sociology and selective works from mathematical economics, the cumulation is sometimes difficult to observe from a local point of view and local time scale of individual researcher. There are so many specific models (strong assumptions etc.), and it is frequently hard to understand the bigger picture. Perhaps it is just the question of time for a “unification” to arrive, … or a researcher…
  4. ?

March 6, 2011

Od niedawna jestem współautorem na blogu na Z tego względu przenoszę całe swoje pisanie po polsku tam.

Recently a became a co-author of the blog at Consequently, I am going to migrate all my polish writing there.

Culturomics: 5,195,759 digitized books analyzed, see for yourself

December 17, 2010

E-rumors spread some time ago that Google launched a project to digitize all the books there are. Recent issue of Science magazine contains an article reporting an analysis of 5 million digitized books, which, according to Google, accounts for around 4% of all the books ever published. By tracing word or phrase sequences through years 1800-2000 you can fantastically trace the evolution of culture throughout XIX and XX century. They used it to show for example that:

  • 500 000 words in English are missed by all dictionaries
  • evolution of language, like popularity of forms “burned” vs “burnt”
  • popularity of artists, scientists, politicians.
  • and more…

The project is called Culturomics. The Books Ngram Viewer, a tool to visualize word and phrase frequencies in the dataset, not unlike Google Trends for the search keywords, is publicly available. Check it out! It’s very addictive. Some examples:

Any other examples of nice dynamics?

R with Vim

December 2, 2010
tags: ,

For all those who think that Vim is The Editor for text files, and simultaneously think that R is The EnvironmentForStatisticalAnalysisAndGraphics.

After trying out various options for intergrating Vim with R I settled on the following configuration:

  1. Use Vim-R-plugin for editing R code files, R documentation files (*.Rd) as well as the Sweave files. Apart from syntax highlighting the plugin allows to open an R console in a separate window and operate it with keyboard shortcuts from Vim (no need for frequent alt-tabbing etc.). Among other things you can:
    • Execute individual code lines, visually selected portions, or whole R code files in the R console.
    • Putting a cursor on a function name in the code file and: display its R help page, or display function arguments (through args()).
    • Put a cursor on any R object in the code file and perform frequently used functions: str, summary, plot, print, names…
    • List the content of the R Workspace
    • Clean the R Workspace
  2. I use Sweave quite extensively. For Sweave files the Vim-R-plugin provides the same keyboard mappings as for the R code files as well as nicely highlights both the LaTeX code and the R code in the code chunks. As my Sweave files have mostly LaTeX code with rather short R code snippets I would like to take advantage of another Vim plugin: the LaTeX-Suite. By default Vim will not load the Latex-suite for Sweave files, which is a HUGE disadvantage.

Vim and R using Vim-R-Plugin in action

Here is a way how to use both plugins simultaneously for Sweave files. The instruction applies to Ubuntu (so probably any Linux-like system). On Windows the ‘~/.vim’ directory corresponds to the ‘vimfiles’ directory, which most likely is something like ‘c:\Program Files\Vim\vimfiles’. So:

  1. Install Vim-R-plugin normally.
  2. Install Latex-suite normally.
  3. In ‘~/.vim/ftplugin’ remove the symbolic link ‘rnoweb.vim’ and replace it with a normal text file with the following content:
runtime! ftplugin/r.vim
runtime! ftplugin/tex_latexSuite.vim

This will essentially load both plugins one after another. QED.


See here how to set it up on Mac

%d bloggers like this: