"R": Looking at the Data (Gasoline) – 001

February 1, 2012
By
"R": Looking at the Data (Gasoline) – 001

As other softwares "R" has nice tools to look to the data before to develop the calibration.Statistics for the "Y" variable (in this case octane number) like Maximun, Minimun,..,standard deviation,...are important:> library(ChemometricsWithR)> data(gasoline)> summary(gasoline$octane)   Min.  1st Qu.  Median    Mean   3rd Qu.    Max.   83.40   85.88    87.75    87.18   88.45    89.60> sd(gasoline$octane) 1.530078And of course the Histogram:> hist(gasoline$octane)

Read more »

Confirming SSR, SSE, and SST using matrix in R

February 1, 2012
By
Confirming SSR, SSE, and SST using matrix in R

The codes below was done in our regression laboratory class. Here, we run first the data in SPSS, and take the ANOVA output where we can find the computed values of SSR, SSE, and SST.ANOVAb Model Sum of Squares df Mean Square F Sig. 1 Regress...

Read more »

R Training Course in the Bay Area

February 1, 2012
By
R Training Course in the Bay Area

An introduction to R for sofware developers and data analysts Saturday March 10th, 2012 8:30-5:00pm EBay 2161 North 1st Street San Jose, California I will be presenting a one day professional development workshop on R programming for software developers and … Continue reading →

Read more »

the birthday problem [X'idated]

February 1, 2012
By
the birthday problem [X'idated]

The birthday problem (i.e. looking at the distribution of the birthdates in a group of n persons, assuming a uniform distribution of the calendar dates of those birthdates) is always a source of puzzlement ! For instance, here is a recent post on Cross Validated: I have 360 friends on facebook, and, as

Read more »

RStudio Server: accessing the RStudio R IDE through your browser

February 1, 2012
By

I like having all my important documents and scripts in one single place. This saves me from having to synchronize them between the different workplaces I have, and makes backupping much less of a pain. One way of achieving this… See more ›

Read more »

R is the easiest language to speak badly

February 1, 2012
By
R is the easiest language to speak badly

I am amazed by the number of comments I received on my recent blog entry about "by", "apply" and friends. I had started my post by pointing out that R is a language. Well indeed, I have come to the conclusion, that it is a language with lots of irregul...

Read more »

MINE: Maximal Information-based NonParametric Exploration

February 1, 2012
By
MINE: Maximal Information-based NonParametric Exploration

There was a lot of buzz in the blogosphere as well as the science community about a new family of algorithms that are able to find non-linear relationships over extremely large fields of data. What makes it particularly useful is that the measure(s) it...

Read more »

New R User Group in Cambridge, UK

January 31, 2012
By

Yet another new local R user group has launched this month, this time in Cambridge, UK. Cambridge RUG was created by data analyst Andrew Caines to promote the use of R in the Cambridge area. The group aims to encourage people try the R language, act as an advice centre to help people get where they want to with...

Read more »

Weak Law of Large Numbers

January 31, 2012
By
Weak Law of Large Numbers

1 Description The weak law of large numbers is a result in probability theory also known as Bernoulli’s

Read more »

quick tips: within function assignment and specific object removal

January 31, 2012
By
quick tips: within function assignment and specific object removal

If you’re familiar with the faster iterations on objects such as lapply, sapply, or apply for matrices, you might get surprised that the function call saves new assignments only locally. One of my favorite lines in R comes from the … Continue reading →

Read more »

Example: Two Sample t-Test

January 31, 2012
By
Example: Two Sample t-Test

The recovery time (in days) is measured for 10 patients taking a new drug and for 10 different patients taking a placebo. We wish to test the hypothesis that the mean recovery time for patients taking the drug is less than for those taking placebo. The...

Read more »

Given a room with n people in it, what is the probability any two will have the same birthday?

January 31, 2012
By
Given a room with n people in it, what is the probability any two will have the same birthday?

Revisiting a fun puzzle I remember first encountering as an undergraduate. Nice example of creating a plot in R using ggplot2. I also plot the probability of someone in the room having the same birthday as you.

Read more »

Example: One Sample t-Test

January 31, 2012
By
Example: One Sample t-Test

Using the stack loss dataset, test the hypothesis that the mean of the stackloss is equal to 20 versus a two-sided alternative. Solution:Codes:Output:Interpretation: With the p-value greater than the level of significance alpha at 0.05, then we la...

Read more »

Surfaces in ternary plots

January 31, 2012
By
Surfaces in ternary plots

In mixture experiments there is a constraint that the variables are the proportions of components that are mixed together with the consequence that these proportions sum to one. When fitting regression models to data from mixture experiments we may be interested in reprenting the fitted model with a surface plot. The constraint on proportions means

Read more »

ultimate R recursion

January 31, 2012
By
ultimate R recursion

One of my students wrote the following code for his R exam, trying to do accept-reject simulation (of a Rayleigh distribution) and constant approximation at the same time: which I find remarkable if alas doomed to fail! I wonder if there exists a (real as opposed to fantasy) computer language where you could introduce constants

Read more »

This graph makes me think Kobe is not that good, he just shoots a lot

January 31, 2012
By
This graph makes me think Kobe is not that good, he just shoots a lot

I find it surprising that NBA commentators rarely talk about field goal percentage. Everybody knows that the more you shoot the more you score. But players that score a lot are admired without consideration of their FG%. Of course having a high FG% is ...

Read more »

Given a room with n people in it, what is the probability any two will have the same birthday?

January 31, 2012
By
Given a room with n people in it, what is the probability any two will have the same birthday?

Revisiting a fun puzzle I remember first encountering as an undergraduate. Nice example of creating a plot in R using ggplot2. I also plot the probability of someone in the room having the same birthday as you. ## See http://en.wikipedia.org/wiki/Bi...

Read more »

Given a room with n people in it, what is the probability any two will have the same birthday?

January 31, 2012
By
Given a room with n people in it, what is the probability any two will have the same birthday?

Revisiting a fun puzzle I remember first encountering as an undergraduate. Nice example of creating a plot in R using ggplot2. I also plot the probability of someone in the room having the same birthday as you. ## See http://en.wikipedia.org/wiki/Bi...

Read more »

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 »