Tag: range of variables

Example 9.21: The birthday "problem" re-examined

The so-called birthday paradox or birthday problem is simply the counter-intutitive discovery that the probability of (at least) two people in a group sharing a birthday goes up surprisingly fast as the group size increases. If the group is only 23 peo…

Example 8.20: Referencing lists of variables, part 2

In Example 8.19, we discussed how to refer to a group of variables with sequential names, such as varname1, varname2, varname3. This is trivial in SAS and can be done in R as we showed.It’s also sometimes useful to refer to all variables which begin w…

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…