A colleague asked for help with randomly choosing a kid within a family. This is for a trial in which families are recruited at well-child visits, but in each family only one of the children having a well-child visit that day can be in the study. The...
Read more »
Tags: apply(), capture.output(), Matrix, methods(), proc freq, rand function, replicate(), sample(), SAS formats, SAS macro
Posted in SAS | Comments Off
In examples 9.30 and 9.31 we explored corrections for multiple testing and then extracting p-values adjusted by the Benjamini and Hochberg (or FDR) procedure. In this post we'll develop a simulation to explore the impact of "strong" and "weak" control...
Read more »
Tags: apply(), ifelse(), Matrix, p.adjust(), proc multtest, proc transpose, SAS macro, simulation studies
Posted in SAS | Comments Off
SAS's Rick Wicklin showed a simple loess smoother for the temperature data we showed here. Then he came back with a better approach that does away with edge effects. Rick's smoothing was calculated and plotted on a cartesian plane. In this entry we'...
Read more »
Tags: apply(), fitted(), Logic, plotrix package, Rick Wicklin Robert Allison
Posted in SAS | Comments Off
People here in the northeast US consider this to have been an unusually warm winter. Was it?The University of Dayton and the US Environmental Protection Agency maintain an archive of daily average temperatures that's reasonably current. In the case o...
Read more »
Tags: apply(), graphics, Logic, plotrix package, read from URL
Posted in SAS | Comments Off
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...
Read more »
Tags: apply(), arrays, axis statement, ceiling(), for(), Matrix, mdy function, paste(), probability, range of variables, sapply(), symbol statement
Posted in SAS | Comments Off
A colleague recently asked "why should the average get closer to the mean when we increase the sample size?" We should interpret this question as asking why the standard error of the mean gets smaller as n increases. The central limit theorem shows t...
Read more »
Tags: a*b=c syntax, apply(), graphics, looping, PROC GPLOT, running average, t() function, type="n"
Posted in SAS | Comments Off