Posts Tagged ‘ Data Analysis ’

Plotting multiple time series in SAS/IML (Wide to Long, Part 2)

February 27, 2015
By
Plotting multiple time series in SAS/IML (Wide to Long, Part 2)

I recently wrote about how to overlay multiple curves on a single graph by reshaping wide data (with many variables) into long data (with a grouping variable). The implementation used PROC TRANSPOSE, which is a procedure in Base SAS. When you program in the SAS/IML language, you might encounter data […]

Read more »

Plotting multiple series: Transforming data from wide to long

February 25, 2015
By
Plotting multiple series: Transforming data from wide to long

Data. To a statistician, data are the observed values. To a SAS programmer, analyzing data requires knowledge of the values and how the data are arranged in a data set. Sometimes the data are in a "wide form" in which there are many variables. However, to perform a certain analysis […]

Read more »

The advantages of using count() to get N-way frequency tables as data frames in R

The advantages of using count() to get N-way frequency tables as data frames in R

Introduction I recently introduced how to use the count() function in the “plyr” package in R to produce 1-way frequency tables in R.  Several commenters provided alternative ways of doing so, and they are all appreciated.  Today, I want to extend that tutorial by demonstrating how count() can be used to produce N-way frequency tables […]

Read more »

How to Get the Frequency Table of a Categorical Variable as a Data Frame in R

How to Get the Frequency Table of a Categorical Variable as a Data Frame in R

Introduction One feature that I like about R is the ability to access and manipulate the outputs of many functions.  For example, you can extract the kernel density estimates from density() and scale them to ensure that the resulting density integrates to 1 over its support set. I recently needed to get a frequency table of […]

Read more »

Popular posts from The DO Loop in 2014

January 2, 2015
By
Popular posts from The DO Loop in 2014

I published 118 blog posts in 2014. This article presents my most popular posts from 2014 and late 2013. 2014 will always be a special year for me because it was the year that the SAS University Edition was launched. The University Edition means that SAS/IML is available to all […]

Read more »

Exploratory Data Analysis – All Blog Posts on The Chemical Statistician

Exploratory Data Analysis – All Blog Posts on The Chemical Statistician

This series of posts introduced various methods of exploratory data analysis, providing theoretical backgrounds and practical examples.  Fully commented and readily usable R scripts are available for all topics for you to copy and paste for your own analysis!  Most of these posts involve data visualization and plotting, and I include a lot of detail and […]

Read more »

Initial steps towards reproducible research

December 4, 2014
By
Initial steps towards reproducible research

In anticipation of next week’s Reproducible Science Hackathon at NESCent, I was thinking about Christie Bahlai’s post on “Baby steps for the open-curious.” Moving from Ye Olde Standard Computational Science Practice to a fully reproducible workflow seems a monumental task, but partially reproducible is better than not-at-all reproducible, and it’d be good to give people […]

Read more »

Resampling and permutation tests in SAS

November 21, 2014
By
Resampling and permutation tests in SAS

My colleagues at the SAS & R blog recently posted an example of how to program a permutation test in SAS and R. Their SAS implementation used Base SAS and was "relatively cumbersome" (their words) when compared with the R code. In today's post I implement the permutation test in […]

Read more »

The distribution of blood types by country

November 7, 2014
By
The distribution of blood types by country

My colleague Robert Allison has a knack for finding fascinating data. Last week he did it again by locating data about how blood types and Rh factors vary among countries. He produced a series of eight world maps, each showing the prevalence of a blood type (A+, A-, B+, B-, […]

Read more »

Binning data by quantiles? Beware of rounded data

November 5, 2014
By
Binning data by quantiles? Beware of rounded data

In my article about how to create a quantile plot, I chose not to discuss a theoretical issue that occasionally occurs. The issue is that for discrete data (which includes rounded values), it might be impossible to use quantile values to split the data into k groups where each group […]

Read more »


Subscribe

Email:

  Subscribe