We're both users of multiple imputation for missing data. We believe it is the most practical principled method for incorporating the most information into data analysis. In fact, one of our more successful collaborations is a review of software for ...

Read more »

Tags: ifelse(), imputation, PROC STANDARD

Posted in SAS | Comments Off on Example 2014.5: Simple mean imputation

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 on Example 9.32: Multiple testing simulation

A recent exchange on the R-sig-teaching list featured a discussion of how best to teach new students R. The initial post included an exercise to write a function, that given a n, will draw n rows of a triangle made up of "*", noting that for a beginne...

Read more »

Tags: apply family of functions, array statement, ifelse(), lapply() function, looping, Michael Weylandt, outer() function, output statement, R Inferno, R-sig-teaching, Richard Heiberger

Posted in SAS | Comments Off on Example 9.29: the perils of for loops

It's often useful to compare histograms for some key variable, stratified by levels of some other variable. There are several ways to display something like this. The simplest may be to plot the two histograms in separate panels.SASIn SAS, the most d...

Read more »

Tags: histogram, ifelse(), lattice library, panelby statement, proc sgpanel, side by side histograms

Posted in SAS | Comments Off on Example 8.40: Side-by-side histograms

It's often useful to compare histograms for some key variable, stratified by levels of some other variable. There are several ways to display something like this. The simplest may be to plot the two histograms in separate panels.SASIn SAS, the most d...

Read more »

Tags: histogram, ifelse(), lattice library, panelby statement, proc sgpanel, side by side histograms

Posted in SAS | Comments Off on Example 8.40: Side-by-side histograms

It's often useful to compare histograms for some key variable, stratified by levels of some other variable. There are several ways to display something like this. The simplest may be to plot the two histograms in separate panels.SASIn SAS, the most d...

Read more »

Tags: histogram, ifelse(), lattice library, panelby statement, proc sgpanel, side by side histograms

Posted in SAS | Comments Off on Example 8.40: Side-by-side histograms

Latent class analysis is a technique used to classify observations based on patterns of categorical responses. Collins and Lanza's book,"Latent Class and Latent Transition Analysis," provides a readable introduction, while the UCLA ATS center has an o...

Read more »

Tags: HELP data set, ifelse(), latent class analysis, manifest variable, poLCA package, proc lca, unobserved class, within()

Posted in SAS | Comments Off on Example 8.21: latent class analysis