# Articles by Nick Horton

### Example 8.14: generating standardized regression coefficients

November 15, 2010 |

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 |

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 |

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 |

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 |

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 |

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 |

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

### Second year of entries!

June 28, 2010 |

Hello, readers new and old!We started adding examples a year ago, in advance of the book's publication. To mark the occasion, we're closing chapter 7 and starting chapter 8 next week. We've crafted a listing of all entries from the first year and mad...
[Read more...]

### Example 7.41: hazard function plotting

June 14, 2010 |

As we continue with our series on survival analysis, we demonstrate how to plot estimated (smoothed) hazard functions. RWe will utilize the routines available in the muhaz package. Background information on the methods can be found in K.R. Hess, D.M....
[Read more...]

### Example 7.40: Nelson-Aalen plotting

June 7, 2010 |

In our previous entry, we described how to calculate the Nelson-Aalen estimate of cumulative hazard. In this entry, we display the estimates for the time to linkage to primary care for both the treatment and control groups in the HELP study.RWe use the...
[Read more...]

### Example 7.39: Nelson-Aalen estimate of cumulative hazard

May 31, 2010 |

In our previous example, we demonstrated how to calculate the Kaplan-Meier estimate of the survival function for time to event data. A related quantity is the Nelson-Aalen estimate of cumulative hazard. In addition to summarizing the hazard incurred ...
[Read more...]

### Example 7.38: Kaplan-Meier survival estimates

May 24, 2010 |

In example 7.30 we demonstrated how to simulate data from a Cox proportional hazards model.In this and the next few entries, we expand upon support in R and SAS for survival (time-to-event) models. We'll start with a small, artificial dataset of 19 su...
[Read more...]

### Example 7.37: calculation of Hotelling’s T^2

May 17, 2010 |

Hotelling's T^2 is a multivariate statistic used to compare two groups, where multiple outcomes are observed for each subject. Here we demonstrate how to calculate Hotelling's T^2 using R and SAS, and test the code using a simulation study then apply ...
[Read more...]

### Example 7.32: Add reference lines to a plot; fine control of tick marks

April 12, 2010 |

Sometimes it's useful to plot regular reference lines along with the data. For a time-series plot, this can show when critical values are reached in a clearer way than simple tick marks.As an example, we revisit the empirical CDF plot shown in Example...
[Read more...]

### Augmented support for complex survey designs in R

March 3, 2010 |

We'll get back to code examples later this week, but wanted to let you know about an R package with updated functionality in the meantime.The appropriate analysis of sample surveys requires incorporation of complex design features, including stratification, clustering, weights, and finite population correction. These can be address in ...
[Read more...]

### Example 7.24: Sampling from a pathological distribution

March 1, 2010 |

Evans and Rosenthal consider ways to sample from a distribution with density given by:f(y) = c e^(-y^4)(1+|y|)^3where c is a normalizing constant and y is defined on the whole real line.Use of the probability integral transform (section 1.10.8) is not feasible in this setting, given the ...
[Read more...]

### Example 7.22: the Knapsack problem

January 13, 2010 |

The website http://rosettacode.org/wiki/Knapsack_Problem describes a fanciful trip by a traveler to Shangri La. They can take as many as they want of three valuable items, as long as they fit in a knapsack. The knapsack will hold no more than 25 weight units, and no more ...
[Read more...]

### Example 7.17: The Smith College diploma problem

November 12, 2009 |

Smith College is a residential women's liberal arts college in Northampton, MA that is steeped in tradition. One such tradition is to give each student at graduation a diploma at random (or more accurately, in a haphazard fashion). At the end of the ceremony, a diploma circle is formed, and ...
[Read more...]

### Example 7.16: assess robustness of permutation test to violations of exchangeability assumption

October 24, 2009 |

Permutation tests (section 2.4.3) are a form of resampling based inference that can be used to compare two groups. A simple univariate two-group permutation test requires that the group labels for the observations are exchangeable under the null hypothesis of equal distributions, but allows relaxation of specific distributional assumptions required by ...
[Read more...]

### Example 7.13: Read a file with two lines per observation

September 24, 2009 |

In example 7.6 we showed how to retrieve the Amazon sales rank of a book. A cron job on one of our machines grabs the sales rank hourly. We’d like to use this data to satisfy our curiosity about when and how often a book sells. A complication is that ...
[Read more...]
1 2 3 4

# Never miss an update! Subscribe to R-bloggers to receive e-mails with the latest R posts.(You will not see this message again.)

Click here to close (This popup will not appear again)