Blog Archives

Inequalities and Quantile Regression

February 6, 2015
By
Inequalities and Quantile Regression

In the course on inequality measure, we've seen how to compute various (standard) inequality indices, based on some sample of incomes (that can be binned, in various categories). On Thursday, we discussed the fact that incomes can be related to different variables (e.g. experience), and that comparing income inequalities between coutries can be biased, if they have very different...

Read more »

Modeling Incomes and Inequalities

January 17, 2015
By
Modeling Incomes and Inequalities

Last week, in our Inequality course, we've been looking at data. We started with some simulated data, only a few of them > library("ineq") > load(url("http://freakonometrics.free.fr/income_5.RData")) > (income=sort(income)) 19233 23707 53297 61667 218662 How could we say that there is inequality in this sample? If we look at the wealth owned by the poorest, the poorest person (1...

Read more »

Automatic Detection of the Language of a Tweet

January 5, 2015
By

Two days ago, in my post to extract automatically my own tweets, and to generate some html list, I mentioned that it would be great if there were a function that could be used to distinguish tweets in English, and tweets in French (usually, I tweet in one of those two languages). And one more time, @3wen came to...

Read more »

An automatic code to extract tweets (and to produce the “Somewhere else” review)

January 3, 2015
By

A few weeks ago, I ask in a post the (simple) question "dear reader, who are you?" just to know more about the readers of my blog. I found that extremely interesting (even if - to be honest - I was expecting more answers to start a more serious sociological study of the readers of my blog). And an...

Read more »

Names in the U.S., from James Smith to Jose Rodriguez

December 7, 2014
By
Names in the U.S., from James Smith to Jose Rodriguez

Two weeks ago, @mona published an interesting post on her blog, about a difficult question, What’s The Most Common Name In America? There were stats about first names, in the U.S., and last names, too. Those informations are - somehow - easy to get. But usually, it is more complicated to get the first and the last name together....

Read more »

Subjective Ways of Cutting a Continuous Variables

December 2, 2014
By
Subjective Ways of Cutting a Continuous Variables

You have probably seen @coulmont's maps. If you haven't, you should probably go and spend some time on his blog (but please, come back afterwards, I still my story to tell you). Consider for instance the maps we obtained for a post published in Monkey Cage, a few months ago, The codes were discussed on a blog post (I...

Read more »

Confidence vs. Credibility Intervals

November 26, 2014
By
Confidence vs. Credibility Intervals

Tomorrow, for the final lecture of the Mathematical Statistics course, I will try to illustrate - using Monte Carlo simulations - the difference between classical statistics, and the Bayesien approach. The (simple) way I see it is the following, for frequentists, a probability is a measure of the the frequency of repeated events, so the interpretation is that parameters are...

Read more »

Reinterpreting Lee-Carter Mortality Model

November 18, 2014
By
Reinterpreting Lee-Carter Mortality Model

Last week, while I was giving my crash course on R for insurance, we’ve been discussing possible extensions of Lee & Carter (1992) model. If we look at the seminal paper, the model is defined as follows Hence, it means that This would be a (non)linear model on the logarithm of the mortality rate. A non-equivalent, but alternative expression...

Read more »

Excel (and French people) are such a pain in the…

November 6, 2014
By
Excel (and French people) are such a pain in the…

A few days ago, I published a post entitled extracting datasets from excel files in a zipped folder, because I wanted to use datasets that were online, in some (zipped) excel format. The first difficult part was the folder with a non-standard character (the French é). Because next week I should be using those dataset in a crash course...

Read more »

Shapefiles from Isodensity Curves

November 3, 2014
By
Shapefiles from Isodensity Curves

Recently, with @3wen, we wanted to play with isodensity curves. The problem is that it is difficult to get – numerically – the equation of the contour (even if we can easily plot it). Consider the following surface (just for fun, in order to illustrate the idea) > f=function(x,y) x*y+(1-x)*(1-y) > u=v=seq(0,1,length=21) > v=seq(0,1,length=11) > f=outer(u,v,f) > persp(u,v,f,theta=angle,phi=10,box=TRUE, +...

Read more »