+ All Categories
Home > Documents > PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Date post: 27-Jan-2022
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
18
A Macro to automate detection of date variables and derivation of RFPENDTC P.Kiran Kumar babu QUARTESIAN PHUSE US CONNECT 2021 CT01
Transcript
Page 1: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

A Macro to automate detection of date variables and derivation of

RFPENDTCP.Kiran Kumar babu

QUARTESIAN

PHUSE US CONNECT 2021CT01

Page 2: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

AGENDA :o Working process of macro

o Identification of date variables

o Combining datasets

o Reshaping of Data

o Getting latest date

o Macro parameters

o Macro limitations

o Advantages of macro

o Conclusion

Page 3: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Select date variables

from desired datasets

Reshaping of data

WORKING PROCESS

Get latest date.

Page 4: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Identification of Date Variables:

Table 1.1

Dataset : SETVSo Prefix can be of user discrete : SET

Page 5: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Identification of Date Variables:

Table 1.2

Dataset : SETDS

o Most of the data management software’scaptures dates of study in different formatw.r.t system generated date variables

Page 6: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Identification of Date Variables:

Table 1.3 Table 1.4

o These methods gives additional date variables and are not very accurate , but additional variables can be dropped

Page 7: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Identification of Date Variables:

Dataset : SETVS Dataset : SETDS

Page 8: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Combining datasets:

Dataset : RFPEND

o User can modify macro to select datevariables by using SASHELP.VCOLUMN orDICTIONARY.COLUMNS , but it is advisableto create individual dataset for eachdomain with only date variables and idvar

o Reshaping of data is required

Page 9: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Transposing of data:

Dataset : RFPEND1

Page 10: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Transposing of data:

Dataset : RFPEND2

Page 11: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Last.variable:

FINAL DATASET : RFPENDTC

Macro code:%rfpendtc(libname=work,dsnames=vs ds,format=“MMDDYY”,idvar=subjectid

out=rfpendtc);

Page 12: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...
Page 13: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Macro Parameters:Parameter Parameter-Explanation Optional Default

libname Name of a library in which desired datasets are presentExample: raw , work

No Not applicable

dsnames Space separated list of data set names to be selected from the given libraryExample: dsnames=ae vs lb

No Not applicable

idvar variable representing subject id in the studyExample: idvar=usubjididvar=”STUDYID”||’-‘||SITE||’-‘||SUBJECTID

No SUBJECTID

format Check with desired dateformat and should be given in UPPER CASE in quotes without length.Example: Format=”DATETIME” OR “MMDDYY”

No MMDDYY

dropvar Variables that are not required for analysis , can be used only after running once and knowing variable names

Yes

out Out dataset name as needed Yes RFPENDTC

Page 14: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Macro Limitation:

o Macro limitation includes IDVAR i.e., Subject identification variable , it must be present in all

datasets and as same in all datasets E.g., SUBJECTID ..

o This macro very effective when given specific format.

o User may get undesired results if format is not specific , but later user can drop those variables

which are not needed for analysis with help of macro variable &dropvar by manually analyzing

RFPEND datasetE.g., %rfpendtc(libname=work,dsnames=vs ds,format=“MMDDYY”,idvar=subjectid,

dropvar=vsdt vsdt1,out=rfpendtc);

.

Page 15: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Advantages :

o Each domain creates a new dataset with only date

variables ,very effective to perform QC

o Easy to understand and can be modified as per

user needs

o Creates limited number of datasets therefore

execution is fast

o Very effective against SDTM final datasets

Page 16: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Conclusion:

o An automated macro for Rfpendtc targeting date formats, really saves lot of programmer’s time and

also gives accuracy

o This Macro can be limited up to formation of RFPEND dataset, and transposing can be done manually by

choosing the variables to participate in rfpendtc derivation at discrete of user

o Identification of dates based on formats and transposing them is not only useful for rfpendtc , but also

useful for indexing of dates as per domains and also to perform any other actions related to dates

o Incase of dates separated by year ,month and day or separate timing variable, user can concatenate

them while creating individual dataset.

o This macro can be customized as per user requirements

Page 17: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Questions ?

Page 18: PHUSE US CONNECT 2021 CT01 A Macro to automate detection ...

Thank youAuthor: P. Kiran Kumar babuStatistical programmer [email protected]


Recommended