In example 9.30 we explored the effects of adjusting for multiple testing using the Bonferroni and Benjamini-Hochberg (or false discovery rate, FDR) procedures. At the time we claimed that it would probably be inappropriate to extract the adjusted p-v...
Read more »
Tags: array statement, Benjamini and Hochberg, do loop, false discovery rate, multiple comparisons, p.adjust(), rbind(), rep(), set statement options
Posted in SAS | Comments Off
if you’ve ever needed to stop processing a loop under certain conditions but pick back up with the next iteration of the loop, use the continue statement;
data _null_;
do i = 1 to 3;
...
Read more »
Tags: do loop
Posted in SAS | Comments Off
The DIM function returns the number of literal elements in an array. It functions against multi-dimensional arrays as well as one-dimensional arrays. 1-dimensional array example DIM(array_name) Multi-dimensional array examples DIM(m_array) -> returns the number of elements in the first dimension of the array DIM5(m_array) -> returns the number of elements in the 5th dimension...
Read more »
Tags: AAG, AFHood Analytics Group, analytics consulting, conditional processing, dim, dim function, do loop, do loop processing, do loops, dynamic, function, loops, multi-dimensional array, one-dimensional array, SAS, SAS Code, sas function
Posted in SAS | Comments Off
this is a cross posting from this sas discussion forum. assuming you know the min and max of allowable dates (01jan2005 - 30jun2009, for example), you can use random functions. data randates; mindate='01jan2005'd; maxdate='30jun2009'd; range = m...
Read more »
Tags: dates, do loop, function, sas discussion forums
Posted in SAS | Comments Off
this is a cross posting from this sas discussion forum. assuming you know the min and max of allowable dates (01jan2005 - 30jun2009, for example), you can use random functions. data randates; mindate='01jan2005'd; maxdate='30jun2009'd; range = max...
Read more »
Tags: blogger, dates, do loop, function, sas discussion forums
Posted in SAS | Comments Off
sas has a lot of date-related formats…roman numerals, julian dates, jewish calendars, etc.today i came across the need to format dates by quarter similar to yyq6. (as in 2008Q3), but instead qyy6. (as in Q32008.) i needed to use the dates as variable...
Read more »
Tags: do loop, format
Posted in SAS | Comments Off
sas has a lot of date-related formats…roman numerals, julian dates, jewish calendars, etc.today i came across the need to format dates by quarter similar to yyq6. (as in 2008Q3), but instead qyy6. (as in Q32008.) i needed to use the dates as variable...
Read more »
Tags: blogger, do loop, format
Posted in SAS | Comments Off
let's start off with a simple macro that spits out some text and the value of a variable:%macro ex(text,var); %put &text &var;%mend;now let's try to execute the macro twice, once in a call execute statement ('in call' at line 353) and then in ...
Read more »
Tags: do loop, macro
Posted in SAS | Comments Off