Monthly Archives: September 2012

From continuous to categorical

September 24, 2012
By
From continuous to categorical

During data analysis, it is often super useful to turn continuous variables into categorical ones.  In Stata you would do something like this:gen catvar=0replace catvar=1 if contvar>0 & contvar<=3replace catvar=2 if contvar>3 & co...

Read more »

Data Frames and Transactions

September 24, 2012
By

Transactions are a very useful tool when dealing with data mining.  It provides a way to mine itemsets or rules on datasets. In R the data must be in transactions form.  If the data is only available in a data.frame then to create (or coerce) the data frame to transaction the researcher may use the

Read more »

Coursera’s free online R course starts today

September 24, 2012
By

Coursera offers a number of on-line courses, all available for free and taught by experts in their fields. Today, the course Computing for Data Analysis begins. Taught by Johns Hopkins Biostatistics professor (and co-author of the Simply Statistics blog) Roger Peng, the course will teach you how to program in R and use the language for data analysis. Here's...

Read more »

An R Users’ Group in Davis

September 24, 2012
By

I’m excited to share that we’ve started a new R users’ group at UC Davis! Right now our main purpose is to run weekly 2-hour work/hack sessions where R users can get together to work through problems together. More info here

Read more »

Example 10.3: Enhanced scatterplot with marginal histograms

September 24, 2012
By
Example 10.3: Enhanced scatterplot with marginal histograms





Back in example 8.41 we showed how to make a graphic combining a scatterplot with histograms of each variable. A commenter suggested we change the R graphic to allow post-hoc plotting of, for example, lowess lines. In addition, there are further refinements to be made.

In this R-only entry, we'll make the figure...

Read more »

Use GBIF and googleVis to Make Maps with Species Occurrence Data

September 24, 2012
By
Use GBIF and googleVis to Make Maps with Species Occurrence Data

This is a short follow up on THIS posting.. I will briefly show how to use the dismo- and the googeVis package to plot species occurrences on an interactive Google map, like the one below (HERE is the R-script)






MapID2ce4348e653






Computing kook density in R

September 24, 2012
By
Computing kook density in R

Do you ever see strange lights in the sky? Do you wonder what really goes on in Area 51? Would you like to use your R hacking skills to get to the bottom of the whole UFO conspiracy? Of course, you would! UFO data from infochimps is the focus of a dat...

Read more »

qgraph version 1.1.0 and how to simply make a GUI using ‘rpanel’

September 24, 2012
By
qgraph version 1.1.0 and how to simply make a GUI using ‘rpanel’

Last week I have updated the ‘qgraph‘ package to version 1.1.0, available on CRAN now. Besides some internal changes (especially the self-loops have been substantially improved) the most important change is the addition of a GUI interface, which can be … Continue reading

Read more »

Simple visually-weighted regression plots

September 24, 2012
By
Simple visually-weighted regression plots

There has recently been a lot of discussion of so-called “visually-weighted regression” plots. Folk hero Hadley Wickham suggests that such plots would be easy to implement with ggplot2, and so I have attempted to prove him right. The approa...

Read more »

Volatility forecast evaluation in R

September 24, 2012
By
Volatility forecast evaluation in R

In portfolio management, risk management and derivative pricing, volatility plays an important role. So important in fact that you can find more volatility models than you can handle (Wikipedia link). What follows is to check how well each model performs, … Continue reading

Read more »