Of course you know how to create graphs ... But do you often find that preparing the data to plot is often the hardest part? Well then, this blog post is for you! I'll be demonstrating how to import Excel data into SAS, transpose the data, use what wer...

Read more »

Tags: debt, education, excel, IMPORT, proc transpose, Uncategorized

Posted in SAS | Comments Off on Import Excel data, transpose, and plot it!

Datasets can present themselves in different ways. Identical data can bet arranged differently, often as wide or tall datasets. Generally, the tall dataset is better. Learn how to convert wide data into tall data with PROC TRANSPOSE.
The post "Wid...

Read more »

Tags: proc transpose, SAS programmers, sas programming, tips and tricks, Uncategorized

Posted in SAS | Comments Off on “Wide” versus “Tall” data: PROC TRANSPOSE v. the DATA step

A recent post pointed us to a great talk that elegantly described how inferences from a trial could be analyzed with a purely resampling-based approach. The talk uses data from a paper that considered the association between beer consumption and mosqu...

Read more »

Tags: do(), mosaic package, Proc Surveyselect, proc transpose, replicate()

Posted in SAS | Comments Off on Example 2014.13: Statistics doesn’t have to be so hard! Resampling in R and SAS

Data with repeated measures often come to us in the "wide" format, as shown below for the HELP data set we use in our book. Here we show just an ID, the CESD depression measure from four follow-up assessments, plus the baseline CESD.

Obs ID CESD1 ...

Read more »

Tags: arrange(), dplyr, gather(), Hadley Wickham, proc transpose, reshape(), tidyr, wide to narrow

Posted in SAS | Comments Off on Example 2014.12: Changing repeated measures data from wide to narrow format

Hello, folks! I'm pleased to report that Nick and I have turned in the manuscript for the second edition of SAS and R: Data Management, Statistical Analysis, and Graphics. It should be available this summer. New material includes some of our more po...

Read more »

Tags: binomial probability, end, exact CI, lapply(), proc transpose, sapply(), sensitivity

Posted in SAS | Comments Off on Example 2014.1: "Power" for a binomial probability, plus: News!

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

New in SAS 9.2, the TRANSPOSE procedure accepts multiple IDs in its ID statement. More than one IDs would automatically concatenate together as the new variable names. Previously, Proc Transpose usually only allows one ID. As the result, the concatena...

Read more »

Tags: data strucutre, proc transpose

Posted in SAS | Comments Off on A two-step transpose approach to reshape data

The question is raised from http://www.listserv.uga.edu/cgi-bin/wa?A2=ind1005d&L=sas-l&F=&S=&P=11947proc sort data=indat out=one; by subjid vist;run;proc transpose data=one out=two ; var result; by subjid vist; run;proc transpose data=o...

Read more »

Tags: proc sql, proc transpose

Posted in SAS | Comments Off on My answer to a complex transpose question from SAS-L