Preferential attachment for network

September 15, 2012
By

I am currently taking the networked life course on Coursera.org offered by Professor Michael Kearns from the University of Pennsylvania.  I have been took several courses including machine learning, natural language processing since the platf...

Read more »

N-Way ANOVA

September 15, 2012
By

N-Way ANOVA example Two-way analysis of variance is where the rubber hits the road, so to speak. This extends the concepts of ANOVA with only one factor to two factors. When there are two factors this means that there can be an interaction between the two factors that should be tested. As one might expect

Read more »

An implementation of the Newton-Raphson algorithm in C/C++ and R

September 14, 2012
By
An implementation of the Newton-Raphson algorithm in C/C++ and R

Today, we write a small piece of C/C++ code that implements the well-known Newton-Raphson algorithm (see, Mathworld). We also provide the R code. Exercise: Find the unique root of the function  using the Newton-Raphson method. Notice that we choose a function … Continue reading →

Read more »

Slightly-more-than-basic sentiment analysis

September 14, 2012
By

I became interested in sentiment analysis a few months ago as a matter of pure practicality. The company I work for does a lot of customer-satisfaction surveys. Respondents rate various aspects of our products, but they also have the opportunity to answer a bunch of open-ended questions in their own voices. That kind of information

Read more »

Getting into R, RCommander, JGR and Deducer

September 14, 2012
By

I've been meaning to post something about R for a while, but never got started, and now have a pile of things I'd like to post, so it's time to get started. I first started using R during my Master Dissertation where I had to do some stats.  I've ...

Read more »

Visualize complex data with subplots

September 14, 2012
By
Visualize complex data with subplots

Today's guest post comes from Garrett Grolemund, a software developer at RStudio — ed. I think of graphs as a type of visual summary for data. Yet I rarely see graphs used this way within visualizations. Consider tile plots. They group data into 2d bins and then summarize each group with a number. This approach is a go-to tool...

Read more »

Simulation metamodeling with constraints

September 14, 2012
By
Simulation metamodeling with constraints

Last week I have posted about using simulation metamodeling to verify results of analytical solution of the model. After posting it I realized that the solution presented there can be improved by using knowledge of simulation model struc...

Read more »

Mapping Bike Accidents in R

September 14, 2012
By
Mapping Bike Accidents in R

At last weekend’s Hack Ta Ville event here in Montreal, I joined up with some talented urban planners and web devs to realize Vélobstacles. The idea of the project is to crowd source information on cycling conditions around the city. As with any crowd sourcing project, we were faced with the problem of seeding the

Read more »

Great Circles, Black Holes, and Community Events Part 3 of 3

September 14, 2012
By
Great Circles, Black Holes, and Community Events Part 3 of 3

The second community event is the Soldier Hollow Junior Olympics (SoHo), again found in the Heber Valley area. Building upon the previous posts (part 1 and part 2) this one will show an event that has more people coming from greater distance. Take the bar charts for the number of participants and the cities they are...

Read more »

How-to: Construct petridish plots in R

September 14, 2012
By
How-to: Construct petridish plots in R

Script for petridish layout in R 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 library(igraph)   # create empty graph g <- graph.empty(directed=FALSE) node_id <- c(1:1000)   # … Continue reading →

Read more »

Mid-September flotsam

September 14, 2012
By
Mid-September flotsam

This is one of those times of the year: struggling to keep the head above the water, roughly one month before the last lecture of the semester. On top trying to squeeze trips, meetings and presentations in between while dealing … Continue reading →

Read more »

New book: “Modeling Psychophysical Data in R”

September 14, 2012
By
New book: “Modeling Psychophysical Data in R”

Ken Knoblauch wrote to inform me that Springer has just released a book he coauthored with Larry Maloney on statistical methods in psychophysics. The book is called “Modeling Psychophysical Data in R” and covers both classical psychophysical analyses (Signal Detection Theory) and more recent methods (e.g. Mixed Models). Ken was one of the first in

Read more »

googleVis — Diaoyu Islands

September 14, 2012
By
googleVis — Diaoyu Islands

China just announced the Diaoyu Islands baselines yesterday (US EST). Take a look at their locations (Clike here for the google map).

Read more »

OO in R

September 13, 2012
By
OO in R

"Is there a package for obfuscating code in #rstats?", someone asked. "The S4 object system?!" came the snarky reply. If you're smiling right now, you know that it wouldn't be funny if it weren't at least a little bit true. Options: S3, S4 or R5? There can be little doubt that object oriented...

Read more »

Improved net stacked distribution graphs via ggplot2 trickery

September 13, 2012
By
Improved net stacked distribution graphs via ggplot2 trickery

Net stacked distribution graphs are a nice way of comparing data on a Likert scale. It strips out the neutral responses and centers the responses around the center of the graph so you can quickly compare agreement and disagreement on different issues. Here we'll build on Jason Becker's work on doing this in ggplot2 -- it requires...

Read more »

A function to find the “Penultimax”

September 13, 2012
By
A function to find the “Penultimax”

Penulti-what?  Let me explain: Today I had to iteratively go through each row of a donor history dataset and compare a donor’s maximum yearly donation total to the second highest yearly donation total.  In even more concrete terms, for each … Continue reading →

Read more »

Normal Probability Plots (QQ Plots) in R

September 13, 2012
By
Normal Probability Plots (QQ Plots) in R

Here’s a tutorial on how to tell whether your data are (approximately) normally distributed! qq-plot-75-925

Read more »

books for review (in CHANCE)

September 13, 2012
By
books for review (in CHANCE)

Among the books I received for review in CHANCE, here are some neither I nor my “usual suspects” had enough time or interest in to review: R Graphics (second edition) by Paul Murrell Biostatistics: A computing approach by Stewart Anderson Advanced Bayesian methods for medical test accuracy by Lyle Broemeling Introduction to Probability with Texas

Read more »

Word Clouds in R

September 13, 2012
By
Word Clouds in R

Thanks to the wordcloud package, it's super easy to make a word cloud or tag cloud in R.In this case, the words have been counted already. If you are starting with plain text, you can use the text mining package tm to obtain the counts. Other blog...

Read more »

Imputation by mean?

September 13, 2012
By

Today, I was briefed that when computing the regional aggregates such as those defined by the M49 country standard of the United Nation (http://unstats.un.org/unsd/methods/m49/m49regin.htm) I should use the regional mean to replace missing values....

Read more »

Effective Graphs with R

September 13, 2012
By
Effective Graphs with R

Today's guest post is by Naomi Robbins, author of the Effective Graphs blog — ed. I write a blog on effective graphs for Forbes. David Smith invited me to write a guest post here that was a roundup of some of my Forbes posts where R was used. My use of R graphics has ranged from simple box plots...

Read more »

R2MLwiN package

September 13, 2012
By

The new package R2MLwiN package bridges R and MLwinN software for multilevel analysis. From the examples provided, it looks very promising. It will be great if a command line version of MLwiN can be made available under Linux so the package can be usef...

Read more »

Automatic cleaning of messy text data

September 13, 2012
By

Read more »

BCEA examples

September 13, 2012
By

I've prepared a document (which I've put on the website here, together with some scripts at this page) which I think is helpful, if you're trying to work out BCEA. I have never really thought of this, but I believe that when you write an acad...

Read more »

Kendall’s function for copulas

September 12, 2012
By
Kendall’s function for copulas

As mentioned in the course on copulas, a nice tool to describe dependence it Kendall's cumulative function. Given a random pair with distribution  , define random variable . Then Kendall's cumulative function is Genest and Rivest (1993) intr...

Read more »

Estimating Pi with R via MCS-Dart: A very simple example of numerical integration, illustrated and computed in R.

September 12, 2012
By
Estimating Pi with R via MCS-Dart: A very simple example of numerical integration, illustrated and computed in R.

Have you ever played Monte Carlo Dart? If not, read this post and learn how to do it with R and what it can be used for. In fact it is a very easy and prevalent example (which I have come across in a  computational economics course last spring semester) that demonstrates the idea behind numerical integration....

Read more »

R: Isarithmic Maps of Election Data (1/2)

September 12, 2012
By
R: Isarithmic Maps of Election Data (1/2)

In this tutorial I will show

Read more »

Testing highlight.js with R code

I searched for a javascript plugin to highlighter code, but obviously not any code. I needed to higlight R. Finally I founded highlight.js. Highlights.js is pretty cool for many reasons. I like Highlights.js because: Support R lenguage. It's easy to use. Works automatically. That's mean you don't have to put the code what are you writing. Highloght it does alone. A lot of...

Read more »

Testing highlight.js with R code

I searched for a javascript plugin to highlighter code, but obviously not any code. I needed to higlight R. Finally I founded highlight.js. Highlights.js is pretty cool for many reasons. I like Highlights.js because: Support R lenguage. It's easy to use. Works automatically. That's mean you don't have to put the code what are you writing. Highloght it does alone. A lot of...

Read more »