My Own R Function and Script for Simple Linear Regression – An Illustration with Exponential Decay of DDT in Trout

My Own R Function and Script for Simple Linear Regression – An Illustration with Exponential Decay of DDT in Trout

Here is the function that I wrote for doing simple linear regression, as alluded to in my blog post about simple linear regression on log-transformed data on the decay of DDT concentration in trout in Lake Michigan.  My goal was to replicate the 4 columns of the output from applying summary() to the output of lm().

Read more »

Parsing complex text files using regular expressions and vectorization

March 24, 2013
By

When text data is in a nice CSV format, read.csv is enough to parse it into a useable format. But if this is not the case, getting the data into a useable format is not so straightforward. In this post… See more ›

Read more »

A Merging Test Bench

March 24, 2013
By

As requested here's the packed data and a test bench you can test your own merging function ideas and replicate my results (hopefully). If you want the plots you can use the end part of scripts in part1 part2. The data is a bunch of super secret Eve...

Read more »

Rcpp 0.10.3

March 23, 2013
By

A new relase 0.10.3 of Rcpp is now on CRAN and in Debian. This is the fourth release in the 0.10.* series, and further extends and solidifies the excellent Rcpp attributes. A few other bugs were fixed as well, and support for wide character string...

Read more »

Writing a for-loop in R

March 23, 2013
By
Writing a for-loop in R

There may be no R topic that is more controversial than the humble for-loop. And, to top it off, good help is hard to find. I was astounded by the lack of useful posts when I googled “for loops in R” (the top return linked to a page that did not exist). In fact, even

Read more »

Introduction to Simulation using R

March 23, 2013
By
Introduction to Simulation using R

We had a great turnout yesterday for our Zero to R Hero workshop at the Quebec Centre for Biodiversity Science. We went from the absolute basics of the command line, to the intricacies of importing data, and finally we had a look at plotting using ggplot2. We didn’t have time to get to this extra module

Read more »

Predicting who will win a NFL match at half time

March 23, 2013
By
Predicting who will win a NFL match at half time

It was great to have a little break, Spring break, although the weather didn’t feel like spring at all! During the early part of the break I worked on my final project for Jeff Leek’s data analysis class, which we call 140.753 here. Continuing my previous posts on the topic, this time I’ll share the results of my...

Read more »

Production Quality Report with R and knitr on Yen

March 22, 2013
By

Sometimes I actually use my experiments for real work.  For example, I wanted to send an update  on the Japanese Yen.  This was a great opportunity to use the chart created in Shading and Points with xtsExtra plot.xts.I was fairly please...

Read more »

Using Norms to Understand Linear Regression

March 22, 2013
By

Introduction In my last post, I described how we can derive modes, medians and means as three natural solutions to the problem of summarizing a list of numbers, \((x_1, x_2, \ldots, x_n)\), using a single number, \(s\). In particular, we measured the quality of different potential summaries in three different ways, which led us to

Read more »

Split, Apply, and Combine for ffdf

March 22, 2013
By
Split, Apply, and Combine for ffdf

Call me incompetent, but I just can’t get ffdfdply to work with my ffdf dataframes.  I’ve tried repeatedly and it just doesn’t seem to work!  I’ve seen numerous examples on stackoverflow, but maybe I’m applying them incorrectly.  Wanting to do some … Continue reading →

Read more »

Explore March Madness face-offs with this NCAA data visualizer

March 22, 2013
By
Explore March Madness face-offs with this NCAA data visualizer

If you're laying down a friendly bet on the March Madness games or just tweaking your fantasy roster, this NCAA Data Visualizer by Rodrigo Zamith will be a boon. Just choose two teams to compare head-to-head, choose an attribute to compare them on. You can look at more than a dozen invividual player attributes (e.g. points scored, assists, 3-point...

Read more »

Are you a Type I or Type II Data Scientist?

March 22, 2013
By

The role of Data Scientist has been getting a lot of attention lately. Brendan Tierney's blog post titled Type I and Type II Data Scientists adds an interesting perspective by defining and characterizing two key types of Data Scientist, both of which are needed in an organization. Tierney writes about Type I Data Scientists, "These are...

Read more »

Veterinary Epidemiologic Research: GLM (part 4) – Exact and Conditional Logistic Regressions

March 22, 2013
By
Veterinary Epidemiologic Research: GLM (part 4) – Exact and Conditional Logistic Regressions

Next topic on logistic regression: the exact and the conditional logistic regressions. Exact logistic regression When the dataset is very small or severely unbalanced, maximum likelihood estimates of coefficients may be biased. An alternative is to use exact logistic regression, available in R with the elrm package. Its syntax is based on an events/trials formulation.

Read more »

Modes, Medians and Means: A Unifying Perspective

March 22, 2013
By
Modes, Medians and Means: A Unifying Perspective

Introduction / Warning Any traditional introductory statistics course will teach students the definitions of modes, medians and means. But, because introductory courses can’t assume that students have much mathematical maturity, the close relationship between these three summary statistics can’t be made clear. This post tries to remedy that situation by making it clear that all

Read more »

Plotting lm and glm models with ggplot #rstats

March 22, 2013
By
Plotting lm and glm models with ggplot #rstats

Update I followed the advice from Tim’s comment and changed the scaling in the sjPlotOdds-function to logarithmic scaling. The screenshots below showing the plotted glm’s have been updated. Summary In this posting I will show how to plot results from … Weiterlesen →

Read more »

Data visualisation talk: Presentation using reports package

March 21, 2013
By
Data visualisation talk: Presentation using reports package

Why I used html5 for my today’s talk?   My last presentation was in html5. This time I wanted to do my slides in something new.  I prepared  first few slides in Jessyink. Then I got to know that my friend … Continue reading →The post Data visualisation talk: Presentation using reports package appeared first on Fiddling...

Read more »

Maximum Sharpe Portfolio

March 21, 2013
By
Maximum Sharpe Portfolio

Maximum Sharpe Portfolio or Tangency Portfolio is a portfolio on the efficient frontier at the point where line drawn from the point (0, risk-free rate) is tangent to the efficient frontier. There is a great discussion about Maximum Sharpe Portfolio or Tangency Portfolio at quadprog optimization question. In general case, finding the Maximum Sharpe Portfolio

Read more »

workshop a Padova

March 21, 2013
By
workshop a Padova

Needless to say, it is with great pleasure I am back in beautiful Padova for the workshop Recent Advances in statistical inference: theory and case studies, organised by Laura Ventura and Walter Racugno. Esp. when considering this is one of the last places I met with George Casella, in June 2010. As we have plenty

Read more »

Using R: Correlation heatmap with ggplot2

March 21, 2013
By
Using R: Correlation heatmap with ggplot2

Just a short post to celebrate that I learned today how incredibly easy it is to make a heatmap of correlations with ggplot2 (and reshape2, of course). So, what is going on in that short passage? cor makes a correlation matrix with all the pairwise correlations between variables (twice; plus a diagonal of ones). melt

Read more »

R PMML Support: BetteR than EveR

March 21, 2013
By
R PMML Support: BetteR than EveR

Once represented as a PMML file, a predictive solution (data transformations + model) can be readily moved into the operational environment where it can be put to work immediately. That's the promise of PMML.R is living up to that promise through its s...

Read more »

RMark: data.table merge vs core merge

March 21, 2013
By

This is the third post concerning fast merging in R, first here and second here. This time we are going to look at how the merge function from data.table package works in our case, requested by Uwe Block. As a reminder the first post concerns doing a...

Read more »

R’s Garden of Probability Distributions

March 21, 2013
By
R’s Garden of Probability Distributions

by Joseph Rickert If you type ?Distributions at the R console you get a list of the 21 probability distributions included in the stats package that ships with base R. The same list appears in the Introduction to R Manual on CRAN and in most of the many fine introductory books available for the R language. These are indeed...

Read more »

And so begins English Composition I

March 21, 2013
By
And so begins English Composition I

This week started the English Composition I: Achieving Expertise course (Comer, 2013) that I have been looking forward to. I am not sure yet how long I will last, but I hope to enjoy it as much as I can. Plus, it should help me with my...

Read more »

Video: High scale in-database modeling in Greenplum with R

March 20, 2013
By
Video: High scale in-database modeling in Greenplum with R

The following post presents the video of a talk by Hong Ooi who presented at Melbourne R Users, March 2013. Content: Greenplum is a massively parallel relational database platform. R is one of the top languages in the data scientist/applied … Continue reading →

Read more »

RserveCLI2, a .net client for Rserve

March 20, 2013
By

RserveCLI is a .net/cli client for Rserve, created by Oliver M. Haynold. Oliver has done a great job with this project. I forked this project to add features, fix bugs, and do some restructuring. I thought it was a significant enough depature to cre...

Read more »

NCAA Basketball Visualization

March 20, 2013
By
NCAA Basketball Visualization

It is time for the NCAA Basketball Tournament. Sixty-four teams dream big (er…I mean 68…well actually by now, 64) and schools like Iona and Florida Gulf Coast University (go Eagles!) are hoping that Robert Morris astounding victory in the N.I.T. … Continue reading →

Read more »

Find the fairest place to meet on the Paris Métro

March 20, 2013
By
Find the fairest place to meet on the Paris Métro

When I lived in Paris years ago, I worked near Gare du Nord, but my friend Jenny lived near République. If we wanted to meet up after work, we'd just meet halfway along the Orange Métro line, around Gare de l'Est. Easy. Since that's within walking distance we wouldn't actually take the Métro, but Métro stations are useful waypoints...

Read more »

Violin plots and regional income distribution

March 20, 2013
By
Violin plots and regional income distribution

While preparing my slides for statistical graphics, a plot really caught my eye when I was playing around with the data. I started off by plotting the time seriesof GNI per capita by country, and as expected it got quite messy and...

Read more »

XLConnect on github

March 20, 2013
By
XLConnect on github

Mirai Solutions GmbH (http://www.mirai-solutions.com) is pleased to announce the availability of XLConnect on github. Whether you want to browse the code or simply want access to the latest development version of XLConnect, visit us on github. XLConnect can be directly … Continue reading →

Read more »

Sponsors

Mango solutions



RStudio homepage



Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training



http://www.eoda.de









ODSC

CRC R books series











Contact us if you wish to help support R-bloggers, and place your banner here.