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

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

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

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

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

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

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

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…

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

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