Computational Econometrics: Aggregate Demand with Random Parameters

January 31, 2012
By
Computational Econometrics: Aggregate Demand with Random Parameters

Computational Econometrics: Aggregate Demand with Random Parameters: From microeconomics we know that individuals and firms have demand curves for goods and services. But what happens when you try to get a picture of the demand for goods and services f...

Read more »

Collapse pasting in R

January 30, 2012
By
Collapse pasting in R

How do you take a vector in R, and paste the individual elements together?  Easy, a loop.  No, bad! **slap on the wrist**  Here’s an example why not.   So let’s start by concatenating a few character strings and showing some … Continue reading →

Read more »

Using LaTeX, R, and Sweave to Create Reports in Windows

January 30, 2012
By
Using LaTeX, R, and Sweave to Create Reports in Windows

LaTeX is a typesetting system that can easily be used to create reports and scientific articles, and has excellent formatting options for displaying code and mathematical formulas. Sweave is a package in base R that can execute R code embedded in LaTe...

Read more »

Explaining India’s miserable Test cricket performance in 2011/2012

January 30, 2012
By
Explaining India’s miserable Test cricket performance in 2011/2012

Today when I reminded a friend not to lose hope in Indian cricket (after recent whitewash in England and Australia), another friend commented, प्रसून जी , यह भारतीय क्रिकेट है ..यहाँ पर हर विक्टरी दुसरे दिन पुरानी हो जाती है ...You have to perform at your best ... After all they are getting unexpected money. They should deliver the...

Read more »

simple shortcuts for the windows r console

January 30, 2012
By

(This article was first published on twotorials by anthony damico, and kindly contributed to R-bloggers) To leave a comment for the author, please follow the link and comment on his blog: twotorials by anthony damico. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL,...

Read more »

how to download and install r

January 30, 2012
By

(This article was first published on twotorials by anthony damico, and kindly contributed to R-bloggers) To leave a comment for the author, please follow the link and comment on his blog: twotorials by anthony damico. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL,...

Read more »

Pre-conference tutorials announced for useR! 2012

January 30, 2012
By

The worldwide R user conference, useR! 2012, will take place this year June 12-15 in Nashville, Tennessee. In addition to the regular program of invited and contributed talks, a highlight of every useR! is the pre-conference tutorials: hand-on, half-day in-depth expert-led sessions with a focused on a specific area of methodology with R. This year's roster of tutorials has...

Read more »

the Art of R Programming [guest post]

January 30, 2012
By
the Art of R Programming [guest post]

(This post is the preliminary version of a book review by Alessandra Iacobucci, to appear in CHANCE. Enjoy !) As Rob J. Hyndman enthusiastically declares in his blog, “this is a gem of a book”. I would go even further and argue that The Art of R programming is a

Read more »

The power of Rcpp

January 30, 2012
By
The power of Rcpp

While ago I built two R scripts to track OMX Baltic Benchmark Fund against the index. One script returns the deviation of  fund from the index and it works fast enough. The second calculates the value of the fund every minute and it used to take for while. For example, it spent 2 minutes or

Read more »

Getting Fancy with 3-D Scatterplots

January 30, 2012
By
Getting Fancy with 3-D Scatterplots

R has some great functions for generating scatterplots in 3 dimensions. Two of the best are the scatter3d() function in John Fox’s car package, and the scatterplot3d() function in Uwe Ligges’ scatterplot3d package. In this post, we will focus on … Continue reading →

Read more »

Updated Sentiment Analysis and a Word Cloud for Netflix – The R Way!

January 30, 2012
By
Updated Sentiment Analysis and a Word Cloud for Netflix – The R Way!

The Netflix investors must be happy and cheerful as the stock is up more than 78% since the beginning of the year (YES, 78%, Source: Yahoo Finance!).  I am not going to talk about what turned the stock around after a much talked/hyp...

Read more »

Sentiment Analysis, the R way, on Netflix’s September 18th Announcement

January 30, 2012
By

Re-posting this blog from my other blog on Analytics (http://allthingsbusinessanalytics.blogspot.com/)Did Netflix make a bad move or a bold move, only time will tell but for now here is a simple sentiment analysis using R and TwitteR pac...

Read more »

Using LaTeX, R, and Sweave to Create Reports in Windows

January 30, 2012
By
Using LaTeX, R, and Sweave to Create Reports in Windows

LaTeX is a typesetting system that can easily be used to create reports and scientific articles, and has excellent formatting options for displaying code and mathematical formulas. Sweave is a package in base R that can execute R code embedded in LaTeX files and display the output. This can be used to generate reports and quickly fix...

Read more »

useR! 2012: Earlybird Registration for International R Users Conference, Nashville TN 12-15 2012

January 30, 2012
By

The 8th international R users conference useR! 2012 will be in Nashville TN USA June 12-15 with a special all-day pre-conference course from Bill Venables on June 11. We have a terrific lineup of half-day tutorials on June 12 and will have invited and contributed presentations of interest to a wide variety of R users. Details may be found...

Read more »

Converting grads files to NetCDF from within R using CDO

January 30, 2012
By

A while back I wrote a blog post on the R package I wrote for reading and manipulating grads data. The library is quite basic, and does not support a number of grads data file options: Using one ctl file,… See more ›

Read more »

Geopolitics

January 30, 2012
By
Geopolitics

The graduated symbol schematics below have been created in R (using ‘symbols’). They plot combinations of country territorial and population sizes. Instead of dividing for population density we multiply for a function of both. The total of box areas is … Continue reading →

Read more »

Printing nested tables in R – bridging between the {reshape} and {tables} packages

January 29, 2012
By
Printing nested tables in R – bridging between the {reshape} and {tables} packages

This post shows how to print a prettier nested pivot table, created using the {reshape} package (similar to what you would get with Microsoft Excel), so you could print it either in the R terminal or as a LaTeX table. This task is done by bridging between the cast_df object produced by the {reshape} package,

Read more »

Some new functions I’ve discovered in R

January 29, 2012
By
Some new functions I’ve discovered in R

I’ve been writing a fair amount of R recently and have been going through a good learning period, here are some functions that I’ve discovered (mainly plyr and reshape related) and thought I would share: merge_all is a good way to merge multiple different data frames, rather than multiple merge commands. The key thing is … Continue reading...

Read more »

Removing Multibyte Characters from Strings

January 29, 2012
By

I was a bit annoyed by the error when loading a dataset that contains multi-byte characters. R basically just chokes on them. I have not really understood the intricacies of this, but it was basically just an annoyance and since I did not really use these characters in the strings containing them, I just wanted

Read more »

hmm: implementation of viterbi algorithm (Durbin, 1998) Part 2

January 29, 2012
By
hmm: implementation of viterbi algorithm (Durbin, 1998) Part 2

Previous post presented the problem of dishonest casino that ocassionally uses loaded die. Sequence of the real states is hidden, and we are trying to figure it out just by looking at the observations (symbols). If we apply our implementation … Continue reading →

Read more »

Visual Summary of #jan25 Twitter Activity

January 29, 2012
By
Visual Summary of #jan25 Twitter Activity

  Last year, I covered a number of the so-called “Twitter protests” in China (#cn220), Iran (#25bahman), and Algeria (#fev12).  Since these protests began in January 2011, the Arab Spring has claimed many members of both ruling and revolting groups … Continue reading →

Read more »

Multiple Factor Model – Fundamental Data

January 28, 2012
By
Multiple Factor Model – Fundamental Data

The Multiple Factor Model can be used to decompose returns and calculate risk. Following are some examples of the Multiple Factor Models: The expected returns factor model: Commonality In The Determinants Of Expected Stock Returns by R. Haugen, N. Baker (1996) The expected returns factor model: CSFB Quantitative Research, Alpha Factor Framework on page 11,

Read more »

Categorizing my expenses

January 28, 2012
By
Categorizing my expenses

In order to analyse my expenses, a classification scheme is necessary. I need to identify categories that are meaningful to me. I decided to go with the “Classification of Individual Consumption by Purpose” (COICOP), for three reasons:It is made by people who have thought more about consumption classification than I ever will. It is feasible to assign bank transactions...

Read more »

Say it in R with "by", "apply" and friends

January 28, 2012
By
Say it in R with "by", "apply" and friends

Iris versicolor (Source: Wikipedia)R is a language, as Luis Apiolaza pointed out in his recent post. This is absolutely true, and learning a programming language is not much different from learning a foreign language. It takes time and a lot of pr...

Read more »

Le Monde puzzle [#755?]

January 27, 2012
By
Le Monde puzzle [#755?]

Le Monde puzzle of last weekend was about sudoku-like matrices. Consider an (n,n) matrix containing the integers from 1 to n². The matrix is “friendly” if the set of the sums of the rows is equal to the set of the sum of the columns. Find examples for n=4,5,6. Why is there no friendly matrix

Read more »

hmm: implementation of viterbi algorithm (Durbin, 1998) Part 1

January 27, 2012
By
hmm: implementation of viterbi algorithm (Durbin, 1998) Part 1

Example in the mentioned book goes as following – dishonest casino uses two types of dice. Fair one that has equal probability of landing on either side (1/6), and the loaded one with 50% chance for getting 6. Your task … Continue reading →

Read more »

heatmaps: controlling the color representation with set data range

January 27, 2012
By
heatmaps: controlling the color representation with set data range

Often you want to set the fixed colors for particular range of your dataset to be sure that the visual output is correctly represented. This is particularly useful for time series data, where the range or your dataset might drastically … Continue reading →

Read more »

Distressing Numbers for Women

January 27, 2012
By
Distressing Numbers for Women

Sometimes I play with non-linguistic data sets recreationally. It's a totally valid hobby! I tend to gravitate towards data on the disparities between men and women, because gender equality is something that matters to me.I've had this one data set for...

Read more »

Replicating NetLogo Fire model

January 27, 2012
By
Replicating NetLogo Fire model

While preparing for the new semester I have started reimplementing standard NetLogo examples in R. The first is Fire model.The simulation in R is presented here:# Forest matrix trees encoding:# 3 – green, 2 – burning, 1 – burnt, 0 – no treesimu...

Read more »