Can We do Better than R-squared?

Tom Hopper

If you’re anything like me, you’ve used Excel to plot data, then used the built-in ?add fitted line? feature to overlay a fitted line to show the trend, and displayed the ?goodness of fit,? the r-squared (R2) value, on the chart by checking the provided box in the chart dialog.

The R2 calculated in Excel is often used as a measure of how well a model explains a response variable, so that ?R2 = 0.8? is interpreted as ?80% of the variation in the ‘y’ variable is explained by my model.? I think that the ease with which the R2 value can be calculated and added to a plot is one of the reasons for its popularity.

There’s a hidden trap, though. R2 will increase as you add terms to a model, even if those terms offer no real explanatory power. By…

Ver o post original 1.248 mais palavras

Instalando o LaTeX

Dica do Hyneman, que tem um ótimo site sobre previsão e estatística (inclusive com livro-texto grátis). LaTeX é uma linguagem de marcação que facilita na hora de escrever artigos com fórmulas. Você escreve o texto usando os marcadores e depois um programa “traduz” para o formato de revista tradicional.

MS-​​Windows

Down­load and run the setup pro­gram for Mik­TeX. Choose the “basic” system.

Down­load and run the installer pro­gram for TeXs­tu­dio.

Then run TeXs­tu­dio and start typing.

via Hyndsight – Getting a LaTeX system set up.

How Economists Convert Quarterly Data into Monthly: Cubic Spline Interpolation

Só repassando esse achado que fiz procurando um método de mensalização (dados trimestrais para mensais) aqui na empresa. Usem com cuidado!

Columbia Economics, L.L.C.

(Update: Please note that cubic spline interpolation can only provide estimates of data between known data points. It cannot “create” unknown data. For example, if only annual figures exist for your data set, then annual observations are the only real data. Cubic splining between them to generate monthly estimates is only an approximation technique, and does not provide new actual monthly figures). For this reason, the below method may not be appropriate for all research purposes.)

A common problem economists face with time-series data is getting them into the right time interval. Some data are daily or weekly, while others are in monthly, quarterly or annual intervals. Since most regression models require consistent time intervals, an econometrician’s first job is usually getting data into the same frequency.

In this post I’ll explain how to solve a common problem we’ve run into: how to divide quarterly data into…

Ver o post original 994 mais palavras

Filtro de Hodrick-Prescott no Excel

Um pouco fora da minha área certamente mas estou sempre pronto a apreciar boa programação e facilidade de uso. Se você precisa tirar a tendência de uma série com o filtro HP e quer a facilidade do Excel, ou quer usar em um ambiente de trabalho onde os programas são controlados, fica a dica do site abaixo. Ele explica onde baixar o add-in e como utilizar. Testado e aprovado.

There is a how to use PDF, short, says you give it a range of cells and a number (a constant). The long version: Select a range of cells for your results, type =HP( , select the range of cells containing the data to be filtered, type in a comma, type in the constant, and close the parentheses. But don’t hit ENTER.

Instead, hold down CTRL and SHIFT and then press ENTER. That’s it. Then you can make a graph or whatever, from the results.

Holding down CTRL and SHIFT while you press ENTER is standard Excel stuff. They call it “array formulas” which sounds pretty complicated… but all you have to do is hold down CTRL and SHIFT while pressing ENTER. How complicated is that?

None of that works, though, if you don’t have the Hodrick Prescott filter installed. No problem. Among the search results is a link to Kurt Annen’s HP-Filter Excel Add-In at IDEAS. There are three separate files you can download:

1. an XLA file, an Excel add-in which adds the HP( ) function to the built-in Excel functions.

2. the Visual BASIC source code for the HP( ) function.

3. an example.

For most people the simple thing would be to install the add-in. (The PDF linked above tells how.) For me, the simple thing was to copy the Visual BASIC source code and paste it into a code module. That way I got to look the code over a bit. It looks like a very complicated (arithmetically) version of a “moving average” calculation, or something comparable. That’s a crude description; I didn’t work through all the arithmetic. But the result you get from the HP filter serves the same sort of purpose as the result you get from the moving average calc.

Anyway, after it’s installed one way or the other, it’s as easy to use as =SUM( ) or any other Excel function. I expect to explore it, and to use it.

What number do you use for the constant?… for the “Lambda” as they call it?

Rule of thumb is:

Lambda = 100*(number of periods in a year)^2

There is additional research that suggests using a power of 4 instead of 2. See Ravn and Uhlig (2002). http://ideas.repec.org/a/tpr/restat/v84 … 1-375.html

via The New Arthurian Economics: De-Trending.

Modelagem baseada em agente: primeiros passos

Aqui o Understanding Society mostra um bom guia para começar a olhar estes modelos baseados em agente que falei na semana passada e coloca algumas dúvidas sobre a viabilidade do projeto. Para ele (e concordo) quando os agentes são homogêneos podemos usar uma abordagem agregada. Mas quando é que algo é homogêneo? Me parece possível encaixar preceitos evolucionistas nessa abordagem.

Agent-based modeling is an intriguing new set of tools for computational social science. The techniques permit us to project forward the system-level effects of a set of assumptions about agent behavior and a given environment. What kinds of real social phenomena are amenable to treatment by the techniques of agent-based modeling? David O’Sullivan and his co-authors offer an assessment of this question in their contribution to a valuable recent handbook, Heppenstall et al, Agent-Based Models of Geographical Systems. (Andrew Crooks and Alison Heppenstall provide a valuable and clear introduction to ABM methodology in their contribution to the volume.)

via UnderstandingSociety: Domain of agent-based modeling methods.

Citando um post do twitter

Bluebird 1

Ainda não cruzei com nenhum tuíto citável em artigo, tese, etc. que não fosse apenas um link para algo maior, mais tradicionalmente citável (como uma página em um site – muito tradicional…). Fica a dica para o futuro, é até bem simples e bastante lógico.

The Modern Language Association likes to keep up with the times. As we all know, some information breaks first or only on Twitter and a good academic needs to be able to cite those sources. So, the MLA has devised a standard format that you should keep in mind. Its form is:

citation-style2_615.jpg

via The Atlantic – How to cite a tweet in an academic paper

Peer-reviewed?

Algumas visões sobre a evolução do processo de publicação de artigos acadêmicos (peer-review). O único serviço prestado pelos jornais atuais é emprestar sua credibilidade. E cobram caro por isso, considerando que não pagam escritores, revisores e editores. Mesmo eu, logo após ter meu único artigo em co-autoria rejeitado pela publicação, fui convidado a revisar outro artigo. Por outro lado, jornais abertos ainda não tem credibilidade. Como conciliar novas teconologias de publicação e maior abertura na comunidade científica? Alguns pontos de partida nos artigos citados abaixo.

Of course, since the new technologies are making an overhaul of the system possible, and since there is widespread frustration with the current modus operandi especially among younger faculty, change will happen one way or another — witness the rise of open access and online journals that bypass traditional publishers. It’s only a question of which paths to take, and that’s where the conversation gets interesting.

via Rationally Speaking: Radical reform for peer review?.

Uma forma de modernizar e aprofundar o sistema é o utilizado pela revista Kairos. E se pudermos ir além acrescentando a credibilidade dos próprios institutos. E o Scielo? E o sistema do ExpressO no Direito?

Kairos uses a three-stage review process. First, editors decide if a submission makes sense for a review. Then, the entire editorial board discusses the submission (online) for two weeks, and reaches a consensus that is communicated to the author with detailed letters from the board. (Board members’ identities are public, so there is no secrecy about who reviews pieces.) Then, if appropriate, someone is assigned to work with the author to coach him or her on how to improve the piece prior to publication.

via Humanities scholars consider the role of peer review | Inside Higher Ed.

Por fim, a opinião do Krugman sobre o assunto, incluindo a questão da política dos departamentos e das publicações:

So, the starting point for me, when thinking about how economics works as a discipline, is to realize that the traditional model of submit, get refereed, publish, and then people will read your work broke down a long time ago. In fact, it had more or less fallen apart by the early 80s.Even then, nobody at a top school learned stuff by reading the journals; it was all working papers, with the journals serving as tombstones.

via Open Science And The Econoblogosphere – NYTimes.com.

Outra ideia interessante: posições rotativas de autor:

The way it works now is you write a paper then you send it to a journal and they review it and decide whether to publish it.  The basic unit is the paper.  What if we made the author the basic unit?  Instead of inviting submissions, Econometrica invites applications for the position of author.  Some number of authors are accepted and they can write whatever they want and have it published in Econometrica. The term would be temporary, maybe 1 year.

via Cheap Talk.

Leiam também isto. Trata-se de uma proposta de boicote à Elsevier. Alguns cientistas já declararam apoio e outros já se pronunciaram contra.