= %sysfunc(dequote(&ds_in)); = %sysfunc(dequote(&var));

Size: px
Start display at page:

Download "= %sysfunc(dequote(&ds_in)); = %sysfunc(dequote(&var));"

Transcription

1 / SUGI PAPER Adding Statistical Functionality to the DATA Step with FCMP BY: Stacey Christian and Jacques Rioux EXAMPLE 1: Recursive Algorithm for Segmenting Time Series Data / / Macro to get number of observations in a dataset Parameters: ds - name of dataset get nobs for nobs - output / %macro get_nobs_macro; %let ds = %sysfunc(dequote(&ds)); %let nobs=0; %let dsid=%sysfunc(open(&ds,i)); %if &dsid ^= 0 %then %do; %let nobs=%sysfunc(attrn(&dsid,nlobs)); %let rc=%sysfunc(close(&dsid)); % %mend get_nobs_macro; / Macro to append segment information to dataset Parameters: seg_ds - name of dataset append to first_obs - first row in segment last_obs - last row in segment error - approximation error for segment / %macro append_segment_macro; %let seg_ds = %sysfunc(dequote(&seg_ds)); data _temp_; start = &first_obs; end = &last_obs; error = &error; proc append base=&seg_ds data=_temp_ force; %mend append_segment_macro;

2 / Macro to perform a linear approximation of a segment of time series data using PROC REG. Parameters: ds_in - name of segment dataset first_obs - first row in segment last_obs - last row in segment var - variable to model interval - time interval Output Parameters: error - approximation error for segment / %macro linear_approximation_macro; %let ds_in %let var = %sysfunc(dequote(&ds_in)); = %sysfunc(dequote(&var)); data _temp1_; set &ds_in(firstobs=&first_obs obs=&last_obs); retain _TREND_ 0; _TREND_ = _TREND_ + 1; proc reg data=_temp1_ outest=_est_ noprint; model &var = _TREND_ / sse; output out=_reg_&first_obs._&last_obs. p=predict; quit; proc sql noprint; select _SSE_ into :ERROR from _est_; quit; %mend linear_approximation_macro; / FCMP Function wrappers for above macros / proc fcmp outlib=sasuser.examples.topdown; function get_nobs(ds $); nobs = 0; rc = run_macro( 'get_nobs_macro', ds, nobs ); return(nobs); subroutine append_segment(seg_ds $, start, end, error); first_obs = start; last_obs = rc = run_macro( 'append_segment_macro', seg_ds, first_obs, last_obs, error ); function linear_approximation(ds_in $, var $, interval $, first_obs, last_obs); error =.; rc = run_macro('linear_approximation_macro', ds_in, first_obs, last_obs, var, interval, error); return(error);

3 / set cmplib option so our functions can be found / options cmplib= sasuser.examples; / Top-Down Segmentation Function. Resursively splits data in half until segments meet threshold criteria. Parameters: data : time-series data to segment var : variable to model interval : interval of data start : first row (MISSING first time) end : last row (MISSING first time) error : error for current segment (MISSING first time) threshold : threshold for error improvement (percentage) min_seg : minimum observations for segment Output Parameters: seg_data - dataset to write segment info / proc fcmp outlib=sasuser.examples.topdown; subroutine segment_topdown(data $, seg_data $, var $, interval $, start_in, end_in, error_in, threshold, min_seg); /- initial setup -/ if (start_in eq.) then start = 1; else start=start_in; if (end_in eq.) then end = get_nobs(data); else end=end_in; /- calculate error on current segment -/ if (error_in eq.) then do; error = linear_approximation(data,var,interval,start,end); else do; error = error_in; put "segment_topdown called with" start= end= error= ; /- calculate mid point -/ mid = start + floor((end-start)/2); /- calculate error on LEFT SEGMENT -/ left_error = linear_approximation(data,var,interval,start,mid); /- calculate error on RIGHT SEGMENT -/ right_error = linear_approximation(data,var,interval,mid+1,end); /- calculate combined error improvement -/ combined_error = left_error + right_error; improvement = (error - combined_error) / error; splitlength = mid-start; put combined_error= improvement=; / recursively split segment / if (improvement > threshold AND splitlength/2 >= min_seg) then do;

4 / left segment / call segment_topdown(data,seg_data,var,interval, start,mid,left_error,threshold,min_seg); / right segment / call segment_topdown(data,seg_data,var,interval, mid+1,end,right_error,threshold,min_seg); / else store current segment / else do; call append_segment(seg_data,start,end,error); / make sure there are no old datasets hanging around / proc datasets library=work memtype=data nolist; delete _reg_: segds_: ; quit; libname sugi "\\d71235\public\sugi"; data _NULL_; call segment_topdown("sugi.snp", "work.segds_reg_15", "close", "daily",.,.,., 0.15, 10); call segment_topdown("sugi.snp", "work.segds_reg_20", "close", "daily",.,.,., 0.20, 10);

5 / SUGI PAPER Adding Statistical Functionality to the DATA Step with FCMP BY: Stacey Christian and Jacques Rioux EXAMPLE 1: Recursive algorithm with PROC REG to segment time series data Code for plotting piecewise linear approximations versus original data / / Macro to plot the piecewise linear approximations versus original data. Parameters: seg_ds - name of segment dataset var - variable that was modeled interval - interval of data prefix - ds name prefix for regression data / %macro plot_segments_macro; %let seg_ds = %sysfunc(dequote(&seg_ds)); %let prefix = %sysfunc(dequote(&prefix)); %let var = %sysfunc(dequote(&var)); %let interval = %sysfunc(dequote(&interval)); / combined segments in one dataset / %let nobs=0; %let ds=&seg_ds; %get_nobs_macro; %do i=1 %to &nobs; data _NULL_; set &seg_ds(firstobs=&i obs=&i); length dsname $ 256; dsname = trim(left("&prefix")) trim(left(start)) "_" trim(left(end)); call symputx("ds&i", trim(dsname)); % data _combined_; set &ds1; %do i=2 %to &nobs; proc append base= _combined_ data = &&ds&i; % data _combined_; set _combined_; label PREDICT="Linear Approximation of &var"; ods graphics on; ods html; proc sgplot data=_combined_; series x=date y=&var / lineattrs=(pattern=solid thickness=0.1); series x=date y=predict / lineattrs=(pattern=solid thickness=1); ods graphics off; ods html close; %mend plot_segments_macro;

6 / FCMP Function wrapper for plotting macro / proc fcmp outlib=sasuser.examples.topdown; subroutine plot_segments(seg_ds $, var $, interval $, prefix $); rc = run_macro('plot_segments_macro', seg_ds, var, interval, prefix); / Run plotting code from DATA step / options cmplib=(sasuser.examples) nomprint; data _NULL_; call plot_segments("segds_reg_15","close","daily","_reg_"); call plot_segments("segds_reg_20","close","daily","_reg_");

7 / SUGI PAPER Adding Statistical Functionality to the DATA Step with FCMP BY: Stacey Christian and Jacques Rioux EXAMPLE 2: Iteratively Reweighted Least Squares Algorithm Data creation for example / // / Macro to create a sample simulated data set: / / The base survival model is Exponential with mean=10 / / There are 3 categorical covariates: X1, X2 and X3 / / X1 = 0 or 1 / / X2 = 0 or 0.4 or 0.9 / / X3 = -1 or 1 / / The model simulated corresponds to 0.1X X X3 / / The variables in the dataset are X1, X2, X3,Quarter, and Count / // %macro generate_survival_data_macro; %let dsname = %sysfunc(dequote(&dsname)); DATA &dsname; array AX1[2] _temporary_ (0 1); array AX2[3] _temporary_ ( ); array AX3[2] _temporary_ (-1 1); array ATime_[13] Time_0-Time_12; do i = 1 to dim(ax1); do j = 1 to dim(ax2); do k = 1 to dim(ax3); X1 = AX1[i]; X2 = AX2[j]; X3 = AX3[k]; Effect = exp(0.1 X X X3); do l = 1 to 13; ATime_[l] = 0; do l = 1 to 1000; Time = 10/Effect rand("exponential"); Quarters = ceil(4time); do m = 1 to 13; if Quarters > m-1 then do; ATime_[m] = ATime_[m] + 1; lastsurv = 1; do l = 1 to 13; Quarter = l - 1; Count = ATime_[l]; Surv = 1 - cdf("exponential",(l-1)/40); Prob = Surv/lastSurv; lastsurv = Surv; output;

8 drop Effect Surv Prob; drop i j k l m quarters lastsurv time time_:; RUN; %mend generate_survival_data_macro; // / run macro and create data for Example 2 / // %let dsname= mdphdata; %generate_survival_data_macro;

9 / SUGI PAPER Adding Statistical Functionality to the DATA Step with FCMP BY: Stacey Christian and Jacques Rioux EXAMPLE 2: Iteratively Reweighted Least Squares Algorithm / / Macro to prepare data for the Iteratively Weighted Least Squares Algorithm. Creates indicator variables for each time interval and calculates log_log_pij = log(-log(prob of survival)) Parameters: data : the dataset on which to run the PH model count : name of the count variable time : name of the time variable regressors : list of regression variables outdata : output dataset to be created intervalcount : number of time intervals (OUT) intervalvars : Interval_1-Interval_N (OUT) / %macro prepare_phdata_macro; %let data = %sysfunc( dequote(&data )); %let count = %sysfunc( dequote(&count )); %let time = %sysfunc( dequote(&time )); %let regressors = %sysfunc( dequote(&regressors )); %let outdata = %sysfunc( dequote(&outdata )); %let intervalvars = %sysfunc( dequote(&intervalvars )); proc sort data=&data out =&outdata; by &regressors &time; proc sql noprint; select distinct &time into :times separated by " " from &outdata order by &time ; select count(distinct &time) into :timecount from &outdata order by &time ; select max(&time) into :MaxTime from &outdata ; quit; %let IntervalCount = %eval(&timecount-1); data &outdata; set &outdata; retain LastCount 0 LastTime &MaxTime; array TimeIndicator[&IntervalCount] Interval_1-Interval_%trim(&IntervalCount); array Times[&TimeCount] _TEMPORARY_ (&Times); if &Time > LastTime then do;

10 do i = 1 to &IntervalCount; if &Time = Times[i+1] then do; TimeIndicator[i] = 1; else do; TimeIndicator[i] = 0; Nij = LastCount; Pij = &Count/LastCount; Log_Log_Pij = log(-log(&count/lastcount)); Weight = 1.0; output; LastCount = &Count; LastTime = &Time; drop &Count i LastTime LastCount; %let intervalvars = Interval_1-Interval_%trim(&IntervalCount); %mend prepare_phdata_macro; / Macro that uses proc REG to run regression Parameters: data : the dataset on which to run the regression params : output dataset for the fitted parameters dependent : name of the dependent variable independent : space delimited list of independent variables weight : name of the weighting variable / %macro run_regression_macro; %let data = %sysfunc( dequote(&data) ); %let params = %sysfunc( dequote(&params) ); %let dependent = %sysfunc( dequote(&dependent) ); %let independent = %sysfunc( dequote(&independent) ); %let weight = %sysfunc( dequote(&weight) ); proc reg data=&data outest=&params NOPRINT; model &dependent = &independent/noint; weight &weight; quit; data &params; set &params; keep &independent; %mend run_regression_macro;

11 / Macro to recompute the regression weight at every iteration in data set passed. Parameters: data : the dataset on which to reweight params : output parameter data set from proc reg regressors : name of the regression variables weight : name of the weighting variable / %macro update_weights_macro; %let data = %sysfunc( dequote(&data) ); %let params = %sysfunc( dequote(&params) ); %let regressors = %sysfunc( dequote(&regressors)); %let weight = %sysfunc( dequote(&weight)); data &params._params; set &params; / set Param_x1 = x1; Param_x2 = x2;... / %let nvar = 1; %let Var = %scan(&regressors, &nvar, ' '); %do %while ("&Var" ne ""); Param_&Var. = &Var; %let nvar = %eval(&nvar + 1); %let Var = %scan(&regressors, &nvar, ' '); % / set Param_Interval_1 = Interval_1;... / %do i = 1 %to &intervalcount; Param_Interval_&i = Interval_&i; % keep Param_:; / merge params with data / proc sql noprint; create table _temp_ as select from &data, &params._params; quit; / re-calculate weight / data &data; set _temp_; retain LastSj 1 lasttime 0; array Param_Interval[&intervalCount] Param_Interval_1 - Param_Interval_&intervalCount; array Interval[&intervalCount] Interval_1 - Interval_&intervalCount; Pj = 0; do i = 1 to &intervalcount.; Pj = Pj + exp(-exp(param_interval[i])) Interval[i]; if _N_ = 1 then do; Sj = Pj; else do; if &time < lasttime then do; Sj = Pj ; else do; Sj = LastSj Pj; / ExpXB = exp(param_x1 x1 + Param_x2 x Param_xn xn); / ExpXB = exp(0 %let nvar = 1;

12 ); %let Var = %scan(&regressors, &nvar, ' '); %do %while ("&Var" ne ""); + Param_&Var. &Var %let nvar = %eval(&nvar + 1); %let Var = %scan(&regressors, &nvar, ' '); % &Weight = ( 1 - PjExpXB ) / Nij / PjExpXB / ExpXB2 / log(pj)2; LastSj = Sj; LastTime = &time; drop LastTime LastSj i Param_:; %mend update_weights_macro;

13 / FCMP Functions Wrappers for macros above / proc fcmp outlib=sasuser.example2.mindist; subroutine prepare_phdata(data $, count $, time $, regressors $, outdata $, intervalcount, intervalvars $); outargs intervalcount, intervalvars; intervalvars = ""; intervalcount =.; rc = run_macro ( 'prepare_phdata_macro', data, count, time, regressors, outdata, intervalcount, intervalvars ); subroutine run_regression( data $, dependent $, independent $, weight $, params $, paramarray[]); outargs paramarray; array tmparray[1] _temporary_; call dynamic_array(tmparray,dim(paramarray)); rc = RUN_MACRO ('run_regression_macro', data, params, dependent, independent, weight) ; rc = read_array(params, tmparray); do i = 1 to dim(paramarray); paramarray[i] = tmparray[1,i]; subroutine update_weights( data $, params $, regressors $, weight $, intervalcount); rc = RUN_MACRO ('update_weights_macro', data, params, regressors, weight, intervalcount); function calc_max_relative_diff(params1[],params2[]); outargs params1; maxrelativedifference = 0; numparams = DIM(params1); do i = 1 to numparams; maxrelativedifference = max( maxrelativedifference, abs((params1[i]-params2[i])/params2[i])); params1[i] = params2[i]; return(maxrelativedifference);

14 // / / / The main algorithm to implement the Iteratively Reweighted / / Least Square Estimator. / / / / Parameters: / / data : the dataset on which to run the PH model / / outdata : output dataset for the fitted parameters / / count : name of the count variable / / time : name of the time variable / / regressors : name of the weighting variable / / paramds : fitted parameters dataset name / / / // options cmplib=sasuser.example2; %let numparams = 15; %let data = "work.mdphdata"; %let prepareddata = "work.outdata"; %let paramdata = "work.phresults"; %let regressors = "x1 x2 x3"; %let regcount = 3; %let depvar = "log_log_pij"; %let weightvar = "Weight"; data _NULL_; /- initial data preparation -/ length intervalvars $ 128; intervalcount = 0; intervalvars = ""; call prepare_phdata( &data, "Count", "Quarter", &regressors, &prepareddata, intervalcount, intervalvars ); independentvars = &regressors " " intervalvars; array params1[&numparams] _temporary_; array params2[&numparams] _temporary_; /- initial regression run with initial weights -/ call run_regression( &prepareddata, &depvar,independentvars, &weightvar, &paramdata, params1 ); /- iterative loop -/ maxrelativedifference = 1; do while( maxrelativedifference > ); call update_weights(&prepareddata, &paramdata, &regressors, &weightvar, intervalcount); call run_regression( &prepareddata, &depvar,independentvars, &weightvar, &paramdata, params2 ); maxrelativedifference = calc_max_relative_diff(params1,params2); put maxrelativedifference=; call update_weights(&prepareddata, &paramdata, &regressors, &weightvar, intervalcount);

15 / SUGI PAPER Adding Statistical Functionality to the DATA Step with FCMP BY: Stacey Christian and Jacques Rioux EXAMPLE 3: Proportional Hazard Model Simulation / %macro append_data_macro; %let data = %sysfunc( dequote(&data) ); %let base = %sysfunc( dequote(&base) ); proc append base = &base data = &data force; quit; %mend append_data_macro; proc fcmp outlib=sasuser.example2.sim ; subroutine simulate_phdata( dsname $); rc = run_macro('generate_survival_data_macro', dsname); subroutine append_data( base $, data $ ); rc = run_macro('append_data_macro', base, data ); subroutine fit_ph_model(data $, parmdataout $, countvar $, timevar $, depvar $, weightvar $, regressors $); /- initial data preparation -/ length intervalvars $ 128; intervalcount = 0; intervalvars = ""; call prepare_phdata( data, "Count", "Quarter", regressors, "_prepdat_", intervalcount, intervalvars ); independentvars = regressors " " intervalvars; /- create param arrays dynamically / numparams = intervalcount + count(regressors, " ")+1; array params1[1] _temporary_; array params2[1] _temporary_; call dynamic_array(params1, numparams ); call dynamic_array(params2, numparams ); /- initial regression run with initial weights -/ call run_regression( "_prepdat_", depvar, independentvars, weightvar, parmdataout, params1 ); /- iterative loop -/ maxrelativedifference = 1; do while( maxrelativedifference > ); call update_weights("_prepdat_", parmdataout, regressors, weightvar, intervalcount); call run_regression( "_prepdat_", depvar, independentvars, weightvar, parmdataout, params2 ); maxrelativedifference = calc_max_relative_diff(params1,params2); put maxrelativedifference=;

16 call update_weights("_prepdat_", parmdataout, regressors, weightvar, intervalcount); / Run the simulation / options cmplib=(sasuser.example2); %let NSIM=20; proc fcmp; do i=1 to &NSIM; put ""; put "Simulation" i; put ""; call simulate_phdata("work.simdata"); call fit_ph_model("work.simdata", "work.params", "Count", "Quarter", "log_log_pij", "Weight", "x1 x2 x3"); call append_data("work.simresults", "work.params"); proc summary data= work.simresults; var X1 X2 X3 Interval_1-Interval_12; output out = work.simsummary mean = meanx1 meanx2 meanx3 meaninterval_1-meaninterval_12 var = varx1 varx2 varx3 varinterval_1-varinterval_12 ;

Validation Summary using SYSINFO

Validation Summary using SYSINFO Validation Summary using SYSINFO Srinivas Vanam Mahipal Vanam Shravani Vanam Percept Pharma Services, Bridgewater, NJ ABSTRACT This paper presents a macro that produces a Validation Summary using SYSINFO

More information

RUN_MACRO Run! With PROC FCMP and the RUN_MACRO Function from SAS 9.2, Your SAS Programs Are All Grown Up

RUN_MACRO Run! With PROC FCMP and the RUN_MACRO Function from SAS 9.2, Your SAS Programs Are All Grown Up ABSTRACT Paper BON-02 RUN_MACRO Run! With PROC FCMP and the RUN_MACRO Function from SAS 9.2, Your SAS Programs Are All Grown Up Dylan Ellis, Mathematica Policy Research, Washington, DC When SAS first came

More information

Submitting SAS Code On The Side

Submitting SAS Code On The Side ABSTRACT PharmaSUG 2013 - Paper AD24-SAS Submitting SAS Code On The Side Rick Langston, SAS Institute Inc., Cary NC This paper explains the new DOSUBL function and how it can submit SAS code to run "on

More information

SD10 A SAS MACRO FOR PERFORMING BACKWARD SELECTION IN PROC SURVEYREG

SD10 A SAS MACRO FOR PERFORMING BACKWARD SELECTION IN PROC SURVEYREG Paper SD10 A SAS MACRO FOR PERFORMING BACKWARD SELECTION IN PROC SURVEYREG Qixuan Chen, University of Michigan, Ann Arbor, MI Brenda Gillespie, University of Michigan, Ann Arbor, MI ABSTRACT This paper

More information

A SAS Macro Utility to Modify and Validate RTF Outputs for Regional Analyses Jagan Mohan Achi, PPD, Austin, TX Joshua N. Winters, PPD, Rochester, NY

A SAS Macro Utility to Modify and Validate RTF Outputs for Regional Analyses Jagan Mohan Achi, PPD, Austin, TX Joshua N. Winters, PPD, Rochester, NY PharmaSUG 2014 - Paper BB14 A SAS Macro Utility to Modify and Validate RTF Outputs for Regional Analyses Jagan Mohan Achi, PPD, Austin, TX Joshua N. Winters, PPD, Rochester, NY ABSTRACT Clinical Study

More information

Macro to compute best transform variable for the model

Macro to compute best transform variable for the model Paper 3103-2015 Macro to compute best transform variable for the model Nancy Hu, Discover Financial Service ABSTRACT This study is intended to assist Analysts to generate the best of variables using simple

More information

Paper ST-157. Dennis J. Beal, Science Applications International Corporation, Oak Ridge, Tennessee

Paper ST-157. Dennis J. Beal, Science Applications International Corporation, Oak Ridge, Tennessee Paper ST-157 SAS Code for Variable Selection in Multiple Linear Regression Models Using Information Criteria Methods with Explicit Enumeration for a Large Number of Independent Regressors Dennis J. Beal,

More information

A Simple Framework for Sequentially Processing Hierarchical Data Sets for Large Surveys

A Simple Framework for Sequentially Processing Hierarchical Data Sets for Large Surveys A Simple Framework for Sequentially Processing Hierarchical Data Sets for Large Surveys Richard L. Downs, Jr. and Pura A. Peréz U.S. Bureau of the Census, Washington, D.C. ABSTRACT This paper explains

More information

1 Files to download. 3 Macro to list the highest and lowest N data values. 2 Reading in the example data file

1 Files to download. 3 Macro to list the highest and lowest N data values. 2 Reading in the example data file 1 2 22S:172 Lab session 10 Macros for data cleaning July 17, 2003 GENDER VISIT HR SBP DBP DX AE = "Gender" = "Visit Date" = "Heart Rate" = "Systolic Blood Pressure" = "Diastolic Blood Pressure" = "Diagnosis

More information

So Much Data, So Little Time: Splitting Datasets For More Efficient Run Times and Meeting FDA Submission Guidelines

So Much Data, So Little Time: Splitting Datasets For More Efficient Run Times and Meeting FDA Submission Guidelines Paper TT13 So Much Data, So Little Time: Splitting Datasets For More Efficient Run Times and Meeting FDA Submission Guidelines Anthony Harris, PPD, Wilmington, NC Robby Diseker, PPD, Wilmington, NC ABSTRACT

More information

PROGRAMMING ROLLING REGRESSIONS IN SAS MICHAEL D. BOLDIN, UNIVERSITY OF PENNSYLVANIA, PHILADELPHIA, PA

PROGRAMMING ROLLING REGRESSIONS IN SAS MICHAEL D. BOLDIN, UNIVERSITY OF PENNSYLVANIA, PHILADELPHIA, PA PROGRAMMING ROLLING REGRESSIONS IN SAS MICHAEL D. BOLDIN, UNIVERSITY OF PENNSYLVANIA, PHILADELPHIA, PA ABSTRACT SAS does not have an option for PROC REG (or any of its other equation estimation procedures)

More information

Macros for Two-Sample Hypothesis Tests Jinson J. Erinjeri, D.K. Shifflet and Associates Ltd., McLean, VA

Macros for Two-Sample Hypothesis Tests Jinson J. Erinjeri, D.K. Shifflet and Associates Ltd., McLean, VA Paper CC-20 Macros for Two-Sample Hypothesis Tests Jinson J. Erinjeri, D.K. Shifflet and Associates Ltd., McLean, VA ABSTRACT Statistical Hypothesis Testing is performed to determine whether enough statistical

More information

A SAS Macro for Producing Benchmarks for Interpreting School Effect Sizes

A SAS Macro for Producing Benchmarks for Interpreting School Effect Sizes A SAS Macro for Producing Benchmarks for Interpreting School Effect Sizes Brian E. Lawton Curriculum Research & Development Group University of Hawaii at Manoa Honolulu, HI December 2012 Copyright 2012

More information

Chapter 6: Modifying and Combining Data Sets

Chapter 6: Modifying and Combining Data Sets Chapter 6: Modifying and Combining Data Sets The SET statement is a powerful statement in the DATA step. Its main use is to read in a previously created SAS data set which can be modified and saved as

More information

Contents of SAS Programming Techniques

Contents of SAS Programming Techniques Contents of SAS Programming Techniques Chapter 1 About SAS 1.1 Introduction 1.1.1 SAS modules 1.1.2 SAS module classification 1.1.3 SAS features 1.1.4 Three levels of SAS techniques 1.1.5 Chapter goal

More information

A Useful Macro for Converting SAS Data sets into SAS Transport Files in Electronic Submissions

A Useful Macro for Converting SAS Data sets into SAS Transport Files in Electronic Submissions Paper FC07 A Useful Macro for Converting SAS Data sets into SAS Transport Files in Electronic Submissions Xingshu Zhu and Shuping Zhang Merck Research Laboratories, Merck & Co., Inc., Blue Bell, PA 19422

More information

Two useful macros to nudge SAS to serve you

Two useful macros to nudge SAS to serve you Two useful macros to nudge SAS to serve you David Izrael, Michael P. Battaglia, Abt Associates Inc., Cambridge, MA Abstract This paper offers two macros that augment the power of two SAS procedures: LOGISTIC

More information

Cleaning Duplicate Observations on a Chessboard of Missing Values Mayrita Vitvitska, ClinOps, LLC, San Francisco, CA

Cleaning Duplicate Observations on a Chessboard of Missing Values Mayrita Vitvitska, ClinOps, LLC, San Francisco, CA Cleaning Duplicate Observations on a Chessboard of Missing Values Mayrita Vitvitska, ClinOps, LLC, San Francisco, CA ABSTRACT Removing duplicate observations from a data set is not as easy as it might

More information

A Cross-national Comparison Using Stacked Data

A Cross-national Comparison Using Stacked Data A Cross-national Comparison Using Stacked Data Goal In this exercise, we combine household- and person-level files across countries to run a regression estimating the usual hours of the working-aged civilian

More information

Tracking Dataset Dependencies in Clinical Trials Reporting

Tracking Dataset Dependencies in Clinical Trials Reporting Tracking Dataset Dependencies in Clinical Trials Reporting Binoy Varghese, Cybrid Inc., Wormleysburg, PA Satyanarayana Mogallapu, IT America Inc., Edison, NJ ABSTRACT Most clinical trials study reporting

More information

WEB MATERIAL. eappendix 1: SAS code for simulation

WEB MATERIAL. eappendix 1: SAS code for simulation WEB MATERIAL eappendix 1: SAS code for simulation /* Create datasets with variable # of groups & variable # of individuals in a group */ %MACRO create_simulated_dataset(ngroups=, groupsize=); data simulation_parms;

More information

A Format to Make the _TYPE_ Field of PROC MEANS Easier to Interpret Matt Pettis, Thomson West, Eagan, MN

A Format to Make the _TYPE_ Field of PROC MEANS Easier to Interpret Matt Pettis, Thomson West, Eagan, MN Paper 045-29 A Format to Make the _TYPE_ Field of PROC MEANS Easier to Interpret Matt Pettis, Thomson West, Eagan, MN ABSTRACT: PROC MEANS analyzes datasets according to the variables listed in its Class

More information

Using PROC SQL to Calculate FIRSTOBS David C. Tabano, Kaiser Permanente, Denver, CO

Using PROC SQL to Calculate FIRSTOBS David C. Tabano, Kaiser Permanente, Denver, CO Using PROC SQL to Calculate FIRSTOBS David C. Tabano, Kaiser Permanente, Denver, CO ABSTRACT The power of SAS programming can at times be greatly improved using PROC SQL statements for formatting and manipulating

More information

Paper An Automated Reporting Macro to Create Cell Index An Enhanced Revisit. Shi-Tao Yeh, GlaxoSmithKline, King of Prussia, PA

Paper An Automated Reporting Macro to Create Cell Index An Enhanced Revisit. Shi-Tao Yeh, GlaxoSmithKline, King of Prussia, PA ABSTRACT Paper 236-28 An Automated Reporting Macro to Create Cell Index An Enhanced Revisit When generating tables from SAS PROC TABULATE or PROC REPORT to summarize data, sometimes it is necessary to

More information

Out of Control! A SAS Macro to Recalculate QC Statistics

Out of Control! A SAS Macro to Recalculate QC Statistics Paper 3296-2015 Out of Control! A SAS Macro to Recalculate QC Statistics Jesse Pratt, Colleen Mangeot, Kelly Olano, Cincinnati Children s Hospital Medical Center, Cincinnati, OH, USA ABSTRACT SAS/QC provides

More information

INTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS

INTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS TO SAS NEED FOR SAS WHO USES SAS WHAT IS SAS? OVERVIEW OF BASE SAS SOFTWARE DATA MANAGEMENT FACILITY STRUCTURE OF SAS DATASET SAS PROGRAM PROGRAMMING LANGUAGE ELEMENTS OF THE SAS LANGUAGE RULES FOR SAS

More information

SAS Graphs in Small Multiples Andrea Wainwright-Zimmerman, Capital One, Richmond, VA

SAS Graphs in Small Multiples Andrea Wainwright-Zimmerman, Capital One, Richmond, VA Paper SIB-113 SAS Graphs in Small Multiples Andrea Wainwright-Zimmerman, Capital One, Richmond, VA ABSTRACT Edward Tufte has championed the idea of using "small multiples" as an effective way to present

More information

PhUSE US Connect 2018 Paper CT06 A Macro Tool to Find and/or Split Variable Text String Greater Than 200 Characters for Regulatory Submission Datasets

PhUSE US Connect 2018 Paper CT06 A Macro Tool to Find and/or Split Variable Text String Greater Than 200 Characters for Regulatory Submission Datasets PhUSE US Connect 2018 Paper CT06 A Macro Tool to Find and/or Split Variable Text String Greater Than 200 Characters for Regulatory Submission Datasets Venkata N Madhira, Shionogi Inc, Florham Park, USA

More information

EXAMPLE 3: MATCHING DATA FROM RESPONDENTS AT 2 OR MORE WAVES (LONG FORMAT)

EXAMPLE 3: MATCHING DATA FROM RESPONDENTS AT 2 OR MORE WAVES (LONG FORMAT) EXAMPLE 3: MATCHING DATA FROM RESPONDENTS AT 2 OR MORE WAVES (LONG FORMAT) DESCRIPTION: This example shows how to combine the data on respondents from the first two waves of Understanding Society into

More information

Tips & Tricks. With lots of help from other SUG and SUGI presenters. SAS HUG Meeting, November 18, 2010

Tips & Tricks. With lots of help from other SUG and SUGI presenters. SAS HUG Meeting, November 18, 2010 Tips & Tricks With lots of help from other SUG and SUGI presenters 1 SAS HUG Meeting, November 18, 2010 2 3 Sorting Threads Multi-threading available if your computer has more than one processor (CPU)

More information

Base and Advance SAS

Base and Advance SAS Base and Advance SAS BASE SAS INTRODUCTION An Overview of the SAS System SAS Tasks Output produced by the SAS System SAS Tools (SAS Program - Data step and Proc step) A sample SAS program Exploring SAS

More information

PharmaSUG 2013 CC26 Automating the Labeling of X- Axis Sanjiv Ramalingam, Vertex Pharmaceuticals, Inc., Cambridge, MA

PharmaSUG 2013 CC26 Automating the Labeling of X- Axis Sanjiv Ramalingam, Vertex Pharmaceuticals, Inc., Cambridge, MA PharmaSUG 2013 CC26 Automating the Labeling of X- Axis Sanjiv Ramalingam, Vertex Pharmaceuticals, Inc., Cambridge, MA ABSTRACT Labeling of the X-axis usually involves a tedious axis statement specifying

More information

Let s Get FREQy with our Statistics: Data-Driven Approach to Determining Appropriate Test Statistic

Let s Get FREQy with our Statistics: Data-Driven Approach to Determining Appropriate Test Statistic PharmaSUG 2018 - Paper EP-09 Let s Get FREQy with our Statistics: Data-Driven Approach to Determining Appropriate Test Statistic Richann Watson, DataRich Consulting, Batavia, OH Lynn Mullins, PPD, Cincinnati,

More information

TIPS AND TRICKS: IMPROVE EFFICIENCY TO YOUR SAS PROGRAMMING

TIPS AND TRICKS: IMPROVE EFFICIENCY TO YOUR SAS PROGRAMMING TIPS AND TRICKS: IMPROVE EFFICIENCY TO YOUR SAS PROGRAMMING Guillaume Colley, Lead Data Analyst, BCCFE Page 1 Contents Customized SAS Session Run system options as SAS starts Labels management Shortcut

More information

Getting Classy: A SAS Macro for CLASS Statement Automation

Getting Classy: A SAS Macro for CLASS Statement Automation Getting Classy: A SAS Macro for CLASS Statement Automation ABSTRACT When creating statistical models that include multiple covariates, it is important to address which variables are considered categorical

More information

Want to Do a Better Job? - Select Appropriate Statistical Analysis in Healthcare Research

Want to Do a Better Job? - Select Appropriate Statistical Analysis in Healthcare Research Want to Do a Better Job? - Select Appropriate Statistical Analysis in Healthcare Research Liping Huang, Center for Home Care Policy and Research, Visiting Nurse Service of New York, NY, NY ABSTRACT The

More information

Stat 5100 Handout #14.a SAS: Logistic Regression

Stat 5100 Handout #14.a SAS: Logistic Regression Stat 5100 Handout #14.a SAS: Logistic Regression Example: (Text Table 14.3) Individuals were randomly sampled within two sectors of a city, and checked for presence of disease (here, spread by mosquitoes).

More information

Creating Macro Calls using Proc Freq

Creating Macro Calls using Proc Freq Creating Macro Calls using Proc Freq, Educational Testing Service, Princeton, NJ ABSTRACT Imagine you were asked to get a series of statistics/tables for each country in the world. You have the data, but

More information

Avoiding Macros in SAS. Fareeza Khurshed Yiye Zeng

Avoiding Macros in SAS. Fareeza Khurshed Yiye Zeng Avoiding Macros in SAS Fareeza Khurshed Yiye Zeng Macro s Usually used to avoid repetitive code or automate procedures I use them and write them on a regular basis Based on MY experience there s a set

More information

BUSINESS ANALYTICS. 96 HOURS Practical Learning. DexLab Certified. Training Module. Gurgaon (Head Office)

BUSINESS ANALYTICS. 96 HOURS Practical Learning. DexLab Certified. Training Module. Gurgaon (Head Office) SAS (Base & Advanced) Analytics & Predictive Modeling Tableau BI 96 HOURS Practical Learning WEEKDAY & WEEKEND BATCHES CLASSROOM & LIVE ONLINE DexLab Certified BUSINESS ANALYTICS Training Module Gurgaon

More information

To conceptualize the process, the table below shows the highly correlated covariates in descending order of their R statistic.

To conceptualize the process, the table below shows the highly correlated covariates in descending order of their R statistic. Automating the process of choosing among highly correlated covariates for multivariable logistic regression Michael C. Doherty, i3drugsafety, Waltham, MA ABSTRACT In observational studies, there can be

More information

Using GSUBMIT command to customize the interface in SAS Xin Wang, Fountain Medical Technology Co., ltd, Nanjing, China

Using GSUBMIT command to customize the interface in SAS Xin Wang, Fountain Medical Technology Co., ltd, Nanjing, China PharmaSUG China 2015 - Paper PO71 Using GSUBMIT command to customize the interface in SAS Xin Wang, Fountain Medical Technology Co., ltd, Nanjing, China One of the reasons that SAS is widely used as the

More information

Introduction to SAS. I. Understanding the basics In this section, we introduce a few basic but very helpful commands.

Introduction to SAS. I. Understanding the basics In this section, we introduce a few basic but very helpful commands. Center for Teaching, Research and Learning Research Support Group American University, Washington, D.C. Hurst Hall 203 rsg@american.edu (202) 885-3862 Introduction to SAS Workshop Objective This workshop

More information

Virtual Accessing of a SAS Data Set Using OPEN, FETCH, and CLOSE Functions with %SYSFUNC and %DO Loops

Virtual Accessing of a SAS Data Set Using OPEN, FETCH, and CLOSE Functions with %SYSFUNC and %DO Loops Paper 8140-2016 Virtual Accessing of a SAS Data Set Using OPEN, FETCH, and CLOSE Functions with %SYSFUNC and %DO Loops Amarnath Vijayarangan, Emmes Services Pvt Ltd, India ABSTRACT One of the truths about

More information

/* CalcESLs.sas */ /* */ /* Created 02 January 2006 by Sarah Gilman */ /* report errors to

/* CalcESLs.sas */ /* */ /* Created 02 January 2006 by Sarah Gilman */ /* report errors to /* CalcESLs.sas */ /* ------------ */ /* Created 02 January 2006 by Sarah Gilman */ /* report errors to gilmans@u.washington.edu */ /* ---------------------------------------------------------------- */

More information

Using Templates Created by the SAS/STAT Procedures

Using Templates Created by the SAS/STAT Procedures Paper 081-29 Using Templates Created by the SAS/STAT Procedures Yanhong Huang, Ph.D. UMDNJ, Newark, NJ Jianming He, Solucient, LLC., Berkeley Heights, NJ ABSTRACT SAS procedures provide a large quantity

More information

Techniques for Writing Robust SAS Macros. Martin Gregory. PhUSE Annual Conference, Oct 2009, Basel

Techniques for Writing Robust SAS Macros. Martin Gregory. PhUSE Annual Conference, Oct 2009, Basel Techniques for Writing Robust SAS Macros Martin Gregory PhUSE Annual Conference, 19-21 Oct 2009, Basel Overview Why robustness? Summary of techniques Types of macros considered An example from real life:

More information

Macro Magic III. SNUG Presentation (30mins)

Macro Magic III. SNUG Presentation (30mins) Macro Magic III SNUG Presentation (30mins) Overview Macro Magic Posters have been displayed at the last 2 SUGA presentations. Continue the trend Hopefully everyone will learn something new SAS Macro -

More information

A Macro that can Search and Replace String in your SAS Programs

A Macro that can Search and Replace String in your SAS Programs ABSTRACT MWSUG 2016 - Paper BB27 A Macro that can Search and Replace String in your SAS Programs Ting Sa, Cincinnati Children s Hospital Medical Center, Cincinnati, OH In this paper, a SAS macro is introduced

More information

SAS CURRICULUM. BASE SAS Introduction

SAS CURRICULUM. BASE SAS Introduction SAS CURRICULUM BASE SAS Introduction Data Warehousing Concepts What is a Data Warehouse? What is a Data Mart? What is the difference between Relational Databases and the Data in Data Warehouse (OLTP versus

More information

AURA ACADEMY SAS TRAINING. Opposite Hanuman Temple, Srinivasa Nagar East, Ameerpet,Hyderabad Page 1

AURA ACADEMY SAS TRAINING. Opposite Hanuman Temple, Srinivasa Nagar East, Ameerpet,Hyderabad Page 1 SAS TRAINING SAS/BASE BASIC THEORY & RULES ETC SAS WINDOWING ENVIRONMENT CREATION OF LIBRARIES SAS PROGRAMMING (BRIEFLY) - DATASTEP - PROC STEP WAYS TO READ DATA INTO SAS BACK END PROCESS OF DATASTEP INSTALLATION

More information

Implementing external file processing with no record delimiter via a metadata-driven approach

Implementing external file processing with no record delimiter via a metadata-driven approach Paper 2643-2018 Implementing external file processing with no record delimiter via a metadata-driven approach Princewill Benga, F&P Consulting, Saint-Maur, France ABSTRACT Most of the time, we process

More information

Poisson Regressions for Complex Surveys

Poisson Regressions for Complex Surveys Poisson Regressions for Complex Surveys Overview Researchers often use sample survey methodology to obtain information about a large population by selecting and measuring a sample from that population.

More information

Top Coding Tips. Neil Merchant Technical Specialist - SAS

Top Coding Tips. Neil Merchant Technical Specialist - SAS Top Coding Tips Neil Merchant Technical Specialist - SAS Bio Work in the ANSWERS team at SAS o Analytics as a Service and Visual Analytics Try before you buy SAS user for 12 years obase SAS and O/S integration

More information

ABSTRACT. Paper CC-031

ABSTRACT. Paper CC-031 Paper CC-031 Using Functions SYSFUNC and IFC to Conditionally Execute Statements in Open Code Ronald J. Fehd, Centers for Disease Control and Prevention, Atlanta, GA, USA ABSTRACT Audience Keywords Information

More information

SAS (Statistical Analysis Software/System)

SAS (Statistical Analysis Software/System) SAS (Statistical Analysis Software/System) SAS Analytics:- Class Room: Training Fee & Duration : 23K & 3 Months Online: Training Fee & Duration : 25K & 3 Months Learning SAS: Getting Started with SAS Basic

More information

Automating Preliminary Data Cleaning in SAS

Automating Preliminary Data Cleaning in SAS Paper PO63 Automating Preliminary Data Cleaning in SAS Alec Zhixiao Lin, Loan Depot, Foothill Ranch, CA ABSTRACT Preliminary data cleaning or scrubbing tries to delete the following types of variables

More information

Prove QC Quality Create SAS Datasets from RTF Files Honghua Chen, OCKHAM, Cary, NC

Prove QC Quality Create SAS Datasets from RTF Files Honghua Chen, OCKHAM, Cary, NC Prove QC Quality Create SAS Datasets from RTF Files Honghua Chen, OCKHAM, Cary, NC ABSTRACT Since collecting drug trial data is expensive and affects human life, the FDA and most pharmaceutical company

More information

PhUSE Paper CC07. Slim Down Your Data. Mickael Borne, 4Clinics, Montpellier, France

PhUSE Paper CC07. Slim Down Your Data. Mickael Borne, 4Clinics, Montpellier, France Paper CC07 Slim Down Your Data Mickael Borne, 4Clinics, Montpellier, France ABSTRACT We developed a package of SAS macro-programs that was developed to automatically resize character variables of all SAS

More information

Using PROC SQL to Generate Shift Tables More Efficiently

Using PROC SQL to Generate Shift Tables More Efficiently ABSTRACT SESUG Paper 218-2018 Using PROC SQL to Generate Shift Tables More Efficiently Jenna Cody, IQVIA Shift tables display the change in the frequency of subjects across specified categories from baseline

More information

Data Quality Review for Missing Values and Outliers

Data Quality Review for Missing Values and Outliers Paper number: PH03 Data Quality Review for Missing Values and Outliers Ying Guo, i3, Indianapolis, IN Bradford J. Danner, i3, Lincoln, NE ABSTRACT Before performing any analysis on a dataset, it is often

More information

Efficient Processing of Long Lists of Variable Names

Efficient Processing of Long Lists of Variable Names Efficient Processing of Long Lists of Variable Names Paulette W. Staum, Paul Waldron Consulting, West Nyack, NY ABSTRACT Many programmers use SAS macro language to manipulate lists of variable names. They

More information

SAS Training BASE SAS CONCEPTS BASE SAS:

SAS Training BASE SAS CONCEPTS BASE SAS: SAS Training BASE SAS CONCEPTS BASE SAS: Dataset concept and creating a dataset from internal data Capturing data from external files (txt, CSV and tab) Capturing Non-Standard data (date, time and amounts)

More information

%EventChart: A Macro to Visualize Data with Multiple Timed Events

%EventChart: A Macro to Visualize Data with Multiple Timed Events %EventChart: A Macro to Visualize Data with Multiple Timed Events Andrew Peng and J. Jack Lee, MD Anderson Cancer Center, Houston, TX ABSTRACT An event chart is a tool to visualize timeline data with multiple

More information

Adjusting for daylight saving times. PhUSE Frankfurt, 06Nov2018, Paper CT14 Guido Wendland

Adjusting for daylight saving times. PhUSE Frankfurt, 06Nov2018, Paper CT14 Guido Wendland Adjusting for daylight saving times PhUSE Frankfurt, 06Nov2018, Paper CT14 Guido Wendland 1. The problem Page Introduction: DST (Daylight saving times) around the world 2 nd Sunday in March 1 st Sunday

More information

ABSTRACT INTRODUCTION MACRO. Paper RF

ABSTRACT INTRODUCTION MACRO. Paper RF Paper RF-08-2014 Burst Reporting With the Help of PROC SQL Dan Sturgeon, Priority Health, Grand Rapids, Michigan Erica Goodrich, Priority Health, Grand Rapids, Michigan ABSTRACT Many SAS programmers need

More information

A SAS Macro for Balancing a Weighted Sample

A SAS Macro for Balancing a Weighted Sample Paper 258-25 A SAS Macro for Balancing a Weighted Sample David Izrael, David C. Hoaglin, and Michael P. Battaglia Abt Associates Inc., Cambridge, Massachusetts Abstract It is often desirable to adjust

More information

Better Metadata Through SAS II: %SYSFUNC, PROC DATASETS, and Dictionary Tables

Better Metadata Through SAS II: %SYSFUNC, PROC DATASETS, and Dictionary Tables Paper 3458-2015 Better Metadata Through SAS II: %SYSFUNC, PROC DATASETS, and Dictionary Tables ABSTRACT Louise Hadden, Abt Associates Inc., Cambridge, MA SAS provides a wealth of resources for users to

More information

Streamline Table Lookup by Embedding HASH in FCMP Qing Liu, Eli Lilly & Company, Shanghai, China

Streamline Table Lookup by Embedding HASH in FCMP Qing Liu, Eli Lilly & Company, Shanghai, China ABSTRACT PharmaSUG China 2017 - Paper 19 Streamline Table Lookup by Embedding HASH in FCMP Qing Liu, Eli Lilly & Company, Shanghai, China SAS provides many methods to perform a table lookup like Merge

More information

Stat 5100 Handout #6 SAS: Linear Regression Remedial Measures

Stat 5100 Handout #6 SAS: Linear Regression Remedial Measures Stat 5100 Handout #6 SAS: Linear Regression Remedial Measures Example: Age and plasma level for 25 healthy children in a study are reported. Of interest is how plasma level depends on age. (Text Table

More information

SAS Linear Model Demo. Overview

SAS Linear Model Demo. Overview SAS Linear Model Demo Yupeng Wang, Ph.D, Data Scientist Overview SAS is a popular programming tool for biostatistics and clinical trials data analysis. Here I show an example of using SAS linear regression

More information

A Second Look at SAS Macro Design Issues Ian Whitlock, Kennett Square, PA

A Second Look at SAS Macro Design Issues Ian Whitlock, Kennett Square, PA Paper 244-29 A Second Look at SAS Macro Design Issues Ian Whitlock, Kennett Square, PA ABSTRACT At SUGI 27 the author presented a paper "SAS Macro Design Issues" as a Beginning Tutorial. The use of names

More information

Keeping Track of Database Changes During Database Lock

Keeping Track of Database Changes During Database Lock Paper CC10 Keeping Track of Database Changes During Database Lock Sanjiv Ramalingam, Biogen Inc., Cambridge, USA ABSTRACT Higher frequency of data transfers combined with greater likelihood of changes

More information

Stat 5100 Handout #12.f SAS: Time Series Case Study (Unit 7)

Stat 5100 Handout #12.f SAS: Time Series Case Study (Unit 7) Stat 5100 Handout #12.f SAS: Time Series Case Study (Unit 7) Data: Weekly sales (in thousands of units) of Super Tech Videocassette Tapes over 161 weeks [see Bowerman & O Connell Forecasting and Time Series:

More information

A Practical and Efficient Approach in Generating AE (Adverse Events) Tables within a Clinical Study Environment

A Practical and Efficient Approach in Generating AE (Adverse Events) Tables within a Clinical Study Environment A Practical and Efficient Approach in Generating AE (Adverse Events) Tables within a Clinical Study Environment Abstract Jiannan Hu Vertex Pharmaceuticals, Inc. When a clinical trial is at the stage of

More information

Planting Your Rows: Using SAS Formats to Make the Generation of Zero- Filled Rows in Tables Less Thorny

Planting Your Rows: Using SAS Formats to Make the Generation of Zero- Filled Rows in Tables Less Thorny Planting Your Rows: Using SAS Formats to Make the Generation of Zero- Filled Rows in Tables Less Thorny Kathy Hardis Fraeman, United BioSource Corporation, Bethesda, MD ABSTRACT Often tables or summary

More information

A Macro for Systematic Treatment of Special Values in Weight of Evidence Variable Transformation Chaoxian Cai, Automated Financial Systems, Exton, PA

A Macro for Systematic Treatment of Special Values in Weight of Evidence Variable Transformation Chaoxian Cai, Automated Financial Systems, Exton, PA Paper RF10-2015 A Macro for Systematic Treatment of Special Values in Weight of Evidence Variable Transformation Chaoxian Cai, Automated Financial Systems, Exton, PA ABSTRACT Weight of evidence (WOE) recoding

More information

STATION

STATION ------------------------------STATION 1------------------------------ 1. Which of the following statements displays all user-defined macro variables in the SAS log? a) %put user=; b) %put user; c) %put

More information

Coders' Corner. Paper Scrolling & Downloading Web Results. Ming C. Lee, Trilogy Consulting, Denver, CO. Abstract.

Coders' Corner. Paper Scrolling & Downloading Web Results. Ming C. Lee, Trilogy Consulting, Denver, CO. Abstract. Paper 71-25 Scrolling & Downloading Web Results Ming C. Lee, Trilogy Consulting, Denver, CO Abstract Since the inception of the INTERNET and Web Browsers, the need for speedy information to make split

More information

PharmaSUG China. Systematically Reordering Axis Major Tick Values in SAS Graph Brian Shen, PPDI, ShangHai

PharmaSUG China. Systematically Reordering Axis Major Tick Values in SAS Graph Brian Shen, PPDI, ShangHai PharmaSUG China Systematically Reordering Axis Major Tick Values in SAS Graph Brian Shen, PPDI, ShangHai ABSTRACT Once generating SAS graphs, it is a headache to programmers to reorder the axis tick values

More information

Outline. Topic 16 - Other Remedies. Ridge Regression. Ridge Regression. Ridge Regression. Robust Regression. Regression Trees. Piecewise Linear Model

Outline. Topic 16 - Other Remedies. Ridge Regression. Ridge Regression. Ridge Regression. Robust Regression. Regression Trees. Piecewise Linear Model Topic 16 - Other Remedies Ridge Regression Robust Regression Regression Trees Outline - Fall 2013 Piecewise Linear Model Bootstrapping Topic 16 2 Ridge Regression Modification of least squares that addresses

More information

Summary Table for Displaying Results of a Logistic Regression Analysis

Summary Table for Displaying Results of a Logistic Regression Analysis PharmaSUG 2018 - Paper EP-23 Summary Table for Displaying Results of a Logistic Regression Analysis Lori S. Parsons, ICON Clinical Research, Medical Affairs Statistical Analysis ABSTRACT When performing

More information

Comparison of different ways using table lookups on huge tables

Comparison of different ways using table lookups on huge tables PhUSE 007 Paper CS0 Comparison of different ways using table lookups on huge tables Ralf Minkenberg, Boehringer Ingelheim Pharma GmbH & Co. KG, Ingelheim, Germany ABSTRACT In many application areas the

More information

%MAKE_IT_COUNT: An Example Macro for Dynamic Table Programming Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma

%MAKE_IT_COUNT: An Example Macro for Dynamic Table Programming Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma Britney Gilbert, Juniper Tree Consulting, Porter, Oklahoma ABSTRACT Today there is more pressure on programmers to deliver summary outputs faster without sacrificing quality. By using just a few programming

More information

Building Intelligent Macros: Using Metadata Functions with the SAS Macro Language Arthur L. Carpenter California Occidental Consultants, Anchorage, AK

Building Intelligent Macros: Using Metadata Functions with the SAS Macro Language Arthur L. Carpenter California Occidental Consultants, Anchorage, AK Paper 835-2017 Building Intelligent Macros: Using Metadata Functions with the SAS Macro Language Arthur L. Carpenter California Occidental Consultants, Anchorage, AK ABSTRACT The SAS macro language gives

More information

SAS (Statistical Analysis Software/System)

SAS (Statistical Analysis Software/System) SAS (Statistical Analysis Software/System) Clinical SAS:- Class Room: Training Fee & Duration : 23K & 3 Months Online: Training Fee & Duration : 25K & 3 Months Learning SAS: Getting Started with SAS Basic

More information

Program Validation: Logging the Log

Program Validation: Logging the Log Program Validation: Logging the Log Adel Fahmy, Symbiance Inc., Princeton, NJ ABSTRACT Program Validation includes checking both program Log and Logic. The program Log should be clear of any system Error/Warning

More information

Logging the Log Magic: Pulling the Rabbit out of the Hat

Logging the Log Magic: Pulling the Rabbit out of the Hat ABSTRACT PharmaSUG2010 - Paper TT08 Logging the Log Magic: Pulling the Rabbit out of the Hat Adel Fahmy, BenchWorkzz, Austin, Texas Program Validation includes checking both program Log and Logic. Program

More information

Best Practices for Using the SAS Scalable Performance Data Server in a SAS Grid environment

Best Practices for Using the SAS Scalable Performance Data Server in a SAS Grid environment Best Practices for Using the SAS Scalable Performance Data Server in a SAS Grid environment Introduction This document describes how to set up the SAS Scalable Performance Data Server, SPD Server, to run

More information

Using PROC FCMP to the Fullest: Getting Started and Doing More

Using PROC FCMP to the Fullest: Getting Started and Doing More Paper 2403-2018 Using PROC FCMP to the Fullest: Getting Started and Doing More Arthur L. Carpenter California Occidental Consultants, Anchorage, AK ABSTRACT The FCMP procedure is used to create user defined

More information

%MISSING: A SAS Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System

%MISSING: A SAS Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System %MISSING: A SAS Macro to Report Missing Value Percentages for a Multi-Year Multi-File Information System Rushi Patel, Creative Information Technology, Inc., Arlington, VA ABSTRACT It is common to find

More information

CC13 An Automatic Process to Compare Files. Simon Lin, Merck & Co., Inc., Rahway, NJ Huei-Ling Chen, Merck & Co., Inc., Rahway, NJ

CC13 An Automatic Process to Compare Files. Simon Lin, Merck & Co., Inc., Rahway, NJ Huei-Ling Chen, Merck & Co., Inc., Rahway, NJ CC13 An Automatic Process to Compare Files Simon Lin, Merck & Co., Inc., Rahway, NJ Huei-Ling Chen, Merck & Co., Inc., Rahway, NJ ABSTRACT Comparing different versions of output files is often performed

More information

Identifying Duplicate Variables in a SAS Data Set

Identifying Duplicate Variables in a SAS Data Set Paper 1654-2018 Identifying Duplicate Variables in a SAS Data Set Bruce Gilsen, Federal Reserve Board, Washington, DC ABSTRACT In the big data era, removing duplicate data from a data set can reduce disk

More information

SAS Macros for Grouping Count and Its Application to Enhance Your Reports

SAS Macros for Grouping Count and Its Application to Enhance Your Reports SAS Macros for Grouping Count and Its Application to Enhance Your Reports Shi-Tao Yeh, EDP Contract Services, Bala Cynwyd, PA ABSTRACT This paper provides two SAS macros, one for one grouping variable,

More information

A SAS Macro to Create Validation Summary of Dataset Report

A SAS Macro to Create Validation Summary of Dataset Report ABSTRACT PharmaSUG 2018 Paper EP-25 A SAS Macro to Create Validation Summary of Dataset Report Zemin Zeng, Sanofi, Bridgewater, NJ This paper will introduce a short SAS macro developed at work to create

More information

Combining the Results from Multiple SAS PROCS into a Publication Quality Table

Combining the Results from Multiple SAS PROCS into a Publication Quality Table Combining the Results from Multiple SAS PROCS into a Publication Quality Table Robert Kabacoff, Management Research Group, Portland, ME ABSTRACT Data analysts are often faced with the daunting and repetitive

More information

Paper SAS FCMP: A Powerful SAS Procedure You Should Be Using Bill McNeill, Andrew Henrick, Mike Whitcher, and Aaron Mays, SAS Institute Inc.

Paper SAS FCMP: A Powerful SAS Procedure You Should Be Using Bill McNeill, Andrew Henrick, Mike Whitcher, and Aaron Mays, SAS Institute Inc. Paper SAS2125-2018 FCMP: A Powerful SAS Procedure You Should Be Using Bill McNeill, Andrew Henrick, Mike Whitcher, and Aaron Mays, SAS Institute Inc. ABSTRACT The FCMP procedure is the SAS Function Compiler

More information

Using PROC FCMP to the Fullest: Getting Started and Doing More

Using PROC FCMP to the Fullest: Getting Started and Doing More Paper HT02-2013 Using PROC FCMP to the Fullest: Getting Started and Doing More Arthur L. Carpenter California Occidental Consultants, Anchorage, AK ABSTRACT The FCMP procedure is used to create user defined

More information

My Reporting Requires a Full Staff Help!

My Reporting Requires a Full Staff Help! ABSTRACT Paper GH-03 My Reporting Requires a Full Staff Help! Erin Lynch, Daniel O Connor, Himesh Patel, SAS Institute Inc., Cary, NC With cost cutting and reduced staff, everyone is feeling the pressure

More information

Decomposing the R-squared of a Regression Using the Shapley Value in SAS

Decomposing the R-squared of a Regression Using the Shapley Value in SAS SESUG Paper SD-61-2017 Decomposing the R-squared of a Regression Using the Shapley Value in SAS Charles D. Coleman, US Census Bureau DISCLAIMER Any views expressed are those of the author and not necessarily

More information