1878 search results for "ggplot2"

Why an inverse-Wishart prior may not be such a good idea

March 7, 2012
By
Why an inverse-Wishart prior may not be such a good idea

While playing around with Bayesian methods for random effects models, it occured to me that inverse-Wishart priors can really bite you in the bum. Inverse Wishart-priors are popular priors over covariance functions. People like them priors because they are conjugate to a Gaussian likelihood, i.e, if you have data with each : so that the

Read more »

Airline Fares Decreasing Steadily

March 5, 2012
By
Airline Fares Decreasing Steadily

Description: Yearly average airline fare since 1995. Data: http://www.bts.gov/ Analysis: When taking the average price of domestic airline fares, there is a clear trend indicating that flying is becoming more affordable - when adjusted for infl...

Read more »

Benford’s Law and fraud in the Russian election

March 5, 2012
By
Benford’s Law and fraud in the Russian election

Earlier today Ben Goldacre posted about using Benford’s Law to try and detect fraud in the Russian elections. Read that now, or the rest of this post won’t make sense. This is a loose R translation of Ben’s Stata code. The data is held in a Google doc. While it is possible to directly retrieve

Read more »

Boxplots and Day of Week Effects

March 4, 2012
By
Boxplots and Day of Week Effects

THIS BLOG DOES NOT CONSTITUTE INVESTMENT ADVICE. ACTING ON IT WILL MOST LIKELY BE DETRIMENTAL TO YOUR FINANCIAL HEALTH.After following some R-related quant finance blogs like Timely Portfolio, Systematic Investor or Quantitative tho...

Read more »

Interpretation of R-index

March 4, 2012
By
Interpretation of R-index

Having introduced the R-index, it is time to look how it works. For this a simple example is sufficient. What happens if a product is different from another product. To make this at least slightly realistic, three products are needed. Two products will...

Read more »

Visualization series: Insight from Cleveland and Tufte on plotting numeric data by groups

March 4, 2012
By
Visualization series: Insight from Cleveland and Tufte on plotting numeric data by groups

After my post on making dotplots with concise code using plyr and ggplot, I got an email from my dad who practices immigration law and runs a website with a variety of immigration resources and tools.  He pointed out that the … Continue reading →

Read more »

What is R-index

March 2, 2012
By
What is R-index

R index is developed in interpreting signal detection data for human perception. In sensory research it is used to interpret ranking data. The value one gets out of an R-index calculation is interpreted as a confusion between samples tested. It has bee...

Read more »

Modeling Trick: the Signed Pseudo Logarithm

March 1, 2012
By
Modeling Trick: the Signed Pseudo Logarithm

Much of the data that the analyst uses exhibits extraordinary range. For example: incomes, company sizes, popularity of books and any “winner takes all process”; (see: Living in A Lognormal World). Tukey recommended the logarithm as an important “stabilizing transform” (a transform that brings data into a more usable form prior to generating exploratory statistics, Related posts:

Read more »

R code for Chapter 1 of Non-Life Insurance Pricing with GLM

March 1, 2012
By
R code for Chapter 1 of Non-Life Insurance Pricing with GLM

Insurance pricing is backwards and primitive, harking back to an era before computers. One standard (and good) textbook on the topic is Non-Life Insurance Pricing with Generalized Linear Models by Esbjorn Ohlsson and Born Johansson. We have been doing some work in this area recently. Needing a robust internal training course and documented methodology, we have...

Read more »

I see high frequency data

March 1, 2012
By
I see high frequency data

In the previous post I shared an example how to get high frequency data from IB broker (well, it is retail version of HFD – it has only best bid/ask and the trades). Now, once you saved some data – what should you do next? Next logical step would be data sanity check and visualization.

Read more »