Beginning: Play Econometrics with R

More thanĀ  a month without updating... Yes, I was busy doing something else, and that was traveling. I was lucky enough to enjoy a period of free time, and relaxed myself pretty well.

Now it is the time to start something useful, since the spring festival has gone. I need to be responsible for my promise. Therefore, I choose to begin to write the brochure about econometrics and R, the most up-to date statistic software.

Name

Play Econometrics with R

I use "play" to avoid being responsible for any potential academic faults šŸ™‚ Indeed, I will correct the bugs as soon as I know.

Aim

In this brochure, I'll introduce typical econometric methods one by one and their realization in R. Of course, a huge volume of examples and data will appear (and that is the most knotty problem for me at the moment). I'll cover some public examples (i.e. published ones from current books,Ā  e.g Introductory Econometrics: A Modern Approach by Jeffrey M. Wooldridge), and also some meaningful ones (applications in different fields) from scholar articles with data published. I should admit it is a really challenging task, and I need many helps from friends.

Readers

I hope this brochure can be helpful for those groups:

  • the statistics students who begin to know andĀ  use econometrics, especially for economic problems.
  • the economics students who want to improve their analysis with a more powerful tool -- R, instead of Stata or SPSS.

This brochure will help the first group see how econometrics functions in economic analysis, and will bring introductory guide for the second group.

Remarks

More features needed to be announced here:

  • This brochure is totally free, and will published regularly on the Internet. If possible, it will be realized with the help through Git of Cos.name, the biggest online statistics community in China.
  • I'll use Latex (Lyx) + Sweave + R as my tools. For more information about this combination, please see here (in Chinese from Yihui's Blog) .
  • At present, this brochure will be written in Chinese (I'm really sorry). But after several revisions, and if anyone calls for needs, I will rewrite another version in English.

A speech on econometrics and R

From next week I'll go to Beijing and Shanghai respectively to give a speech on R. Yesterday I just finished the beamer for presentation in English. Not very long, because I'm afraid of making any serious mistakes.

Here I would like to list the outline.

Topic:

From Economics to R --Using R in Economics and Econometrics

(At first it was "Using R in Economics, Statistics and Econometrics". However, I think it is no good to mention "statistics" since I'm not professional in that area. The same to "economic statistics". Therefore I only mention economics and econometrics instead eventually.)

Outline:

1 Economics and Statistics

  • The Irreplaceable Support
  • Software about econometrics

2 Main Econometric Methods

  • Similar to statistics
  • Realization in R

3 Now Work with R!

  • Transfer the Data
  • Cooperate with LATEX
  • My own experience

Maybe the outline is a little too simple, but in fact I don't have too much to talk, since I'm a beginner of economics and R myself. I really appreciate the opportunity to give a speech on the 2nd Chinese R Conference, and I do hope that there will all right. Anyway, I have no better choice but do my best.

A more detailed post may appear after the lecture.

[2010.02. 20 Updated]

Probability, Information and Economics

These days I was busy reading the biography of John Maynard Keynes, the most famous economist in the past century. One point mentioned in that book attracted my attention -- that is about his ideas on probability.

Every one who has studied macroeconomics must know a word "rational expectations". That is a great issue if talked. Simply, as the wikipedia says,

To assume rational expectations is to assume that agents' expectations are wrong at every one instance, but correct on average over long time periods. In other words, although the future is not fully predictable, agents' expectations are assumed not to be systematically biased and use all relevant information in forming expectations of economic variables.

HereĀ  I do not want to say much about it. I'd like to mention another area, Information Economics. Typically, information economics deals with the situation that there is asymmetric information between principal and agent. Then as we all know, there is moral hazard and adverse selection. With the application of game theory, the common issues can be solved. However, seldom do I read paper discussing about the role of information in economic activities in other approaches. Therefore, followed Keynes' idea, I wonder what will happen if the spread of information is introduced into the economic activities.

Simply, probability reflects the situation that we do not know enough about how the real world functions. Therefore, we use probability to describe the combination every possible result. There is an interesting question: the normal distribution. I'll talk about it later on.

As the aim of science, we are pursuing the ability to predict. I know many people will have different ideas, but it does not matter much. At least, we want to know the mechanisms in every particular field. That is, we are pursuing "certainty" instead of "uncertainty". From uncertainty to probability, then to certainty, in this way we know much better about the real world. It is an old philosophic issue: is there a fixed point?

Then what will happen if the knowledge spreads? I have not got a clear understanding yet. The disappearance of probability is too hard to imagine. We can use "normal distribution" to describe some phenomenons, such as people's height, weight. The result is a description of a group, but not that accurate for a particular person. To predict a person's height, for example, we should get enough information, if applicable, his gene, his nutrition, and what he did in the past... Maybe it is too hard to define what is "enough". Anyway, the probability can be replaced under a special circumstance.

In the first step, I want to talk about how the spread of information influences the social activities. I think we have underestimated the importance of information in economics, or we have no applicable models to explain. I do not know whether more modern mathematical tools are needed in the explanations. As least, I need to read more about the history of probability, including the famous debate between frequency school and Bayesian. And maybe more knowledge about psychology and communication are essential. I want to talk about it later after learning measure theory.

New experience with LyZ!

Today I find a wonderful plugin for Zotero and LyX. In fact, it integrate Zotero and LyX via LyXServer. Therefore we can cite the reference stored in Zotero more easily!

From the author's website, its main features are:

  • Inserting citations to LyX from Zotero.
  • BibTeX database automatically updated when citation is inserted.
  • BibTeX database can be updated when the references in Zotero are modified.Get Zotero
  • Custom BibTeX key format.
  • Unique BibTeX key check.
  • Synchronization of BibTex keys between LyX document, BibTeX database and LyZ.
  • Editing of master/child documents (the same BibTeX database) and multiple documents (different BibTeX database for each document).
  • Persistent association of LyX documents and BibTeX databases.
  • Support for group cooperation.

They are really cooooool, aren't they?

After an easy installation, I start my journal with LyZ.

How easy? See the screenshots!

Snap333

Snap334

Sorry these screenshots are noted in Chinese. In fact if you are looking for more details about it, you can either visit the author's webpage (in English) or see my Chinese blog:

  1. a brief introduction
  2. Chinese translation of its official explanations.