CFAR Biometrics_REDCap Data Restructuring Using SAS

Size: px
Start display at page:

Download "CFAR Biometrics_REDCap Data Restructuring Using SAS"

Transcription

1 /* syntax00a_redcap_import PREPARE DATA. EXPORTED INSTRUMENTS: EXPORTED EVENTS: EXPORTED DATA: ALL (ONLY NEED: ENROLMENT VISIT, FOLLOWUP, AND LAB DATA). ALL. (I WILL PARSE BELOW.) TO SAS. SAVED THE PATHWAY MAPPER (WHICH YOU NEED TO RUN FIRST),.CSV AND.SAS FILE To Do: 1. Run the sas_pathway_mapper.bat file 2. Run the.sas file and make sure to save the sas data set and formats *data source.redcap; *set REDCAP; * *proc format library=work.formats cntlout = source.formats; * *proc format library=source.formats cntlin=source.formats; * */ ; %macro removeoldfile(bye); %if %sysfunc(exist(&bye.)) %then %do; proc delete data=&bye.; %end; %mend removeoldfile; libname source 'C:\Users\jstern77\OneDrive - UW Office 365\REDCap Examples\SAS\Source Data\'; %removeoldfile(redcap.redcap); data REDCAP; %let _EFIERR_ = 0; infile 'HIVPediatricsKensPra_DATA_NOHDRS_ _1424.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=1 ; informat study_id best32. ; informat redcap_event_name $500. ; informat demographics_complete best32. ; informat ptid_studyid_validation best32. ; informat check_studyid_validation best32. ; informat studyid_validation_complete best32. ; informat crfversion_en best32. ; informat scid_en best32. ; informat ptid_en best32. ; informat visitcode_en best32. ; informat frmcompldt_en yymmdd10. ; informat ageyrs_en best32. ; informat agemos_en best32. ; informat sex_en best32. ; informat sympfev_en best32. ; informat sympfevdur_en best32. ; informat sympoth1_en best32. ; informat sympoth1sp_en $500. ; informat sympoth1dur_en best32. ; informat sympoth2_en best32. ; informat sympoth2sp_en $500. ; informat sympoth2dur_en best32. ; informat sympoth3_en best32. ; informat txmed1_en best32. ; informat txmed1name_en $500. ; informat txmed1ind_en $500. ; informat txmed1startdt_en yymmdd10. ; informat txmed1stopdt_en yymmdd10. ; informat txmed2_en best32. ; informat txmed2name_en $500. ; informat txmed2ind_en $500. ; informat txmed2startdt_en yymmdd10. ; informat txmed2stopdt_en yymmdd10. ; informat txoth1_en best32. ; informat txoth1name_en $500. ; informat txoth1ind_en $500. ; 1

2 informat txoth1startdt_en yymmdd10. ; informat txoth1stopdt_en yymmdd10. ; informat weight_en best32. ; informat height_en best32. ; informat temp_en best32. ; informat heart_en best32. ; informat bpsystol_en best32. ; informat bpdiast_en best32. ; informat nxtvisitdt_en yymmdd10. ; informat frmcomplby_en best32. ; informat frmcomplbydt_en yymmdd10. ; informat frmdbaseby_en best32. ; informat frmdbasebydt_en yymmdd10. ; informat dbasecomment1_en $5000. ; informat dbasecomment2_en $5000. ; informat dbasecomment3_en $5000. ; informat dbasecomment4_en $5000. ; informat dbasecomment5_en $5000. ; informat enrollment_en_complete best32. ; informat crfversion_lr best32. ; informat ptid_lr best32. ; informat frmcompldt_lr yymmdd10. ; informat visitcode_lr best32. ; informat sampldt_lr yymmdd10. ; informat cd4per_clrb best32. ; informat cd4cnt_lr best32. ; informat cd8cnt_lr best32. ; informat cd4to8ratio_lr best32. ; informat wbc_lr best32. ; informat rbc_lr best32. ; informat hb_lr best32. ; informat frmcomplby_lr best32. ; informat frmcomplbydt_lr yymmdd10. ; informat frmdbaseby_lr best32. ; informat frmdbasebydt_lr yymmdd10. ; informat dbasecomment1_lr $5000. ; informat dbasecomment2_lr $5000. ; informat dbasecomment3_lr $5000. ; informat dbasecomment4_lr $5000. ; informat dbasecomment5_lr $5000. ; informat lab_results_lr_complete best32. ; informat crfversion_fu best32. ; informat ptid_fu best32. ; informat visitcode_fu best32. ; informat frmcompldt_fu yymmdd10. ; informat sympfev_fu best32. ; informat sympfevdur_fu best32. ; informat sympoth1_fu best32. ; informat sympoth1sp_fu $500. ; informat sympoth1dur_fu best32. ; informat sympoth2_fu best32. ; informat sympoth2sp_fu $500. ; informat sympoth2dur_fu best32. ; informat sympoth3_fu best32. ; informat txmed1_fu best32. ; informat txmed1name_fu $500. ; informat txmed1ind_fu $500. ; informat txmed1startdt_fu yymmdd10. ; informat txmed1stopdt_fu yymmdd10. ; informat txmed2_fu best32. ; informat txmed2name_fu $500. ; informat txmed2ind_fu $500. ; informat txmed2startdt_fu yymmdd10. ; informat txmed2stopdt_fu yymmdd10. ; informat txoth1_fu best32. ; informat txoth1name_fu $500. ; informat txoth1ind_fu $500. ; informat txoth1startdt_fu yymmdd10. ; informat txoth1stopdt_fu yymmdd10. ; 2

3 informat weight_fu best32. ; informat height_fu best32. ; informat temp_fu best32. ; informat heart_fu best32. ; informat bpsystol_fu best32. ; informat bpdiast_fu best32. ; informat nxtvisitdt_fu yymmdd10. ; informat frmcomplby_fu best32. ; informat frmcomplbydt_fu yymmdd10. ; informat frmdbaseby_fu best32. ; informat frmdbasebydt_fu yymmdd10. ; informat dbasecomment1_fu $5000. ; informat dbasecomment2_fu $5000. ; informat dbasecomment3_fu $5000. ; informat dbasecomment4_fu $5000. ; informat dbasecomment5_fu $5000. ; informat followup_fu_complete best32. ; 3

4 format study_id best12. ; format redcap_event_name $500. ; format demographics_complete best12. ; format ptid_studyid_validation best12. ; format check_studyid_validation best12. ; format studyid_validation_complete best12. ; format crfversion_en best12. ; format scid_en best12. ; format ptid_en best12. ; format visitcode_en best12. ; format frmcompldt_en yymmdd10. ; format ageyrs_en best12. ; format agemos_en best12. ; format sex_en best12. ; format sympfev_en best12. ; format sympfevdur_en best12. ; format sympoth1_en best12. ; format sympoth1sp_en $500. ; format sympoth1dur_en best12. ; format sympoth2_en best12. ; format sympoth2sp_en $500. ; format sympoth2dur_en best12. ; format sympoth3_en best12. ; format txmed1_en best12. ; format txmed1name_en $500. ; format txmed1ind_en $500. ; format txmed1startdt_en yymmdd10. ; format txmed1stopdt_en yymmdd10. ; format txmed2_en best12. ; format txmed2name_en $500. ; format txmed2ind_en $500. ; format txmed2startdt_en yymmdd10. ; format txmed2stopdt_en yymmdd10. ; format txoth1_en best12. ; format txoth1name_en $500. ; format txoth1ind_en $500. ; format txoth1startdt_en yymmdd10. ; format txoth1stopdt_en yymmdd10. ; format weight_en best12. ; format height_en best12. ; format temp_en best12. ; format heart_en best12. ; format bpsystol_en best12. ; format bpdiast_en best12. ; format nxtvisitdt_en yymmdd10. ; format frmcomplby_en best12. ; format frmcomplbydt_en yymmdd10. ; format frmdbaseby_en best12. ; format frmdbasebydt_en yymmdd10. ; format dbasecomment1_en $5000. ; format dbasecomment2_en $5000. ; format dbasecomment3_en $5000. ; format dbasecomment4_en $5000. ; format dbasecomment5_en $5000. ; format enrollment_en_complete best12. ; format crfversion_lr best12. ; format ptid_lr best12. ; format frmcompldt_lr yymmdd10. ; format visitcode_lr best12. ; format sampldt_lr yymmdd10. ; format cd4per_clrb best12. ; format cd4cnt_lr best12. ; format cd8cnt_lr best12. ; format cd4to8ratio_lr best12. ; format wbc_lr best12. ; format rbc_lr best12. ; format hb_lr best12. ; format frmcomplby_lr best12. ; format frmcomplbydt_lr yymmdd10. ; 4

5 format frmdbaseby_lr best12. ; format frmdbasebydt_lr yymmdd10. ; format dbasecomment1_lr $5000. ; format dbasecomment2_lr $5000. ; format dbasecomment3_lr $5000. ; format dbasecomment4_lr $5000. ; format dbasecomment5_lr $5000. ; format lab_results_lr_complete best12. ; format crfversion_fu best12. ; format ptid_fu best12. ; format visitcode_fu best12. ; format frmcompldt_fu yymmdd10. ; format sympfev_fu best12. ; format sympfevdur_fu best12. ; format sympoth1_fu best12. ; format sympoth1sp_fu $500. ; format sympoth1dur_fu best12. ; format sympoth2_fu best12. ; format sympoth2sp_fu $500. ; format sympoth2dur_fu best12. ; format sympoth3_fu best12. ; format txmed1_fu best12. ; format txmed1name_fu $500. ; format txmed1ind_fu $500. ; format txmed1startdt_fu yymmdd10. ; format txmed1stopdt_fu yymmdd10. ; format txmed2_fu best12. ; format txmed2name_fu $500. ; format txmed2ind_fu $500. ; format txmed2startdt_fu yymmdd10. ; format txmed2stopdt_fu yymmdd10. ; format txoth1_fu best12. ; format txoth1name_fu $500. ; format txoth1ind_fu $500. ; format txoth1startdt_fu yymmdd10. ; format txoth1stopdt_fu yymmdd10. ; format weight_fu best12. ; format height_fu best12. ; format temp_fu best12. ; format heart_fu best12. ; format bpsystol_fu best12. ; format bpdiast_fu best12. ; format nxtvisitdt_fu yymmdd10. ; format frmcomplby_fu best12. ; format frmcomplbydt_fu yymmdd10. ; format frmdbaseby_fu best12. ; format frmdbasebydt_fu yymmdd10. ; format dbasecomment1_fu $5000. ; format dbasecomment2_fu $5000. ; format dbasecomment3_fu $5000. ; format dbasecomment4_fu $5000. ; format dbasecomment5_fu $5000. ; format followup_fu_complete best12. ; 5

6 input CFAR Biometrics_REDCap Data Restructuring Using SAS study_id redcap_event_name $ demographics_complete ptid_studyid_validation check_studyid_validation studyid_validation_complete crfversion_en scid_en ptid_en visitcode_en frmcompldt_en ageyrs_en agemos_en sex_en sympfev_en sympfevdur_en sympoth1_en sympoth1sp_en $ sympoth1dur_en sympoth2_en sympoth2sp_en $ sympoth2dur_en sympoth3_en txmed1_en txmed1name_en $ txmed1ind_en $ txmed1startdt_en txmed1stopdt_en txmed2_en txmed2name_en $ txmed2ind_en $ txmed2startdt_en txmed2stopdt_en txoth1_en txoth1name_en $ txoth1ind_en $ txoth1startdt_en txoth1stopdt_en weight_en height_en temp_en heart_en bpsystol_en bpdiast_en nxtvisitdt_en frmcomplby_en frmcomplbydt_en frmdbaseby_en frmdbasebydt_en dbasecomment1_en $ dbasecomment2_en $ dbasecomment3_en $ dbasecomment4_en $ dbasecomment5_en $ enrollment_en_complete crfversion_lr ptid_lr frmcompldt_lr visitcode_lr sampldt_lr cd4per_clrb cd4cnt_lr cd8cnt_lr cd4to8ratio_lr wbc_lr rbc_lr hb_lr frmcomplby_lr 6

7 frmcomplbydt_lr frmdbaseby_lr frmdbasebydt_lr dbasecomment1_lr $ dbasecomment2_lr $ dbasecomment3_lr $ dbasecomment4_lr $ dbasecomment5_lr $ lab_results_lr_complete crfversion_fu ptid_fu visitcode_fu frmcompldt_fu sympfev_fu sympfevdur_fu sympoth1_fu sympoth1sp_fu $ sympoth1dur_fu sympoth2_fu sympoth2sp_fu $ sympoth2dur_fu sympoth3_fu txmed1_fu txmed1name_fu $ txmed1ind_fu $ txmed1startdt_fu txmed1stopdt_fu txmed2_fu txmed2name_fu $ txmed2ind_fu $ txmed2startdt_fu txmed2stopdt_fu txoth1_fu txoth1name_fu $ txoth1ind_fu $ txoth1startdt_fu txoth1stopdt_fu weight_fu height_fu temp_fu heart_fu bpsystol_fu bpdiast_fu nxtvisitdt_fu frmcomplby_fu frmcomplbydt_fu frmdbaseby_fu frmdbasebydt_fu dbasecomment1_fu $ dbasecomment2_fu $ dbasecomment3_fu $ dbasecomment4_fu $ dbasecomment5_fu $ followup_fu_complete ; if _ERROR_ then call symput('_efierr_',"1"); proc contents; 7

8 data redcap; set redcap; label study_id='participant ID (ends in 9)'; label redcap_event_name='event Name'; label demographics_complete='complete?'; label ptid_studyid_validation='participant ID (ends in 9)'; label check_studyid_validation='check to validate Participant ID'; label studyid_validation_complete='complete?'; label crfversion_en='enrollment (EN): CRF Version'; label scid_en='screening ID (ends in 7)'; label ptid_en='participant ID (ends in 9)'; label visitcode_en='enrollment Visit'; label frmcompldt_en='form completion: Date (Enrollment Visit Date)'; label ageyrs_en='1a. Age (years)'; label agemos_en='1b. Age (months)'; label sex_en='1c. Sex'; label sympfev_en='fever'; label sympfevdur_en='fever: Duration (days)'; label sympoth1_en='other (1)'; label sympoth1sp_en='other (1): Specify'; label sympoth1dur_en='other (1) : Duration (days)'; label sympoth2_en='other (2)'; label sympoth2sp_en='other (2): Specify'; label sympoth2dur_en='other (2): Duration (days)'; label sympoth3_en='other (3)'; label txmed1_en='medication (1)'; label txmed1name_en='medication (1): Name'; label txmed1ind_en='medication (1): Indication'; label txmed1startdt_en='medication (1): Start date'; label txmed1stopdt_en='medication (1): End date'; label txmed2_en='medication (2)'; label txmed2name_en='medication (2): Name'; label txmed2ind_en='medication (2): Indication'; label txmed2startdt_en='medication (2): Start date'; label txmed2stopdt_en='medication (2): End date'; label txoth1_en='other (1)'; label txoth1name_en='other (1): Name'; label txoth1ind_en='other (1): Indication'; label txoth1startdt_en='other (1): Start date'; label txoth1stopdt_en='other (1): End date'; label weight_en='current weight (kg)'; label height_en='current height (cm)'; label temp_en='body temperature (degrees C)'; label heart_en='heart rate (per minute)'; label bpsystol_en='blood pressure: Systolic (mmhg)'; label bpdiast_en='blood pressure: Diastolic (mmhg)'; label nxtvisitdt_en='next visit: Date'; label frmcomplby_en='form completed by: Staff code'; label frmcomplbydt_en='form completed by: Date'; label frmdbaseby_en='form entered into database by: Staff code'; label frmdbasebydt_en='form entered into database by: Date'; label dbasecomment1_en='database comments (1)'; label dbasecomment2_en='database comments (2)'; label dbasecomment3_en='database comments (3)'; label dbasecomment4_en='database comments (4)'; label dbasecomment5_en='database comments (5)'; label enrollment_en_complete='complete?'; label crfversion_lr='lab Results (LR):CRF Version'; label ptid_lr='participant ID (ends in 9)'; label frmcompldt_lr='form completion: Date '; label visitcode_lr='visit Code'; label sampldt_lr='sample collection: Date'; label cd4per_clrb='cd4%'; label cd4cnt_lr='cd4 Count (cells/ul)'; label cd8cnt_lr='cd8 Count (cells/ul)'; label cd4to8ratio_lr='cd4/cd8 ratio'; label wbc_lr='wbc (x10^3 cells/ul)'; label rbc_lr='rbc (x10^6 cells/ul)'; label hb_lr='hemoglobin (g/dl)'; 8

9 label frmcomplby_lr='form completed by: Staff code'; label frmcomplbydt_lr='form completed by: Date'; label frmdbaseby_lr='form entered into database by: Staff code'; label frmdbasebydt_lr='form entered into database by: Date'; label dbasecomment1_lr='database comments (1)'; label dbasecomment2_lr='database comments (2)'; label dbasecomment3_lr='database comments (3)'; label dbasecomment4_lr='database comments (4)'; label dbasecomment5_lr='database comments (5)'; label lab_results_lr_complete='complete?'; label crfversion_fu='followup (FU) Visit: CRF Version'; label ptid_fu='participant ID (ends in 9)'; label visitcode_fu='visit Code'; label frmcompldt_fu='form completion: Date (Visit Date)'; label sympfev_fu='fever'; label sympfevdur_fu='fever: Duration (days)'; label sympoth1_fu='other (1)'; label sympoth1sp_fu='other (1): Specify'; label sympoth1dur_fu='other (1) : Duration (days)'; label sympoth2_fu='other (2)'; label sympoth2sp_fu='other (2): Specify'; label sympoth2dur_fu='other (2): Duration (days)'; label sympoth3_fu='other (3)'; label txmed1_fu='medication (1)'; label txmed1name_fu='medication (1): Name'; label txmed1ind_fu='medication (1): Indication'; label txmed1startdt_fu='medication (1): Start date'; label txmed1stopdt_fu='medication (1): End date'; label txmed2_fu='medication (2)'; label txmed2name_fu='medication (2): Name'; label txmed2ind_fu='medication (2): Indication'; label txmed2startdt_fu='medication (2): Start date'; label txmed2stopdt_fu='medication (2): End date'; label txoth1_fu='other (1)'; label txoth1name_fu='other (1): Name'; label txoth1ind_fu='other (1): Indication'; label txoth1startdt_fu='other (1): Start date'; label txoth1stopdt_fu='other (1): End date'; label weight_fu='current weight (kg)'; label height_fu='current height (cm)'; label temp_fu='body temperature (degrees C)'; label heart_fu='heart rate (per minute)'; label bpsystol_fu='blood pressure: Systolic (mmhg)'; label bpdiast_fu='blood pressure: Diastolic (mmhg)'; label nxtvisitdt_fu='next visit: Date'; label frmcomplby_fu='form completed by: Staff code'; label frmcomplbydt_fu='form completed by: Date'; label frmdbaseby_fu='form entered into database by: Staff code'; label frmdbasebydt_fu='form entered into database by: Date'; label dbasecomment1_fu='database comments (1)'; label dbasecomment2_fu='database comments (2)'; label dbasecomment3_fu='database comments (3)'; label dbasecomment4_fu='database comments (4)'; label dbasecomment5_fu='database comments (5)'; label followup_fu_complete='complete?'; 9

10 proc format; value $redcap_event_name_ enrollment_arm_1='enrollment' followup_6month_arm_1='followup: 6-month' followup_12month_arm_1='followup: 12-month'; value demographics_complete_ 0='Incomplete' 1='Unverified' 2='Complete'; value check_studyid_validation_ 1='Validate Participant ID'; value studyid_validation_complete_ 0='Incomplete' 1='Unverified' 2='Complete'; value crfversion_en_ 1='1.0' 2='2.0'; value sex_en_ 1='Male' 2='Female'; value sympfev_en_ 1='Yes' 0='No'; value sympoth1_en_ 1='Yes' 0='No'; value sympoth2_en_ 1='Yes' 0='No'; value sympoth3_en_ 1='Yes' 0='No'; value txmed1_en_ 1='Yes' 0='No'; value txmed2_en_ 1='Yes' 0='No'; value txoth1_en_ 1='Yes' 0='No'; value frmcomplby_en_ 1='Personnel1' 2='Personnel2'; value frmdbaseby_en_ 1='Personnel1' 2='Personnel2'; value enrollment_en_complete_ 0='Incomplete' 1='Unverified' 2='Complete'; value crfversion_lr_ 1='1.0' 2='2.0'; value frmcomplby_lr_ 1='Personnel1' 2='Personnel2'; value frmdbaseby_lr_ 1='Personnel1' 2='Personnel2'; value lab_results_lr_complete_ 0='Incomplete' 1='Unverified' 2='Complete'; value crfversion_fu_ 1='1.0' 2='2.0'; value sympfev_fu_ 1='Yes' 0='No'; value sympoth1_fu_ 1='Yes' 0='No'; value sympoth2_fu_ 1='Yes' 0='No'; value sympoth3_fu_ 1='Yes' 0='No'; value txmed1_fu_ 1='Yes' 0='No'; value txmed2_fu_ 1='Yes' 0='No'; value txoth1_fu_ 1='Yes' 0='No'; value frmcomplby_fu_ 1='Personnel1' 2='Personnel2'; value frmdbaseby_fu_ 1='Personnel1' 2='Personnel2'; value followup_fu_complete_ 0='Incomplete' 1='Unverified' 2='Complete'; 10

11 data redcap; set redcap; format redcap_event_name redcap_event_name_.; format demographics_complete demographics_complete_.; format check_studyid_validation check_studyid_validation_.; format studyid_validation_complete studyid_validation_complete_.; format crfversion_en crfversion_en_.; format sex_en sex_en_.; format sympfev_en sympfev_en_.; format sympoth1_en sympoth1_en_.; format sympoth2_en sympoth2_en_.; format sympoth3_en sympoth3_en_.; format txmed1_en txmed1_en_.; format txmed2_en txmed2_en_.; format txoth1_en txoth1_en_.; format frmcomplby_en frmcomplby_en_.; format frmdbaseby_en frmdbaseby_en_.; format enrollment_en_complete enrollment_en_complete_.; format crfversion_lr crfversion_lr_.; format frmcomplby_lr frmcomplby_lr_.; format frmdbaseby_lr frmdbaseby_lr_.; format lab_results_lr_complete lab_results_lr_complete_.; format crfversion_fu crfversion_fu_.; format sympfev_fu sympfev_fu_.; format sympoth1_fu sympoth1_fu_.; format sympoth2_fu sympoth2_fu_.; format sympoth3_fu sympoth3_fu_.; format txmed1_fu txmed1_fu_.; format txmed2_fu txmed2_fu_.; format txoth1_fu txoth1_fu_.; format frmcomplby_fu frmcomplby_fu_.; format frmdbaseby_fu frmdbaseby_fu_.; format followup_fu_complete followup_fu_complete_.; proc contents data=redcap; proc print data=redcap; quit; data source.redcap; set REDCAP; proc format library=work.formats cntlout = source.formats; proc format library=source.formats cntlin=source.formats; 11

12 *syntax00b_redcap_restructure. libname source 'C:\Users\jstern77\OneDrive - UW Office 365\REDCap Examples\SAS\Source Data\'; libname output 'C:\Users\jstern77\OneDrive - UW Office 365\REDCap Examples\SAS\Output Data\'; /* This file restructures the REDCap data file into Enrollment (1 record per subject), Follow-up (1 record per visit), and Labs (1 record per visit) files. */ *VISIT: ENROLLMENT. ; data enrollment; set source.redcap; ********************************************** *KEEP DESIRED EVENT: ENROLLMENT. proc freq data=enrollment; tables redcap_event_name*crfversion_en / missing; data enrollment; set enrollment; if redcap_event_name='enrollment_arm_1'; if crfversion_en>.; proc freq data=enrollment; tables redcap_event_name*crfversion_en / missing; data enrollment; set enrollment (rename=(study_id=study_id_en redcap_event_name=redcap_event_name_en)); ********************************************** *KEEP VARIABLES FOR THE CRF: VISIT. data enrollment; set enrollment; keep study_id_en redcap_event_name_en crfversion_en -- dbasecomment5_en enrollment_en_complete; data enrollment; set enrollment; en_indata=1; proc sort data=enrollment;by ptid_en; data output.visits_enroll0_vars; set enrollment; *Merge with main1; 12

13 *VISIT: FOLLOWUP. ; data followup; set source.redcap; ********************************************** *KEEP DESIRED EVENT: FOLLOWUP. proc freq data=followup; tables redcap_event_name*crfversion_cfu / missing; data followup; set followup; if redcap_event_name='followup_6month_arm_1' redcap_event_name='followup_12month_arm_1'; if crfversion_cfu>.; proc freq data=followup; tables redcap_event_name*crfversion_cfu / missing; data followup; set followup (rename=(study_id=study_id_cfu redcap_event_name=redcap_event_name_cfu)); ********************************************** *KEEP VARIABLES FOR THE CRF: VISIT. data followup; set followup; keep study_id_cfu redcap_event_name_cfu crfversion_cfu -- dbasecomment5_cfu child_followup_cfu_complete; data followup; set followup; cfu_indata=1; proc sort data=followup;by ptid_cfu visitcode_cfu; data output.visits_followup0_vars; set followup; *Merge with longitudinal1; 13

14 *LABS: ENROLLMENT+FOLLOWUP. PREPARE TO MERGE WITH LONGITUDINAL. ; data labs; set source.redcap; ********************************************** *KEEP DESIRED EVENT: FOLLOWUP. proc freq data=labs; tables redcap_event_name*crfversion_clr / missing; data labs; set labs; if redcap_event_name='enrollment_arm_1' redcap_event_name='followup_6month_arm_1' redcap_event_name='followup_12month_arm_1'; if crfversion_clr>.; proc freq data=labs; tables redcap_event_name*crfversion_clr / missing; data labs; set labs (rename=(study_id=study_id_clr redcap_event_name=redcap_event_name_clr)); ********************************************** *KEEP VARIABLES FOR THE CRF: VISIT. data labs; set labs; keep study_id_clr redcap_event_name_clr crfversion_clr -- dbasecomment5_clr child_lab_results_clr_complete; data labs; set labs; clr_indata=1; proc sort data=labs;by ptid_clr visitcode_clr; data output.labs0_vars; set labs; *Merge with longitudinal1; *END. ; 14

SAS 101. Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23. By Tasha Chapman, Oregon Health Authority

SAS 101. Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23. By Tasha Chapman, Oregon Health Authority SAS 101 Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23 By Tasha Chapman, Oregon Health Authority Topics covered All the leftovers! Infile options Missover LRECL=/Pad/Truncover

More information

REDCap: Beyond Forms. Paul Litwin - Collaborative Data Services (CDS)

REDCap: Beyond Forms. Paul Litwin - Collaborative Data Services (CDS) REDCap: Beyond Forms Paul Litwin - plitwin@fredhutch.org Collaborative Data Services (CDS) Agenda Importing Data Reports and Exporting Data Security REDCap's Audit Trail (Logging) Data Quality Rules Importing

More information

Survey Queues Vanderbilt University

Survey Queues Vanderbilt University Survey Queues 2015 Vanderbilt University NEW FEATURE: SURVEY QUEUES The Survey Queue displays a list of surveys to a participant all on a single page, in which the queue comprises all surveys that are

More information

Create a SAS Program to create the following files from the PREC2 sas data set created in LAB2.

Create a SAS Program to create the following files from the PREC2 sas data set created in LAB2. Topics: Data step Subsetting Concatenation and Merging Reference: Little SAS Book - Chapter 5, Section 3.6 and 2.2 Online documentation Exercise I LAB EXERCISE The following is a lab exercise to give you

More information

Moving Data and Results Between SAS and Excel. Harry Droogendyk Stratia Consulting Inc.

Moving Data and Results Between SAS and Excel. Harry Droogendyk Stratia Consulting Inc. Moving Data and Results Between SAS and Excel Harry Droogendyk Stratia Consulting Inc. Introduction SAS can read ( and write ) anything Introduction In the end users want EVERYTHING in. Introduction SAS

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

Level I: Getting comfortable with my data in SAS. Descriptive Statistics

Level I: Getting comfortable with my data in SAS. Descriptive Statistics Level I: Getting comfortable with my data in SAS. Descriptive Statistics Quick Review of reading Data into SAS Preparing Data 1. Variable names in the first row make sure they are appropriate for the statistical

More information

Chapter 2: Getting Data Into SAS

Chapter 2: Getting Data Into SAS Chapter 2: Getting Data Into SAS Data stored in many different forms/formats. Four categories of ways to read in data. 1. Entering data directly through keyboard 2. Creating SAS data sets from raw data

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

SAS Graphics & Code. stat 480 Heike Hofmann

SAS Graphics & Code. stat 480 Heike Hofmann SAS Graphics & Code stat 480 Heike Hofmann Outline Data Exploration in SAS Data Management Subsetting Graphics Code in SAS Your turn Download FBI crime data fbi-crime-60-11.csv from the website, open in

More information

2. Don t forget semicolons and RUN statements The two most common programming errors.

2. Don t forget semicolons and RUN statements The two most common programming errors. Randy s SAS hints March 7, 2013 1. Always begin your programs with internal documentation. * ***************** * Program =test1, Randy Ellis, March 8, 2013 ***************; 2. Don t forget semicolons and

More information

3. Almost always use system options options compress =yes nocenter; /* mostly use */ options ps=9999 ls=200;

3. Almost always use system options options compress =yes nocenter; /* mostly use */ options ps=9999 ls=200; Randy s SAS hints, updated Feb 6, 2014 1. Always begin your programs with internal documentation. * ***************** * Program =test1, Randy Ellis, first version: March 8, 2013 ***************; 2. Don

More information

Cite: CTSA NIH Grant UL1- RR024982

Cite: CTSA NIH Grant UL1- RR024982 PREREQUISITE FOR USE Review and approval of the project by the Institutional Review Board is required If colleting data for the purpose of human subject s research. Cite: CTSA NIH Grant UL1- RR024982 1

More information

INTRODUCTION to SAS STATISTICAL PACKAGE LAB 3

INTRODUCTION to SAS STATISTICAL PACKAGE LAB 3 Topics: Data step Subsetting Concatenation and Merging Reference: Little SAS Book - Chapter 5, Section 3.6 and 2.2 Online documentation Exercise I LAB EXERCISE The following is a lab exercise to give you

More information

Use That SAP to Write Your Code Sandra Minjoe, Genentech, Inc., South San Francisco, CA

Use That SAP to Write Your Code Sandra Minjoe, Genentech, Inc., South San Francisco, CA Paper DM09 Use That SAP to Write Your Code Sandra Minjoe, Genentech, Inc., South San Francisco, CA ABSTRACT In this electronic age we live in, we usually receive the detailed specifications from our biostatistician

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

ERROR: ERROR: ERROR:

ERROR: ERROR: ERROR: ERROR: ERROR: ERROR: Formatting Variables: Back and forth between character and numeric Why should you care? DATA name1; SET name; if var = Three then delete; if var = 3 the en delete; if var = 3 then

More information

Give me EVERYTHING! A macro to combine the CONTENTS procedure output and formats. Lynn Mullins, PPD, Cincinnati, Ohio

Give me EVERYTHING! A macro to combine the CONTENTS procedure output and formats. Lynn Mullins, PPD, Cincinnati, Ohio PharmaSUG 2014 - Paper CC43 Give me EVERYTHING! A macro to combine the CONTENTS procedure output and formats. Lynn Mullins, PPD, Cincinnati, Ohio ABSTRACT The PROC CONTENTS output displays SAS data set

More information

Other Data Sources SAS can read data from a variety of sources:

Other Data Sources SAS can read data from a variety of sources: Other Data Sources SAS can read data from a variety of sources: Plain text files, including delimited and fixed-column files Spreadsheets, such as Excel Databases XML Others Text Files Text files of various

More information

Stat 302 Statistical Software and Its Applications SAS: Data I/O

Stat 302 Statistical Software and Its Applications SAS: Data I/O Stat 302 Statistical Software and Its Applications SAS: Data I/O Yen-Chi Chen Department of Statistics, University of Washington Autumn 2016 1 / 33 Getting Data Files Get the following data sets from the

More information

Getting Started. WCHRI Clinical Research Informatics 10/23/2015 1

Getting Started. WCHRI Clinical Research Informatics 10/23/2015 1 Getting Started WCHRI Clinical Research Informatics 10/23/2015 1 Acknowledgments REDCap (Research Electronic Data Capture) is a secure, web-based application designed to support data capture for research

More information

The Programmer's Solution to the Import/Export Wizard

The Programmer's Solution to the Import/Export Wizard The Programmer's Solution to the Import/Export Wizard Lora D. Delwiche, University of California, Davis, CA Susan J. Slaughter, SAS Consultant, Davis, CA Abstract Do you like what the Import/Export Wizard

More information

SUGI 29 Data Warehousing, Management and Quality

SUGI 29 Data Warehousing, Management and Quality Building a Purchasing Data Warehouse for SRM from Disparate Procurement Systems Zeph Stemle, Qualex Consulting Services, Inc., Union, KY ABSTRACT SAS Supplier Relationship Management (SRM) solution offers

More information

2015 Vanderbilt University

2015 Vanderbilt University Beginner s Guide 2015 Vanderbilt University Table of Contents 1. INTRODUCTION... 3 2. GENERAL INFORMATION... 3 2.1 Access to REDCap... 3 2.2 Compliance... 3 2.3 Language for grant and IRB submission...

More information

ASSIGNMENT #2 ( *** ANSWERS ***) 1

ASSIGNMENT #2 ( *** ANSWERS ***) 1 ASSIGNMENT #2 ( *** ANSWERS ***) 1 * problem #1 *** WHERE WILL THE PERMANENT SAS DATA SET BE WRITTEN libname x 'i:\' CREATE A PERMANENT SAS DATA SET NAMED CLINICAL USE AN INFILE STATEMENT TO TELL SAS WHERE

More information

REDCap User Guide Version: September 30, 2010

REDCap User Guide Version: September 30, 2010 REDCap User Guide Version: September 30, 2010 Introduction This REDCap Manual functions as a resource for successful completion of electronic case report forms (ecrfs) for the PEP up Study. The manual

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

Accessing Data and Creating Data Structures. SAS Global Certification Webinar Series

Accessing Data and Creating Data Structures. SAS Global Certification Webinar Series Accessing Data and Creating Data Structures SAS Global Certification Webinar Series Accessing Data and Creating Data Structures Becky Gray Certification Exam Developer SAS Global Certification Michele

More information

A Macro that Creates U.S Census Tracts Keyhole Markup Language Files for Google Map Use

A Macro that Creates U.S Census Tracts Keyhole Markup Language Files for Google Map Use Paper 2418-2018 A Macro that Creates U.S Census Tracts Keyhole Markup Language Files for Google Map Use ABSTRACT Ting Sa, Cincinnati Children s Hospital Medical Center This paper introduces a macro that

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

Biostatistics 600 SAS Lab Supplement 1 Fall 2012

Biostatistics 600 SAS Lab Supplement 1 Fall 2012 Biostatistics 600 SAS Lab Supplement 1 Fall 2012 p 2. How to Enter Data in the Program Editor Window: Instream Data p 5. How to Create a SAS Data Set from Raw Data Files p 16. Using Dates in SAS 1 How

More information

Innovative Performance Improvements Through Automated Flowcharts In SAS

Innovative Performance Improvements Through Automated Flowcharts In SAS ABSTRACT Paper 11580-2016 Innovative Performance Improvements Through Automated Flowcharts In SAS Steven First, Systems Seminar Consultants, Inc. One of the tedious but necessary things that SAS programmers

More information

Stat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics

Stat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics Stat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics Fritz Scholz Department of Statistics, University of Washington Winter Quarter 2015 February 19, 2015 2 Getting

More information

Piping values onto other REDCap Instrument forms

Piping values onto other REDCap Instrument forms Piping values onto other REDCap Instrument forms Piping gives you the ability to use data already entered on a form, in other forms within a project. This is used so that users are able to see important

More information

Using a HASH Table to Reference Variables in an Array by Name. John Henry King, Hopper, Arkansas

Using a HASH Table to Reference Variables in an Array by Name. John Henry King, Hopper, Arkansas PharmaSUG 2011 - Paper TT04 Using a HASH Table to Reference Variables in an Array by Name John Henry King, Hopper, Arkansas ABSTRACT Array elements are referenced by their index value using a constant,

More information

Analysis of variance and regression. November 13, 2007

Analysis of variance and regression. November 13, 2007 Analysis of variance and regression November 13, 2007 SAS language The SAS environments Reading in, data-step Summary statistics Subsetting data More on reading in, missing values Combination of data sets

More information

Analysis of variance and regression. November 13, 2007

Analysis of variance and regression. November 13, 2007 Analysis of variance and regression November 13, 2007 SAS language The SAS environments Reading in, data-step Summary statistics Subsetting data More on reading in, missing values Combination of data sets

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

data Vote; /* Read a CSV file */ infile 'c:\users\yuen\documents\6250\homework\hw1\political.csv' dsd; input state $ Party $ Age; run;

data Vote; /* Read a CSV file */ infile 'c:\users\yuen\documents\6250\homework\hw1\political.csv' dsd; input state $ Party $ Age; run; Chapter 3 2. data Vote; /* Read a CSV file */ infile 'c:\users\yuen\documents\6250\homework\hw1\political.csv' dsd; input state $ Party $ Age; title "Listing of Vote data set"; /* compute frequencies for

More information

Introduction to. Sponsored by the Pediatric Research Office (PRO)

Introduction to. Sponsored by the Pediatric Research Office (PRO) Introduction to Sponsored by the Pediatric Research Office (PRO) Agenda Overview of REDCap Basic project work flow Creating a project with REDCap Interactive demonstration Questions and Answers Overview

More information

Tanita Health Ware Help

Tanita Health Ware Help Tanita Health Ware Help Getting Started Managing Users Measurements Analysis Graphs Files & Sharing Exporting ANT Scale Installation Using Garmin Watches Bluetooth Scale Installation Getting Started The

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

PharmaSUG Paper SP08

PharmaSUG Paper SP08 PharmaSUG 2012 - Paper SP08 USING SAS TO CALCULATE NONCOMPARTMENTAL URINE PARAMETERS Vanessa Rubano, Boehringer Ingelheim Pharmaceuticals Inc., Ridgefield, CT Modesta Wiersema, Boehringer Ingelheim Pharma

More information

Setting Up the Randomization Module in REDCap How-To Guide

Setting Up the Randomization Module in REDCap How-To Guide Setting Up the Randomization Module in REDCap How-To Guide REDCAP Randomization Module Randomization is a process that assigns participants/subjects by chance (rather than by choice) into specific groups,

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

Macros are a block of code that can be executed/called on demand

Macros are a block of code that can be executed/called on demand What Are These Macros are a block of code that can be executed/called on demand Global variables are variables that you assign a value to, which can be referenced anywhere within your program. (Leah s

More information

REDCap Overview. REDCap questions to Last updated 12/12/2018 for REDCap v6.13.1

REDCap Overview.  REDCap questions to Last updated 12/12/2018 for REDCap v6.13.1 REDCap Overview Research Informatics Core (RIC) Harold & Muriel Block Institute for Clinical & Translational Research (ICTR) at Einstein and Montefiore Email REDCap questions to RIChelp@einstein.yu.edu

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

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

Dictionary.coumns is your friend while appending or moving data

Dictionary.coumns is your friend while appending or moving data ABSTRACT SESUG Paper CC-41-2017 Dictionary.coumns is your friend while appending or moving data Kiran Venna, Dataspace Inc. Dictionary.columns is a dictionary table, which gives metadata information of

More information

REDCap s Linear Data Entry Workflow (LDEW) External Module: Introduction and Guide to Setting It Up in your Project

REDCap s Linear Data Entry Workflow (LDEW) External Module: Introduction and Guide to Setting It Up in your Project REDCap s Linear Data Entry Workflow (LDEW) External Module: Introduction and Guide to Setting It Up in your Project Note: there is a $100 one-time fee to activate this module in each REDCap project. This

More information

An Introduction to SAS University Edition

An Introduction to SAS University Edition An Introduction to SAS University Edition Ron Cody From An Introduction to SAS University Edition. Full book available for purchase here. Contents List of Programs... xi About This Book... xvii About the

More information

Example1D.1.sas. * Procedures : ; * 1. print to show the dataset. ;

Example1D.1.sas. * Procedures : ; * 1. print to show the dataset. ; Example1D.1.sas * SAS example program 1D.1 ; * 1. Create a dataset called prob from the following data: ; * age prob lb ub ; * 24.25.20.31 ; * 36.26.21.32 ; * 48.28.24.33 ; * 60.31.28.36 ; * 72.35.32.39

More information

Write SAS Code to Generate Another SAS Program A Dynamic Way to Get Your Data into SAS

Write SAS Code to Generate Another SAS Program A Dynamic Way to Get Your Data into SAS Paper 175-29 Write SAS Code to Generate Another SAS Program A Dynamic Way to Get Your Data into SAS Linda Gau, Pro Unlimited @ Genentech, Inc., South San Francisco, CA ABSTRACT In this paper we introduce

More information

SAS Programs SAS Lecture 4 Procedures. Aidan McDermott, April 18, Outline. Internal SAS formats. SAS Formats

SAS Programs SAS Lecture 4 Procedures. Aidan McDermott, April 18, Outline. Internal SAS formats. SAS Formats SAS Programs SAS Lecture 4 Procedures Aidan McDermott, April 18, 2006 A SAS program is in an imperative language consisting of statements. Each statement ends in a semi-colon. Programs consist of (at least)

More information

SAS Online Training: Course contents: Agenda:

SAS Online Training: Course contents: Agenda: SAS Online Training: Course contents: Agenda: (1) Base SAS (6) Clinical SAS Online Training with Real time Projects (2) Advance SAS (7) Financial SAS Training Real time Projects (3) SQL (8) CV preparation

More information

REDCap s Form Render Skip Logic (FRSL) External Module: Introduction and Guide to Setting It Up in your Project

REDCap s Form Render Skip Logic (FRSL) External Module: Introduction and Guide to Setting It Up in your Project REDCap s Form Render Skip Logic (FRSL) External Module: Introduction and Guide to Setting It Up in your Project Note: there is a $100 one-time fee to activate this module in each REDCap project. This fee

More information

& Staff) Contents. 2) Enter a title

& Staff) Contents. 2) Enter a title REDCap Projects Overview (Audience: Faculty & Staff) Contents Create Project... 1 Main Project Settings... 4 Data Collection Instruments... 6 Practice Data Collection... 12 Project Users... 13 Move Project

More information

Final Stat 302, March 17, 2014

Final Stat 302, March 17, 2014 First Name Last Name Student ID Final Stat 302, March 17, 2014 Fritz Scholz Questions 1-15 count as 4 points each, the rest as 6 points each (180 total). 1. Could Y and y refer to different objects within

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

17. Reading free-format data. GIORGIO RUSSOLILLO - Cours de prépara)on à la cer)fica)on SAS «Base Programming» 386

17. Reading free-format data. GIORGIO RUSSOLILLO - Cours de prépara)on à la cer)fica)on SAS «Base Programming» 386 17. Reading free-format data 386 Reading free format data: The list input A raw dataset is free-format when it is not arranged in fixed fields. -> Fields are separated by a delimiter List input allows

More information

Steps performed by the software:

Steps performed by the software: The following is an overview of the software for the Version 22 CMS-HCC risk-adjustment model. The software includes a SAS program V2218O1P that calls several SAS Macros to create HCC score variables using

More information

Exporting & Importing Datasets & Catalogs: Utility Macros

Exporting & Importing Datasets & Catalogs: Utility Macros Exporting & Importing Datasets & Catalogs: Utility Macros Adel Fahmy, SYSMART Consulting, North Brunswick, NJ ABSTRACT Since different companies use different SAS versions installed on different platforms,

More information

Validating Analysis Data Set without Double Programming - An Alternative Way to Validate the Analysis Data Set

Validating Analysis Data Set without Double Programming - An Alternative Way to Validate the Analysis Data Set PharmaSUG 2014 Paper AD26 Validating Analysis Data Set without Double Programming - An Alternative Way to Validate the Analysis Data Set Linfeng Xu, Novartis, East Hanover, NJ Christina Scienski, Novartis,

More information

using and Understanding Formats

using and Understanding Formats using and Understanding SAS@ Formats Howard Levine, DynaMark, Inc. Oblectives The purpose of this paper is to enable you to use SAS formats to perform the following tasks more effectively: Improving the

More information

Table of Contents. The RETAIN Statement. The LAG and DIF Functions. FIRST. and LAST. Temporary Variables. List of Programs.

Table of Contents. The RETAIN Statement. The LAG and DIF Functions. FIRST. and LAST. Temporary Variables. List of Programs. Table of Contents List of Programs Preface Acknowledgments ix xvii xix The RETAIN Statement Introduction 1 Demonstrating a DATA Step with and without a RETAIN Statement 1 Generating Sequential SUBJECT

More information

TIPS FROM THE TRENCHES

TIPS FROM THE TRENCHES TIPS FROM THE TRENCHES Christopher Bost MDRC SAS Users Group October 1, 2008 Recent user questions 2 How can I print long character values? How can I EXPORT formatted values to Excel? How can I check for

More information

Guidance for building Study and CRF in OpenClinica

Guidance for building Study and CRF in OpenClinica Guidance for building Study and CRF in OpenClinica 1. Use of Patient Identifying information Patient Identifying Data (PID) is any data within clinical data that could potentially be used to identify subjects,

More information

Quality Control of Clinical Data Listings with Proc Compare

Quality Control of Clinical Data Listings with Proc Compare ABSTRACT Quality Control of Clinical Data Listings with Proc Compare Robert Bikwemu, Pharmapace, Inc., San Diego, CA Nicole Wallstedt, Pharmapace, Inc., San Diego, CA Checking clinical data listings with

More information

Intermediate SAS: Working with Data

Intermediate SAS: Working with Data Intermediate SAS: Working with Data OIT Technical Support Services 293-4444 oithelp@mail.wvu.edu oit.wvu.edu/training/classmat/sas/ Table of Contents Getting set up for the Intermediate SAS workshop:...

More information

B/ Use data set ADMITS to find the most common day of the week for admission. (HINT: Use a function or format.)

B/ Use data set ADMITS to find the most common day of the week for admission. (HINT: Use a function or format.) ASSIGNMENT #6 (*** ANSWERS ***) #1 DATES The following data are similar to data in example 8.3 in the notes. data admits format admit mmddyy10. input admit1 : mmddyy10. @@ datalines 11181998 12111998 02281998

More information

Remove this where. statement to produce the. report on the right with all 4 regions. Retain this where. statement to produce the

Remove this where. statement to produce the. report on the right with all 4 regions. Retain this where. statement to produce the Problem 4, Chapter 14, Ex. 2. Using the SAS sales data set, create the report shown in the text. Note: The report shown in the text for this question, contains only East & West region data. However, the

More information

PROC FORMAT. CMS SAS User Group Conference October 31, 2007 Dan Waldo

PROC FORMAT. CMS SAS User Group Conference October 31, 2007 Dan Waldo PROC FORMAT CMS SAS User Group Conference October 31, 2007 Dan Waldo 1 Today s topic: Three uses of formats 1. To improve the user-friendliness of printed results 2. To group like data values without affecting

More information

work.test temp.test sasuser.test test

work.test temp.test sasuser.test test DSCI 325 Midterm Practice Test Spring 2017 Name: 1. Consider the following four names used to create a SAS data set: work.test temp.test sasuser.test test How many of these will be stored as permanent

More information

Stat-340 Term Test Spring Term

Stat-340 Term Test Spring Term Stat-340 Term Test 1 2015 Spring Term Part 1 - Multiple Choice Enter your answers to the multiple choice questions on the provided bubble sheets. Each of the multiple choice question is worth 1 mark there

More information

Electricity Forecasting Full Circle

Electricity Forecasting Full Circle Electricity Forecasting Full Circle o Database Creation o Libname Functionality with Excel o VBA Interfacing Allows analysts to develop procedural prototypes By: Kyle Carmichael Disclaimer The entire presentation

More information

Dates. Saad Rais. Ministry of Health and Long-Term Care Nov 20, 2015

Dates. Saad Rais. Ministry of Health and Long-Term Care Nov 20, 2015 Dates Saad Rais Ministry of Health and Long-Term Care Nov 20, 2015 SAS Dates are like sour grapes What do we use dates for? Data query by period Measure duration Time indicators Forecasting Modelling Rates

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

Integrating Large Datasets from Multiple Sources Calgary SAS Users Group (CSUG)

Integrating Large Datasets from Multiple Sources Calgary SAS Users Group (CSUG) Integrating Large Datasets from Multiple Sources Calgary SAS Users Group (CSUG) October 25, 2017 Hotel Le-Germain Outline About the AESO Large Datasets: AESO Context Usual Process Obtain data Connecting

More information

STAT 7000: Experimental Statistics I

STAT 7000: Experimental Statistics I STAT 7000: Experimental Statistics I 2. A Short SAS Tutorial Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2009 Peng Zeng (Auburn University) STAT 7000 Lecture Notes Fall 2009

More information

The Basics. As of December 12, 2016

The Basics. As of December 12, 2016 The Basics As of December 12, 2016 Accessing REDCap 1. To access REDCap, enter the URL into your internet browser: https://redcap.wakehealth.edu/ 2. Login using your Medical Center ID and password 3. FAQ

More information

Innovative SAS Techniques

Innovative SAS Techniques Carpenter s Guide to Innovative SAS Techniques. ART CARPENTER Sample Text... is Professor of Statistics at Grinnell College in Grinnell, Iowa, where he teaches elementary statistics and experimental design.

More information

SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2

SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Module 2 SAS PROGRAMMING AND APPLICATIONS (STAT 5110/6110): FALL 2015 Department of MathemaGcs and StaGsGcs Phone: 4-3620 Office: Parker 364- A E- mail: carpedm@auburn.edu Web: hup://www.auburn.edu/~carpedm/stat6110

More information

Creating Forest Plots Using SAS/GRAPH and the Annotate Facility

Creating Forest Plots Using SAS/GRAPH and the Annotate Facility PharmaSUG2011 Paper TT12 Creating Forest Plots Using SAS/GRAPH and the Annotate Facility Amanda Tweed, Millennium: The Takeda Oncology Company, Cambridge, MA ABSTRACT Forest plots have become common in

More information

DSCI 325: Handout 2 Getting Data into SAS Spring 2017

DSCI 325: Handout 2 Getting Data into SAS Spring 2017 DSCI 325: Handout 2 Getting Data into SAS Spring 2017 Data sets come in many different formats. In some situations, data sets are stored on paper (e.g., surveys) and other times data are stored in huge

More information

The INPUT Statement: Where It

The INPUT Statement: Where It The INPUT Statement: Where It s @ Ron Cody email: ron.cody@gmail.com Author page: Support.sas.com/cody List Directed Input data list input X Y A $ Z datalines 1 2 hello 3 4 5 goodbye 6 title 'List Directed

More information

Procedure for Stamping Source File Information on SAS Output Elizabeth Molloy & Breda O'Connor, ICON Clinical Research

Procedure for Stamping Source File Information on SAS Output Elizabeth Molloy & Breda O'Connor, ICON Clinical Research Procedure for Stamping Source File Information on SAS Output Elizabeth Molloy & Breda O'Connor, ICON Clinical Research ABSTRACT In the course of producing a report for a clinical trial numerous drafts

More information

SAS Display Manager Windows. For Windows

SAS Display Manager Windows. For Windows SAS Display Manager Windows For Windows Computers with SAS software SSCC Windows Terminal Servers (Winstat) Linux Servers (linstat) Lab computers DoIT Info Labs (as of June 2014) In all Labs with Windows

More information

%Addval: A SAS Macro Which Completes the Cartesian Product of Dataset Observations for All Values of a Selected Set of Variables

%Addval: A SAS Macro Which Completes the Cartesian Product of Dataset Observations for All Values of a Selected Set of Variables %Addval: A SAS Macro Which Completes the Cartesian Product of Dataset Observations for All Values of a Selected Set of Variables Rich Schiefelbein, PRA International, Lenexa, KS ABSTRACT It is often useful

More information

Reducing SAS Dataset Merges with Data Driven Formats

Reducing SAS Dataset Merges with Data Driven Formats Paper CT01 Reducing SAS Dataset Merges with Data Driven Formats Paul Grimsey, Roche Products Ltd, Welwyn Garden City, UK ABSTRACT Merging different data sources is necessary in the creation of analysis

More information

I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN

I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN SAS for HLM Edps/Psych/Stat/ 587 Carolyn J. Anderson Department of Educational Psychology I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN SAS for HLM Slide 1 of 16 Outline SAS & (for Random

More information

Using a Fillable PDF together with SAS for Questionnaire Data Donald Evans, US Department of the Treasury

Using a Fillable PDF together with SAS for Questionnaire Data Donald Evans, US Department of the Treasury Using a Fillable PDF together with SAS for Questionnaire Data Donald Evans, US Department of the Treasury Introduction The objective of this paper is to demonstrate how to use a fillable PDF to collect

More information

Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc.

Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc. PharmaSUG2011 - Paper DM03 Data Edit-checks Integration using ODS Tagset Niraj J. Pandya, Element Technologies Inc., NJ Vinodh Paida, Impressive Systems Inc., TX ABSTRACT In the Clinical trials data analysis

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

22S:166. Checking Values of Numeric Variables

22S:166. Checking Values of Numeric Variables 22S:1 Computing in Statistics Lecture 24 Nov. 2, 2016 1 Checking Values of Numeric Variables range checks when you know what the range of possible values is for a given quantitative variable internal consistency

More information

Seeking, Mapping, and Fuzzy Merging Data Structures in a Networked Environment Haftan Eckholdt, Albert Einstein College of Medicine, Bronx, NY

Seeking, Mapping, and Fuzzy Merging Data Structures in a Networked Environment Haftan Eckholdt, Albert Einstein College of Medicine, Bronx, NY Seeking, Mapping, and Fuzzy Merging Data Structures in a Networked Environment Haftan Eckholdt, Albert Einstein College of Medicine, Bronx, NY ABSTRACT The challenges of long term, multi-site projects

More information

Introduction to using the CALERIE Public Use Database

Introduction to using the CALERIE Public Use Database Introduction to using the CALERIE Public Use Database Outline Where to find information Data download instructions Database installation Raw and Analysis datasets Important Data usage notes Major data

More information

There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA

There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA Paper HW04 There s No Such Thing as Normal Clinical Trials Data, or Is There? Daphne Ewing, Octagon Research Solutions, Inc., Wayne, PA ABSTRACT Clinical Trials data comes in all shapes and sizes depending

More information

REDCap Survey Participant List

REDCap Survey Participant List REDCap Survey Participant List If responses do not need to be anonymous, you may use the participant list to capture email addresses to send participants multiple surveys and have the data linked. Below

More information

From An Introduction to SAS University Edition. Full book available for purchase here.

From An Introduction to SAS University Edition. Full book available for purchase here. From An Introduction to SAS University Edition. Full book available for purchase here. Contents List of Programs... xi About This Book... xvii About the Author... xxi Acknowledgments... xxiii Part 1: Getting

More information