1487 search results for "regression"

Generate Quasi-Poisson Distribution Variable

June 4, 2012
By

Most of regression methods assume that the response variables follow some exponential distribution families, e.g. Guassian, Poisson, Gamma, etc. However, this assumption was frequently violated in real world data by, for example, zero-inflated overdispersion problem. A number of methods were developed to deal with such problem, and among them, Quasi-Poisson and Negative Binomial are the most popular methods perhaps due...

Read more »

Fama-MacBeth and Cluster-Robust (by Firm and Time) Standard Errors in R

June 2, 2012
By
Fama-MacBeth and Cluster-Robust (by Firm and Time) Standard Errors in R

Ever wondered how to estimate Fama-MacBeth or cluster-robust standard errors in R? It can actually be very easy. First, for some background information read Kevin Goulding’s blog post, Mitchell Petersen’s programming advice, Mahmood Arai’s paper/note and code (there is an earlier version of the code with some more comments in it). For more formal references you may want to

Read more »

Example 9.33: Multiple imputation, rounding, and bias

May 29, 2012
By
Example 9.33: Multiple imputation, rounding, and bias

Nick has a paper in the American Statistician warning about bias in multiple imputation arising from rounding data imputed under a normal assumption. One example where you might run afoul of this is if the data are truly dichotomous or count variables, but you model it as normal (either because your software is unable to model dichotomous...

Read more »

Optim, you’re doing it wrong?

May 28, 2012
By
Optim, you’re doing it wrong?

Call me uncouth, but I like my TV loud, my beer cold and my optimization functions as simple as possible. Therefore, what I write in this blog post is very much from a layman’s perspective, and I am happy to be corrected on any fundamental errors. I have recently become interested in writing my own

Read more »

Updating to R 2.15, warnings in R and an updated function list for Serious Stats

May 27, 2012
By
Updating to R 2.15, warnings in R and an updated function list for Serious Stats

Whilst writing the book  the latest version of R changed several times. Although I started on an earlier version, the bulk of the book was written with 2.11 and it was finished under R 2.12. The final version of the R scripts were therefore run and checked using R 2.12 and, in the main, the most recent

Read more »

Temperature reconstruction with useless proxies

May 25, 2012
By
Temperature reconstruction with useless proxies

In a number of previous posts I considered the temperature proxies that have been used to reconstruct global mean temperatures during the past millenium. In this post I want to show how such a temperature reconstruction would look like if the proxies had no relation at all to the actual temperatures. The motivation is the

Read more »

The grade level of Congress speeches, analyzed with R

May 22, 2012
By
The grade level of Congress speeches, analyzed with R

As widely reported by CNN, the Huffington Post, Talking Points Memo, the sophistication of speeches by US politicians has declined in recent years, dropping from an 11th-grade level in 2005 to a 10th-grade level today. The reports are based on an analysis by the Sunlight Foundation, based on textual analysis of congressional speeches given since 1996 provided by the...

Read more »

A complete Bayesian model for sensory profiling data

May 22, 2012
By
A complete Bayesian model for sensory profiling data

In this post I will try to add an important parts in the sensory profiling model I have been building. This concerns the question: 'Are all panelists equally reproducible?'. Obviously the answer is no, some are better than others. From this observation...

Read more »

Classical Technical Patterns

May 21, 2012
By
Classical Technical Patterns

In my presentation about Seasonality Analysis and Pattern Matching at the R/Finance conference, I used examples that I have previously covered in my blog: Month of the Year Seasonality – I introduced the Seasonality charts in the Historical Seasonality Analysis: What company in DOW 30 is likely to do well in January? post. I also

Read more »

Permutation tests in R

May 21, 2012
By
Permutation tests in R

Permuation tests (also called randomization or re-randomization tests) have been around for a long time, but it took the advent of high-speed computers to make them practically available. They can be particularly useful when your data are sampled from unkown … Continue reading →

Read more »