Catalogs of posts

Examples 7.1 - 7.42

Example 7.1: Create a Fibonacci sequence

Example 7.2: Simulate data from a logistic regression

Example 7.3: Simple jittered scatterplot with smoother for dichotomous outcomes with continuous predictors

Example 7.4: A prettier jittered scatterplot

Example 7.5: Replicating a prettier jittered scatterplot

Example 7.6: Find Amazon sales rank for a book

Example 7.7: Tabulate binomial probabilities

Example 7.8: Plot two empirical cumulative density functions using available tools

Example 7.9: Get data from SAS into R

Example 7.10: Get data from R into SAS

Example 7.11: Plot an empirical cumulative distribution function from scratch

Example 7.12: Calculate and plot a running average

Example 7.13: Read a file with two lines per observation

Example 7.14: A simple graphic of sales

Example 7.15: A more complex sales graphic

Example 7.16: Assess robustness of permutation test to violations of exchangeability assumption

Example 7.17: The Smith College diploma problem

Example 7.18: Displaying missing value categories in a table

Example 7.19: Find the closest pair of observations

Example 7.20: Simulate categorical data

Example 7.21: Write a function to simulate categorical data

Example 7.22: The Knapsack problem

Example 7.23: The Monty Hall problem

Example 7.24: Sampling from a pathological distribution

Example 7.25: Compare draws with distribution

Example 7.26: Probability question

Example 7.27: Probability question reconsidered

Example 7.28: Bubble plots

Example 7.29: Bubble plots colored by a fourth variable

Example 7.30: Simulate censored survival data

Example 7.31: Contour plot of BMI by weight and height

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

Example 7.33: Specifying fonts in graphics

Example 7.34: Propensity scores and causal inference from observational studies

Example 7.35: Propensity score matching

Example 7.36: Prospensity score stratification

Example 7.37: Calculation of Hotelling's T^2

Example 7.38: Kaplan-Meier survival estimates

Example 7.39: Nelson-Aalen estimate of cumulative hazard

Example 7.40: Nelson-Aalen plotting

Example 7.41: Hazard function plotting

Example 7.42: Testing Cox model proportionality assumption