Are Recessions Environmentally Beneficial?

February 1, 2012
By
Are Recessions Environmentally Beneficial?

Description: Total energy consumption in the United States by sector.  Vertical gray lines represent periods of recession. Data: http://www.eia.gov/totalenergy/data/annual/index.cfm#consumption http://en.wikipedia.org/wiki/List_of_rece...

Read more »

Confirming SSR, SSE, and SST using matrix in R

February 1, 2012
By

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. #Al-Ahmadgaid Asaad#As part of the yearly report of the...

Read more »

The universal solvent of statistics

February 1, 2012
By
The universal solvent of statistics

Andrew Gelman just posted an interesting article on the philosophy of Bayesian statistics. Here’s my favorite passage. This reminds me of a standard question that Don Rubin … asks in virtually any situation: “What would you do if you had all the data?” For me, that “what would you do” question is [...]

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 »

Multi-Threaded Principle Component Analysis

February 1, 2012
By
Multi-Threaded Principle Component Analysis

SAS used to not support multithreading in PCA, then I figured out that its server version supports this functionality, see here. Today, I found this mutlithreading capability is finally available in PC SAS v9.22.The figure above indicates that all 4 th...

Read more »

Example: Two Sample t-Test

January 31, 2012
By

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 »

Example: One Sample t-Test

January 31, 2012
By

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 l...

Read more »

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

January 31, 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 LaT...

Read more »

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

January 31, 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 »

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...

Read more »

Spectral Clustering II

January 30, 2012
By

In the previous post on spectral clustering the algorithm required the calculation of a factor, sigma that determined the affinity of points. This value needs to be adjusted manually to get the required clusters. Here is a modified calculation of th...

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 errors when needed.There are some barriers to entry with LaTeX that seem much…

Read more »

Random Number Seeds: NOT only the first one matters!

January 30, 2012
By
Random Number Seeds: NOT only the first one matters!

Today, Rick (blog @ here) wrote an article about random number seed in SAS to be used in random number functions in DATA Step. Rick noticed when multiple random number functions are called using different seeds, only the first one matters. This is...

Read more »

Freshman hordes even more godless!

January 29, 2012
By
Freshman hordes even more godless!

[This is an update of an article I wrote last year, "Freshman hordes more godless than ever."  There is a followup to this article here.] For several years I have been following one of the most under-reported stories of the decade: the fraction o...

Read more »

Complete steps for installing software and programs

January 28, 2012
By
Complete steps for installing software and programs

To use the programs, there are five basic installation steps:Install the general programming language R. Go to the R web site and install the latest version of R appropriate for your computer (Windows, Mac, Linux).Install the Bayesian sampling program ...

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 »

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 »

RStudio, BibTex, and LaTeX

January 27, 2012
By

I was having a little trouble getting RStudio to process BibTex entries and compile a LaTeX file. Bumping around on the great RStudio help forum, I found this entry, which pointed me in the direction. I needed to set a system environment variable in R ...

Read more »

Think Complexity, Part Two

January 27, 2012
By
Think Complexity, Part Two

My new book, Think Complexity, will be published by O'Reilly Media in March. For people who can't stand to wait that long, I am publishing excerpts here.  If you really can't wait, you can read the free version at&nbs...

Read more »

Parallel R Model Prediction Building and Analytics

January 27, 2012
By
Parallel R Model Prediction Building and Analytics

Modifying R code to run in parallel can lead to huge performance gains. Although a significant amount of code can easily be run in parallel, there are some learning techniques, such as the Support Vector Machine, that cannot be easily parallelized. ...

Read more »

Parallel R Model Prediction Building and Analytics

January 27, 2012
By

Modifying R code to run in parallel can lead to huge performance gains. Although a significant amount of code can easily be run in parallel, there are some learning techniques, such as the Support Vector Machine, that cannot be easily parallelized. H...

Read more »


Subscribe

Email:

  Subscribe