Blog Archives

Example 8.19: Referencing lists of variables

January 3, 2011
By
Example 8.19: Referencing lists of variables

In section 1.11.4 (p. 50), we discuss referring to lists of variables in a data set. In SAS, this can be done for variable stored in adjacent columns with the "var_x -- var_y" syntax and for variables with sequentially enumerated suffixes with the "va...

Read more »

Tools to tidy up R code

December 28, 2010
By
Tools to tidy up R code

Last week we made an impassioned plea for attention to style in formatting R and SAS code.While it's always better to adopt a consistent style and use it whenever you write code, the reality is that sometimes formatting slips (or you end up repurposing...

Read more »

A plea for consistent style!

December 22, 2010
By
A plea for consistent style!

As we get close to the end of the year, it's time to look back over the past year and think of resolutions for 2011 and beyond. One that's often on my mind relates to ways to structure my code to make it clearer to others (as well as to myself when I l...

Read more »

Example 8.14: generating standardized regression coefficients

November 15, 2010
By
Example 8.14: generating standardized regression coefficients

Standardized (or beta) coefficients from a linear regression model are the parameter estimates obtained when the predictors and outcomes have been standardized to have variance = 1. Alternatively, the regression model can be fit and then standardized ...

Read more »

Example 8.11: violin plots

October 26, 2010
By
Example 8.11: violin plots

We've continued to get useful feedback and ideas from our posts on the combination dotplot/boxplot and other ways to craft similar displays. Another notion is the violin plot, which combines a boxplot and a (doubled) kernel density plot. While the ba...

Read more »

Reader suggestions on alternative ways to create combination dotplot/boxplot

October 24, 2010
By
Reader suggestions on alternative ways to create combination dotplot/boxplot

Kudos to several of our readers, who suggested simpler ways to craft the graphical display (combination dotplot/boxplot) from our most recent example.Yihui Xie combines a boxplot with a coarsened version of the PCS scores (using the round() function) u...

Read more »

Example 8.10: Combination dotplot/boxplot (teaching graphic in honor of World Statistics Day)

October 19, 2010
By
Example 8.10: Combination dotplot/boxplot (teaching graphic in honor of World Statistics Day)

In honor of World Statistics Day and the read paper that my co-authors Chris Wild, Maxine Pfannkuch, Matt Regan, and I are presenting at the Royal Statistical Society today, we present the R code to generate a combination dotplot/boxplot that is useful...

Read more »

Example 8.3: pyramid plots

August 30, 2010
By
Example 8.3: pyramid plots

Pyramid plots are a common way to display the distribution of age groups in a human population. The percentages of people within a given age category are arranged in a barplot, often back to back. Such displays can be used distinguish males vs. femal...

Read more »

Using SAS for Data Management, Statistical Analysis, and Graphics

July 26, 2010
By
Using SAS for Data Management, Statistical Analysis, and Graphics

Our newest book, Using SAS for Data Management, Statistical Analysis and Graphics, will soon be shipping from Amazon, CRC Press, and other fine retailers. The book complements our SAS and R book, particularly for users less interested in R. It presen...

Read more »

Using R for Data Management, Statistical Analysis and Graphics soon to start shipping

July 19, 2010
By
Using R for Data Management, Statistical Analysis and Graphics soon to start shipping

Our newest book, Using R for Data Management, Statistical Analysis and Graphics, is anticipated to soon start shipping from Amazon, CRC Press, and other fine retailers. The book complements our existing SAS and R book, particularly for users less inte...

Read more »