1 / 16

Kathryn Benton, MSPH Diane Fairclough, DrPH Brenda Beaty, MSPH

The Analysis System: How a research team can organize and analyze multiple datasets with multiple outcomes measured multiple times. Kathryn Benton, MSPH Diane Fairclough, DrPH Brenda Beaty, MSPH

zinnia
Download Presentation

Kathryn Benton, MSPH Diane Fairclough, DrPH Brenda Beaty, MSPH

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Analysis System:How a research team can organize and analyze multiple datasets with multiple outcomes measured multipletimes Kathryn Benton, MSPH Diane Fairclough, DrPH Brenda Beaty, MSPH University of Colorado at Denver and Health Sciences Center, Colorado Health Outcomes Program, Aurora, CO

  2. Identify User Update Data Analysis Plan Modeling Multiple Outcomes • Assign appropriate libname, depending on the user • Update Data • Provide latest batch number of data forms • Run internal SAS™ program to compile macros used later • Run input program to generate updated datasets for each of 15 forms • Analysis Plan • Repeated Measures • Conclusion

  3. Identify User Update Data Analysis Plan Modeling Multiple Outcomes Who Are You? %include 'C:\SAS Macros\Root_REST.sas'; *Identifies the root directory for each user*;

  4. Root Macro %macro Root; %if %upcase(&ABC)=Y %then %do; *Root for person ABC*; %let root=Z:; %end; %if %upcase(&DEF)=Y %then %do; *Root for person DEF*; %let root=G:; %end; %mend root; %root; libname library "&root\REST\SASlib"; libname sasdata "&root\REST\SASlib";

  5. Identify User Update Data Analysis Plan Modeling Multiple Outcomes Update Database • ConvertAll.sas • Calls in the Source, RunIntxt, and ListDSN macros • Prompts the user to provide the latest batch number of the data which defines the global macro variable “last”: %global last; %window interface color=yellow #9 @20 "REST " #10 @25 "Generates SAS Permanent Dataset from ASCII Files" #13 @20 '# ASCII Files: ' last 2 ATTR=UNDERLINE REQUIRED=YES #14 @25 "If less than 10, please use one digit instead of two." #15 @25 "For example : 5 " #16 @25 "Please do not use 05" #25 @20 "Please Press ENTER"; %display interface; • Updates the list of fifteen new datasets using %include statements

  6. Source Macro %macrosource; %let newno=%sysfunc(putn(&no,z3.)); infile "&root\REST\Source\ASCIIFiles \R&NumDSN._&newno..txt" missover lrecl=500; %mend source;

  7. Intxt Macro %let dsn=F1; %macro Intxt (no); data rest_&DSN._&no; %source; (variable creation, categorization, labels, etc) run; %mend Intxt;

  8. RunInTxt Macro %macrorunIntxt; %do i=1 %to &last; %Intxt(&i); %end; %mend runIntxt;

  9. ListDSN Macro Last statements in each form file: data sasdata.REST_&DSN; set %listdsn(&DSN); *%ListDSN lists dataset names*; by id visit; run; Called in by the ConvertAll.SAS program: %macro listdsn (DSN); %do i=1 % to &last; REST_&DSN._&i %end; %mend listdsn;

  10. Final Dataset Generation %include "&root\REST\SAS programs\ConvertASCII\IN_Form1.sas"; %include "&root\REST\SAS programs\Convert ASCII\IN_Form2.sas"; %include "&root\REST\SAS programs\Convert ASCII\IN_Form3.sas"; . . . %include "&root\REST\SAS programs\Convert ASCII\IN_Form15.sas";

  11. Identify User Update Data Analysis Plan Modeling Multiple Outcomes Analysis Plan

  12. Covariates for the Repeated Measures Mixed Model procsql; * Reads Covariates from Form 1 *; create table REST_Covar as select ID, (age - mean(age)) as CAge label='Age Centered', (comorbid - mean(comorbid)) as CComorbid label='# Comorbid Cndtn Cntrd', (F1Q7 - mean(F1Q7)) as CSex label='Sex Centered', (F1Q18a - mean(min(F1Q18a,2))) as CPrevM label='No PrevMassage Centered', (F1Q19e - mean(F1Q19e)) as CWPainWk label='Worst Pain Last Week Centered' from work.REST_F1; quit; procsql; * Reads Covariates from Form 2 *; create table REST_Covar2 as select ID, (F5AR - mean(F5AR)) as CKarnofsky label='Karnofsky Functional Status' from work.rest_f5 where visit eq 1; quit; %let covars=CAge CComorbid CSex CPrevM CWPainWk CKarnofsky;

  13. %include "&ROOT\REST\SASMacros\RM_macros.sas"; *Includes macro*; %macro mixed4(no,outcome,label,covars); proc mixed data=work.assessment; class Treat visit id; model &outcome = Treat*visit &covars/ noint solution; repeated visit / subject=id type=un r=3 rcorr=3; estimate 'Visit 1, MT vs NMT' Treat*visit 1000 -1000; estimate 'Visit 2, MT vs NMT' Treat*visit 0100 0 -100; estimate 'Visit 3, MT vs NMT' Treat*visit 0010 00 -10; estimate 'Visit 4, MT vs NMT' Treat*visit 0001 000 -1; estimate 'BL vs FU, MT ' Treat*visit -3111 0000 / divisor=3; estimate 'BL vs FU, NMT' Treat*visit 0000 -3111 / divisor=3; estimate 'BL vs FU, MT vs NMT' Treat*visit -3111 3 -1 -1 -1 /divisor=3; format visit 2.; ods output Estimates=work.Est&no SolutionF=work.Beta&no Covparms=work.cov&no; run; %mend;

  14. Identify User Update Data Analysis Plan Modeling Multiple Outcomes %mixed4(1,var1,Variable One,&covars) %mixed4(2,var2,Variable Two,&covars) %mixed4(3,var3,Variable Three,&covars) ..... %mixed4(20,var20,Variable Twenty,&covars); quit; ods rtf file="&root\Rest\Reports\Repeated Measures\RMAssess.rtf"

  15. Conclusion • Useful for studies with multiple data collection times and SAS program users • Requires more time at study initiation, but saves time at the end of the study when manuscripts are being drafted • Maintains impressive organization of the data, programs, and reports

  16. Thank You Kathryn Benton University of Colorado at Denver and Health Sciences Center Colorado Health Outcomes Program 12477 East 19th Avenue, MS F443 P.O. Box 6508 Aurora, CO 80045 Phone: 303-724-1371 Fax: 303-724-1839 E-mail: Kathryn.Benton@UCHSC.edu Web: www.uchsc.edu/coho

More Related