ABSTRACT

This chapter introduces basic programming strategies and concepts such as subdividing larger tasks into subtasks that are implemented, pseudocode for outlining solutions conditional execution of statements, and looping to repeat code blocks. Precedence of operations in expressions is described along with the impact of missing data on functions. Arrays are objects that can store a collection of variables that allow for processing a large number of variables using a simple set of code. The recoding of missing values is used to illustrate programming with arrays. Functions associated with probability distribution including density or probability, cumulative distribution functions, and quantiles are introduced along with functions for generating random samples from such distribution. These functions are used in case studies associated with studying the sensitivity of a statistical test to violations of assumptions, constructing simple bootstrap confidence intervals, and randomization tests.