SAS Interview Questions:Base SAS Very Basic: � What
SAS statements would you code to read an external raw data file to a DATA
step I!"I#$ statement% � &ow
do you read in the varia'les that you need
(sin) Input statement with the column pointers li*e +,-./0.1 etc% � Are
you familiar with special input delimiters &ow are they used
D#2 and DSD are the the delimiters delimiters that I� ve used% They should should 'e included included in the infile statement% 3omma separated values files or 3SV files are a common type of file that can 'e used to read with the DSD option% DSD option treats two delimiters in a row as 2ISSI!4 value% DSD also i)nores the delimiters enclosed in 5uotation mar*s% � If
readin) a varia'le len)th file with fixed input6 how would you prevent SAS from readin) the next record if the last varia'le didn7t have a value By usin) the option 2ISS8V$9 in the infile statement% If the input of some data lines are shorter than others then we use T9(!38V$9 option in the infile statement% � What is the difference 'etween an informat and a format !ame three informats or formats% Informats read the data% "ormat is to write the data% Informats: comma% dollar% date%"ormats can 'e same as informats Informats: 22DDw% DAT$w% TI2$w% 6 ;$93$!Tw6 "ormats: W89DIAT$.<%6 wee*datew% � !ame
and descri'e three SAS functions that you have used6 if any
#$!4T&: returns the len)th of an ar)ument not countin) the trailin) 'lan*s%=missin) values have a len)th of .> $x: a?� my cat� @ x?#$!4T&=a>@ 9esult: x?� S(BST9: S(BST9=ar)6position6n> extracts a su'strin) from an ar)ument startin) at �posi positi tion on� for for � n� char charac acte ters rs or unti until l end end if no � n� % $x: $x: A?� =. =.>1 >1C C0 0/ /. .� @ E?S(BST9 E?S(BST9=a6 =a6/6C> /6C>@ @ 9$S(#T: 9$S(#T: x?� .� T9I2: removes trailin) 'lan*s from character expression% $x: a?� my � @ '?� cat� @ E? T9I T9I2= 2=a> a>=' ='>@ >@ 9$S 9$S(# (#T: T: x? x?� myca mycat t� % S(2: sum of non missin) values% $x: x?Sum=C6,6.>@ result: x?%F I!T: 9eturns the inte)er portion of the ar)ument% � &ow
would you code the criteria to restrict the output to 'e produced
(se !8;9I!T option%
� What
is the purpose of the trailin) + and the ++ &ow would you use them + holds the value past the data step% ++ holds the value till a input statement or end of the line% Dou'le trailin) ++: When you have multiple o'servations per line of raw data6 we should use dou'le trailin) si)ns =++> at the end of the I!;(T statement% The line hold specifies specifies li*e li*e a stop si)n tellin) SAS6 � stop6 hold that line of raw data� % Trailin) +: By usin) + without specifyin) a column6 it is as if you are tellin) SAS6� stay tuned tuned for for more more info informat rmation% ion% Don� t touch touch that dial� % SAS SAS will will hold hold the line of data until it reaches either the end of the data step or an I!;(T statement that does not end with the trailin)% � (nder what circumstances would you code a S$#$3T construct instead of I" statements
When you have a lon) series of mutually exclusive conditions and the comparison is numeric6 usin) a S$#$3T )roup is sli)htly more efficient than usin) I"0T&$! or I"0 T&$!0$#S$ statements 'ecause 3;( time is reduced% S$#$3T 498(;: Select: 'e)ins with select )roup% When: identifies SAS statements that are executed when a particular condition is true% 8therwise =optional>: specifies a statement to 'e executed if no W&$! condition is met% $nd: ends a S$#$3T )roup% �What
statement you code to tell SAS that it is to write to an external file What statement do you code to write the record to the file ;(T and "I#$ statements% � If
readin) an external file to produce an external file6 what is the shortcut to write that record without codin) every sin)le varia'le on the record � If
you7re not wantin) any SAS output from a data step6 how would you code the data statement to prevent SAS from producin) a set Data G!ullG � What is the one statement to set the criteria of data that can 'e coded in any step
8ptions statement: This a part of SAS pro)ram and effects all steps that follow it% � &ave
you ever lin*ed SAS code If so6 descri'e the lin* and any re5uired statements used to either process the code or the step itself% � &ow would you include common or reuse code to 'e processed alon) with your statements
By usin) SAS 2acros% � When
loo*in) for data contained in a character strin) of .,F 'ytes6 which function is the 'est to locate that data: scan6 index6 or indexc S3A!%
� What
is the purpose of the trailin) + and the ++ &ow would you use them + holds the value past the data step% ++ holds the value till a input statement or end of the line% Dou'le trailin) ++: When you have multiple o'servations per line of raw data6 we should use dou'le trailin) si)ns =++> at the end of the I!;(T statement% The line hold specifies specifies li*e li*e a stop si)n tellin) SAS6 � stop6 hold that line of raw data� % Trailin) +: By usin) + without specifyin) a column6 it is as if you are tellin) SAS6� stay tuned tuned for for more more info informat rmation% ion% Don� t touch touch that dial� % SAS SAS will will hold hold the line of data until it reaches either the end of the data step or an I!;(T statement that does not end with the trailin)% � (nder what circumstances would you code a S$#$3T construct instead of I" statements
When you have a lon) series of mutually exclusive conditions and the comparison is numeric6 usin) a S$#$3T )roup is sli)htly more efficient than usin) I"0T&$! or I"0 T&$!0$#S$ statements 'ecause 3;( time is reduced% S$#$3T 498(;: Select: 'e)ins with select )roup% When: identifies SAS statements that are executed when a particular condition is true% 8therwise =optional>: specifies a statement to 'e executed if no W&$! condition is met% $nd: ends a S$#$3T )roup% �What
statement you code to tell SAS that it is to write to an external file What statement do you code to write the record to the file ;(T and "I#$ statements% � If
readin) an external file to produce an external file6 what is the shortcut to write that record without codin) every sin)le varia'le on the record � If
you7re not wantin) any SAS output from a data step6 how would you code the data statement to prevent SAS from producin) a set Data G!ullG � What is the one statement to set the criteria of data that can 'e coded in any step
8ptions statement: This a part of SAS pro)ram and effects all steps that follow it% � &ave
you ever lin*ed SAS code If so6 descri'e the lin* and any re5uired statements used to either process the code or the step itself% � &ow would you include common or reuse code to 'e processed alon) with your statements
By usin) SAS 2acros% � When
loo*in) for data contained in a character strin) of .,F 'ytes6 which function is the 'est to locate that data: scan6 index6 or indexc S3A!%
� If
you have a data set that contains .FF varia'les6 'ut you need only five of those6 what is the code to force SAS to use only those varia'le (sin) H$$; option or statement% � 3ode
a ;983 S89T on a data set containin) State6 District and 3ounty as the primary varia'les6 alon) with several numeric varia'les% ;roc sort data? B State District 3ounty @ 9un @ � &ow
would you delete duplicate o'servations
!8!(;#I3AT$S � &ow
would you delete o'servations with duplicate *eys
!8D(;H$ � &ow would you code a mer)e that will *eep only the o'servations that have matches from 'oth sets%
3hec* the condition 'y usin) If statement in the 2er)e statement while mer)in) datasets% � &ow
would you code a mer)e that will write the matches of 'oth to one data set6 the non0matches from the left0most data% Step.: Define C datasets in DATA step Step/: Assi)n values of I! statement to different varia'les for / datasets StepC: 3hec* for the condition usin) I" statement and output the matchin) to first dataset and no matches to different datasets $x: data xxxmer)e yyy=in ? inxxx> =in ? in>@'y aaa@if inxxx ? . and inyyy ? .@run@ � What
is the ;ro)ram Data Vector =;DV> What are its functions "unction: To store the current o's@ ;DV =;ro)ram Data Vector> is a lo)ical area in memory where SAS creates a dataset one o'servation at a time% When SAS processes a data step it has two phases% 3ompilation phase and execution phase% Durin) the compilation phase the input 'uffer is created to hold a record from external file% After input 'uffer is created the ;DV is created% The ;DV is the area of memory where SAS 'uilds dataset6 one o'servation at a time% The ;DV contains two automatic varia'les G!G and G$9989G% � Does
SAS 7Translate7 =compile> or does it 7Interpret7 $xplain% SAS compiles the code � At compile time when a SAS data set is read6 what items are created Automatic varia'les are created% Input Buffer6 ;DV and Descriptor Information � !ame
statements that are reco)nied at compile time only
;(T � !ame
statements that are execution only%
I!"I#$6 I!;(T � Identify
statements whose placement in the DATA step is critical% DATA6 I!;(T6 9(!%
� !ame
statements that function at 'oth compile and execution time%
I!;(T � In
the flow of DATA step processin)6 what is the first action in a typical DATA
Step The DATA step 'e)ins with a DATA statement% $ach time the DATA statement executes6 a new iteration of the DATA step 'e)ins6 and the G!G automatic varia'le is incremented 'y .% � What
is GnG It is a Data counter varia'le in SAS% !ote: Both 0!0 and G$9989G varia'les are always availa'le to you in the data step% �!0 indicates the num'er of times SAS has looped throu)h the data step% This is not necessarily e5ual to the o'servation num'er6 since a simple su' settin) I" statement can chan)e the relationship 'etween 8'servation num'er and the num'er of iterations of the data step% The �$99890 varia'le ha a value of . if there is a error in the data for that o'servation and F if it is not% $x: This is nothin) 'ut a implicit varia'le created 'y SAS durin) data processin)% It )ives the total num'er of records SAS has iterated in a dataset% It is Availa'le only for data step and not for ;983S% $)% If we want to find every third record in a Dataset thenwe can use the GnG as follows Data new0sas0data0set@Set old@if mod=GnG6C>? . then@run@!ote: If we use a where clause to su'set the GnG will not yield the re5uired result%
(nder what circumstances would you code a S$#$3T construct instead of I" statements A: I thin* Select statement are used when you are usin) one condition to compare with several conditions li*e select pass when ;hysics JF when math J .FF when $n)lish ? ,F@ otherwise fail@ What is the one statement to set the criteria of data that can 'e coded in any step A> 8ptions statement% What is the effect of the 8;TI8!S statement $9989S?. A> The �$99890 varia'le ha a value of . if there is a error in the data for that o'servation and F if it is not%
What7s the difference 'etween VA9 A. 0 A and VA9 A. 00 A A: There is no diff 'etween VA9 A.0A an VA9 A.� A% Where as If u su'mit VA9 A.000 A instead of VA9 A.0A or VA9 A.� AC6 u will see error messa)e in the lo)% What do the SAS lo) messa)es Knumeric values have 'een converted to characterK mean What are the implications It implies that automatic conversion too* place to ma*e character functions possi'le Why is a ST8; statement needed for the ;8I!T? option on a S$T statement Because ;8I!T? reads only the specified o'servations6 SAS cannot detect an end0of0 file condition as it would if the file were 'ein) read se5uentially% &ow do you control the num'er of o'servations and-or varia'les read or written "I9ST8BS and 8BS option Approximately what date is represented 'y the SAS date value of 1CF C.st Decem'er .. Identify statements whose placement in the DATA step is critical% A: I!;(T6 DATA and 9(!� Does SAS 7Translate7 =compile> or does it 7Interpret7 $xplain% A> 3ompile What does the 9(! statement do a> When SAS editor loo*s at 9un it starts compilin) the data or proc step6 if you have more than one data step or proc step or if you have a proc step "ollowin) the data step then you can avoid the usa)e of the run statement% Why is SAS considered self0documentin) A> SAS is considered self documentin) 'ecause durin) the compilation time it creates and stores all the information a'out the data set li*e the time and date of the data set creation later !o% of the varia'les later la'els all that *ind of info inside the dataset and you can loo* at that info usin) proc contents procedure% What are some )ood SAS pro)rammin) practices for processin) very lar)e data sets A> Sort them once6 can use firsto's ? and o's ? 6
What is the different 'etween functions and ;983s that calculate the same simple descriptive statistics A>"unctions can used inside the data step and on the same data set 'ut with proc7s you can create a new data sets to output the results% 2ay 'e more %%%%%%%%%%% If you were told to create many records from one record6 show how you would do this usin) arrays and with ;983 T9A!S;8S$ A> I would use T9A!S;8S$ if the varia'les are less use arrays if the var are more %%%%%%%%%%%%%%%%% depends What is a method for assi)nin) first%VA9 and last%VA9 to the B )roup varia'le on unsorted data A> In (nsorted data you can7t use "irst% or #ast% &ow do you de'u) and test your SAS pro)rams A> "irst thin) is loo* into #o) for errors or warnin) or !8T$ in some cases or use the de'u))er in SAS data step%
What other SAS features do you use for error trappin) and data validation A> 3hec* the #o) and for data validation thin)s li*e ;roc "re56 ;roc means or some times proc print to loo* how the data loo*s li*e %%%%%%%% &ow would you com'ine C or more ta'les with different structures A> I thin* sort them with common varia'les and use mer)e statement% I am not sure what you mean different structures% other 5uestions: What areas of SAS are you most interested in BAS$6 STAT6 49A;&6 $TS Briefly descri'e , ways to do a Kta'le loo*upK in SAS% 2atch 2er)in)6 Direct Access6 "ormat Ta'les6 Arrays6 ;983 SQ# What versions of SAS have you used =on which platforms> SAS <%/ in Windows and (!IE6 SAS 1 and %./ What are some )ood SAS pro)rammin) practices for processin) very lar)e data sets Samplin) method usin) 8BS option or su'settin)6 commentin) the #ines6 (se Data !ull What are some pro'lems you mi)ht encounter in processin) missin) values In Data steps Arithmetic 3omparisons "unctions 3lassifyin) data The result of any operation with missin) value will result in missin) value% 2ost SAS statistical procedures exclude o'servations with any missin) varia'le values from an analysis% &ow would you create a data set with . o'servation and CF varia'les from a data set with CF o'servations and . varia'le (sin) ;983 T9A!S;8S$ What is the different 'etween functions and ;983s that calculate the same simple descriptive statistics ;roc can 'e used with wider scope and the results can 'e sent to a different dataset% "unctions usually affect the existin) datasets% If you were told to create many records from one record6 show how you would do this usin) array and with ;983 T9A!S;8S$ Declare array for num'er of varia'les in the record and then used Do loop ;roc Transpose with VA9 statement What are GnumericG and GcharacterG and what do they do Will either read or writes all numeric and character varia'les in dataset% &ow would you create multiple o'servations from a sin)le o'servation (sin) dou'le Trailin) ++ "or what purpose would you use the 9$TAI! statement The retain statement is used to hold the values of varia'les across iterations of the data step% !ormally6 all varia'les in the data step are set to missin) at the start of each iteration of the data step% What is the order of evaluation of the comparison operators: L 0 M - MM => =>6 MM6 M6 -6 L6 0 &ow could you )enerate test data with no input data
(sin) Data !ull and put statement &ow do you de'u) and test your SAS pro)rams (sin) 8's?F and systems options to trace the pro)ram execution in lo)% What can you learn from the SAS lo) when de'u))in) It will display the execution of whole pro)ram and the lo)ic% It will also display the error with line num'er so that you can and edit the pro)ram% What is the purpose of GerrorG It has only to values6 which are . for error and F for no error &ow can you put a KtraceK in your pro)ram By usin) 8DS T9A3$ 8! &ow does SAS handle missin) values in: assi)nment statements6 functions6 a mer)e6 an update6 sort order6 formats6 ;983s 2issin) values will 'e assi)ned as missin) in Assi)nment statement% Sort order treats missin) as second smallest followed 'y underscore% &ow do you test for missin) values (sin) Su'set functions li*e I" then $lse6 Where and Select &ow are numeric and character missin) values represented internally 3haracter as Blan* or � and !umeric as% Which date functions advances a date time or date-time value 'y a )iven interval I!T!E% In the flow of DATA step processin)6 what is the first action in a typical DATA Step When you su'mit a DATA step6 SAS processes the DATA step and then creates a new SAS data set%= creation of input 'uffer and ;DV> 3ompilation ;hase $xecution ;hase What are SAS-A33$SS and SAS-38!!$3T SAS-Access only process throu)h the data'ases li*e 8racle6 SQ#0server6 2s0Access etc% SAS-3onnect only use Server connection% What is the one statement to set the criteria of data that can 'e coded in any step 8;TI8!S Statement6 #a'el statement6 Heep - Drop statements% What is the purpose of usin) the !?;S option The !?;S option creates a 'uffer in memory which is lar)e enou)h to store ;A4$SIN$ =;S> lines and ena'les a pa)e to 'e formatted randomly prior to it 'ein) printed% What are the scru''in) procedures in SAS ;roc Sort with nodup*ey option6 'ecause it will eliminate the duplicate values% What are the new features included in the new version of SAS i%e%6 SAS%.%C The main advanta)e of version is faster execution of applications and centralied access of data and support% There are lots of chan)es has 'een made in the version when we compared with the version <% The followin) are the few: SAS version supports "ormats lon)er than < 'ytes O is not possi'le with version <% #en)th for !umeric format allowed in version is C/ where as < in version <% #en)th for 3haracter names in version is C. where as in version < is C/%
#en)th for numeric informat in version is C.6 < in version <% #en)th for character names is CF6 C/ in version <% C new informats are availa'le in version to convert various date6 time and datetime forms of data into a SAS date or SAS time% � A!DTDT$W% 0 3onverts to a SAS date value � A!DTT2$W% 0 3onverts to a SAS time value% � A!DTDT2W% 03onverts to a SAS datetime value% 3A## S2;(TE 2acro statement is added in the version which creates a macro varia'le at execution time in the data step 'y � Trimmin) trailin) 'lan*s � Automatically convertin) numeric value to character% !ew 8DS option =38#(2! 8;TI8!> is included to create a multiple columns in the output% W&AT DI""$99$!3$ DID 8( "I!D A28!4 V$9SI8! < A!D 8" SAS% The SAS Architecture is fundamentally different from any prior version of SAS% In the SAS architecture6 SAS relies on a new component6 the 2etadata Server6 to provide an information layer 'etween the pro)rams and the data they access% 2etadata6 such as security permissions for SAS li'raries and where the various SAS servers are runnin)6 are maintained in a common repository% What has 'een your most common pro)rammin) mista*e 2issin) semicolon and not chec*in) lo) after su'mittin) pro)ram6 !ot usin) de'u))in) techni5ues and not usin) "sview option vi)orously% !ame several ways to achieve efficiency in your pro)ram% $xplain trade0offs% $fficiency and performance strate)ies can 'e classified into , different areas% 3;( time �Data Stora)e � $lapsed time � Input-8utput � 2emory
�
3;( Time and $lapsed Time0 Base line measurements "ew $xamples for efficiency violations: 9etainin) unwanted datasets !ot su' settin) early to eliminate unwanted records% $fficiency improvin) techni5ues: (sin) H$$; and D98; statements to retain necessary varia'les% (se macros for reducin) the code% (sin) I"0T&$!-$#S$ statements to process data pro)rammin)% (se SQ# procedure to reduce num'er of pro)rammin) steps% (sin) of len)th statements to reduce the varia'le sie for reducin) the Data stora)e% (se of Data G!(##G steps for processin) null data sets for Data stora)e% What other SAS products have you used and consider yourself proficient in usin) Data G!(##G statement6 ;roc 2eans6 ;roc 9eport6 ;roc ta'ulate6 ;roc fre5 and ;roc print6 ;roc (nivariate etc% What is the si)nificance of the 78"7 in E?S(2 =8" a.0a6 a6 a>@ If don� t use the 8" function it mi)ht not 'e interpreted as we expect% "or example the function a'ove calculates the sum of a. minus a plus a and a and not the whole sum of a. to a O a and a% It is true for mean option also% What do the ;(T and I!;(T functions do I!;(T function converts character data values to numeric values% ;(T function converts numeric values to character values% $E: for I!;(T: I!;(T =source6 informat> "or ;(T: ;(T =source6 format>
!ote that I!;(T function re5uires I!"892AT and ;(T function re5uires "892AT% If we omit the I!;(T or the ;(T function durin) the data conversion6 SAS will detect the mismatched varia'les and will try an automatic character0to0numeric or numeric0to0 character conversion% But sometimes this doesn� t wor* 'ecause P si)n prevents such conversion% Therefore it is always advisa'le to include I!;(T and ;(T functions in your pro)rams when conversions occur% Which date function advances a date6 time or datetime value 'y a )iven interval I!T!E: I!T!E function advances a date6 time6 or datetime value 'y a )iven interval6 and returns a date6 time6 or datetime value% $x: I!T!E=interval6start0from6num'er0 of0increments6ali)nment> I!T3H: I!T3H=interval6start0of0period6end0of0period> is an interval functioncounts the num'er of intervals 'etween two )ive SAS dates6 Time and-or datetime% DAT$TI2$ => returns the current date and time of day% DATDI" =sdate6edate6'asis>: returns the num'er of days 'etween two dates% What do the 28D and I!T function do What do the ;AD and DI2 functions do 28D: 2odulo is a constant or numeric varia'le6 the function returns the reminder after numeric value divided 'y modulo% I!T: It returns the inte)er portion of a numeric value truncatin) the decimal portion% ;AD: it pads each record with 'lan*s so that all data lines have the same len)th% It is used in the I!"I#$ statement% It is useful only when missin) data occurs at the end of the record% 3ATE: concatenate character strin)s6 removes leadin) and trailin) 'lan*s and inserts separators% S3A!: it returns a specified word from a character value% Scan function assi)ns a len)th of /FF to each tar)et varia'le% S(BST9: extracts a su' strin) and replaces character values% $xtraction of a su'strin): 2iddleinitial?su'str=middlename6.6.>@ 9eplacin) character values: su'str =phone6.6C>?� CC� @ If S(BST9 function is on the left side of a statement6 the function replaces the contents of the character varia'le% T9I2: trims the trailin) 'lan*s from the character values% S3A! vs% S(BST9: S3A! extracts words within a value that is mar*ed 'y delimiters% S(BST9 extracts a portion of the value 'y statin) the specific location% It is 'est used when we *now the exact position of the su' strin) to extract from a character value% &ow mi)ht you use 28D and I!T on numeric to mimic S(BST9 on character Strin)s The first ar)ument to the 28D function is a numeric6 the second is a non0ero numeric@ the result is the remainder when the inte)er 5uotient of ar)ument0. is divided 'y ar)ument0/% The I!T function ta*es only one ar)ument and returns the inte)er portion of an ar)ument6 truncatin) the decimal portion% !ote that the ar)ument can 'e an expression% DATA !$W @ A ? ./C, @ E ? I!T= A-.FFF > @ ? 28D= A6 .FFF > @ N ? 28D= I!T= A-.FF >6 .FF > @ ;(T A? E? ? N? @ 9(! @ A?./C, E?./C ?, N?C
In A99A processin)6 what DI2: It is used to return function we would have to if u chan)e the dimension
does the DI2 function do the num'er of elements in the array% When we use Dim re � specify the stop value of an iterative D8 statement of the array%
&ow would you determine the num'er of missin) or nonmissin) values in computations To determine the num'er of missin) values that are excluded in a computation6 use the !2ISS function% data GnullG@ m ? % @ y ? @ ? F @ ! ? !=m 6 y6 >@ !2ISS ? !2ISS =m 6 y6 >@ run@ The a'ove pro)ram results in ! ? / =!um'er of non missin) values> and !2ISS ? . =num'er of missin) values>% Do you need to *now if there are any missin) values ust use: missin)Gvalues?2ISSI!4=field.6field/6fieldC>@ This function simply returns F if there aren7t any or . if there are missin) values% If you need to *now how many missin) values you have then use numGmissin)?!2ISS=field.6field/6fieldC>@ ou can also find the num'er of non0 missin) values with nonGmissin)?! =field.6field/6fieldC>@ What is the difference 'etween: x?aL'LcLd@ and x?S(2 =of a6 '6 c 6d>@ Is anyone wonderin) why you wouldn� t Rust use total?field.Lfield/LfieldC@ "irst6 how do you want missin) values handled The S(2 function returns the sum of non0 missin) values% If you choose addition6 you will )et a missin) value for the result if any of the fields are missin)% Which one is appropriate depends upon your needs% &owever6 there is an advanta)e to use the S(2 function even if you want the results to 'e missin)% If you have more than a couple fields6 you can often use shortcuts in writin) the field names If your fields are not num'ered se5uentially 'ut are stored in the pro)ram data vector to)ether then you can use: total?S(2=of fielda00 field>@ ust ma*e sure you remem'er the � of� and the dou'le dashes or your code will run 'ut you won� t )et your intended results% 2ean is another function where the function will calculate differently than the writin) out the formula if you have missin) values% There is a field containin) a date% It needs to 'e displayed in the format KddmonyyK if it7s 'efore .1,6 Kdd mon ccyyK if it7s after .<,6 and as 7Disco ears7 if it7s 'etween .1, and .<,% &ow would you accomplish this in data step code (sin) only ;983 "892AT% data new @ input date ddmmyy.F% @ cards@ F.-F,-.,, F.-F-.1F F.-./-.1, .-.F-.1 /,-.F-. .F-.F-.<< /1-./-.. @ run@ proc format @ value dat low07F.Ran.1,7d?ddmmyy.F% 7F.Ran.1,7d07F.A!.<,7d?KDisco earsK 7F.A!.<,7d0hi)h?date%@
run@ proc print@ format date dat% @ run@ In the followin) DATA step6 what is needed for 7fraction7 to print to the lo) data GnullG@ x?.-C@ if x?%CCCC then put 7fraction7@ run@ What is the difference 'etween calculatin) the 7mean7 usin) the mean function and ;983 2$A!S By default ;roc 2eans calculate the summary statistics li*e !6 2ean6 Std deviation6 2inimum and maximum6 Where as 2ean function compute only the mean values% What are some differences 'etween ;983 S(22A9 and ;983 2$A!S ;roc means 'y default )ive you the output in the output window and you can stop this 'y the option !8;9I!T and can ta*e the output in the separate file 'y the statement 8(T;(T8(T? 6 But6 proc summary doesn7t )ive the default output6 we have to explicitly )ive the output statement and then print the data 'y )ivin) ;9I!T option to see the result% What is a pro'lem with mer)in) two data sets that have varia'les with the same name 'ut different data (nderstandin) the 'asic al)orithm of 2$94$ will help you understand how the step ;rocesses% There are still a few common scenarios whose results sometimes catch users off )uard% &ere are a few of the most fre5uent 7)otchas7: .0 B varia'les has different len)ths It is possi'le to perform a 2$94$ when the len)ths of the B varia'les are different6 But if the data set with the shorter version is listed first on the 2$94$ statement6 the Shorter len)th will 'e used for the len)th of the B varia'le durin) the mer)e% Due to this shorter len)th6 truncation occurs and unintended com'inations could result% In Version <6 a warnin) is issued to point out this data inte)rity ris*% The warnin) will 'e issued re)ardless of which data set is listed first: WA9!I!4: 2ultiple len)ths were specified for the B varia'le name 'y input data sets% This may cause unexpected results% Truncation can 'e avoided 'y namin) the data set with the lon)est len)th for the B varia'le first on the 2$94$ statement6 'ut the warnin) messa)e is still issued% To prevent the warnin)6 ensure the B varia'les have the same len)th prior to com'inin) them in the 2$94$ step with ;983 38!T$!TS% ou can chan)e the varia'le len)th with either a #$!4T& statement in the mer)e DATA step prior to the 2$94$ statement6 or 'y recreatin) the data sets to have identical len)ths for the B varia'les% !ote: When doin) 2$94$ we should not have 2$94$ and I"0T&$! statement in one data step if the I"0T&$! statement involves two varia'les that come from two different mer)in) data sets% If it is not completely clear when 2$94$ and I"0T&$! can 'e used in one data step and when it should not 'e6 then it is 'est to simply always separate them in different data step% By followin) the a'ove recommendation6 it will ensure an error0free mer)e result% Which data set is the controllin) data set in the 2$94$ statement Dataset havin) the less num'er of o'servations control the data set in the mer)e statement% &ow do the I!? varia'les improve the capa'ility of a 2$94$
The I!?varia'les What if you want to *eep in the output data set of a mer)e only the matches =only those o'servations to which 'oth input data sets contri'ute> SAS will set up for you special temporary varia'les6 called the KI!?K varia'les6 so that you can do this and more% &ere7s what you have to do: si)nal to SAS on the 2$94$ statement that you need the I!? varia'les for the input data set=s> use the I!? varia'les in the data step appropriately6 So to *eep only the matches in the match0mer)e a'ove6 as* for the I!? varia'les and use them: data three@ mer)e one=in?x> two=in?y>@ -M x O y are your choices of names M'y id@ -M for the I!? varia'les for data Mif x?. and y?.@ -M sets one and two respectively Mrun@
What techni5ues and-or ;983s do you use for ta'les ;roc "re56 ;roc univariate6 ;roc Ta'ulate O ;roc 9eport% Do you prefer ;983 9$;89T or ;983 TAB(#AT$ Why I prefer to use ;roc report until I have to create cross ta'ulation ta'les6 'ecause6 It )ives me so many options to modify the loo* up of my ta'le6 =ex: Width option6 'y this we can chan)e the width of each column in the ta'le> Where as ;roc ta'ulate una'le to produce some of the thin)s in my ta'le% $x: ta'ulate doesn� t produce n => in the desira'le format% &ow experienced are you with customied reportin) and use of DATA G!(##G features I have very )ood experience in creatin) customied reports as well as with Data G!(##G step% It� s a Data step that )enerates a report without creatin) the dataset there 'y development time can 'e saved% The other advanta)es of Data !(## is when we su'mit6 if there is any compilation error is there in the statement which can 'e detected and written to the lo) there 'y error can 'e detected 'y chec*in) the lo) after su'mittin) it% It is also used to create the macro varia'les in the data set% What is the difference 'etween nodup and nodup*ey options !8D(; compares all the varia'les in our dataset while !8D(;H$ compares Rust the B varia'les% What is the difference 'etween compiler and interpreter 4ive any one example =software product> that act as an interpreter Both are similar as they achieve similar purposes6 'ut inherently different as to how they achieve that purpose% The interpreter translates instructions one at a time6 and then executes those instructions immediately% 3ompiled code ta*es pro)rams =source> written in SAS pro)rammin) lan)ua)e6 and then ultimately translates it into o'Rect code or machine lan)ua)e% 3ompiled code does the wor* much more efficiently6 'ecause it produces a complete machine lan)ua)e pro)ram6 which can then 'e executed% 3ode the ta'le� s statement for a sin)le level fre5uency ;roc fre5 data?li'%dataset@ ta'le var@ Mhere you can mention sin)le varia'le of multiple varia'les seperated 'y space to )et sin)le fre5uency@ run@ What is the main difference 'etween rename and la'el .% #a'el is )lo'al and rename is local i%e%6 la'el statement can 'e used either in proc or data step where as rename should 'e used only in data step% /%If we rename a varia'le6 old name will 'e lost 'ut if we la'el a varia'le its short name =old name> exists alon) with its descriptive name%
What is $nterprise 4uide What is the use of it It is an approach to import text files with SAS =It comes free with Base SAS version %F> What other SAS features do you use for error trappin) and data validation What are the validation tools in SAS "or dataset: Data set name-de'u) Data set: name-stmtch* "or macros: 8ptions:mprint mlo)ic sym'ol)en% &ow can you put a KtraceK in your pro)ram 8DS Trace 8!6 8DS Trace 8"" the trace records% &ow would you code a mer)e that will *eep only the o'servations that have matches from 'oth data sets (sin) KI!K varia'le option% #oo* at the followin) example% data three@ mer)e one=in?x> two=in?y>@ 'y id@ if x?. and y?.@ run@ or data three@ mer)e one=in?x> two=in?y>@ 'y id@ if x and y@ run@ What are input dataset and output dataset options Input data set options are o's6 firsto's6 where6 in output data set options compress6 reuse%Both input and output dataset options include *eep6 drop6 rename6 o's6 first o's% &ow can u create ero o'servation dataset 3reatin) a data set 'y usin) the li*e clause% ex: proc s5l@ create ta'le latha%emp li*e oracle%emp@ 5uit@ In this the li*e clause tri))ers the existin) ta'le structure to 'e copied to the new ta'le% usin) this method result in the creation of an empty ta'le% &ave you ever0lin*ed SAS code6 If so6 descri'e the lin* and any re5uired statements used to either process the code or the step itself In the editor window we write include 7path of the sas file7@ run@ if it is with non0windowin) environment no need to )ive run statement% &ow can u import %3SV file in to SAS tell Syntax To create 3SV file6 we have to open notepad6 then6 declare the varia'les% proc import datafile?7$:a)e%csv7out?sarath d'ms?csv replace@ )etnames?yes@ proc print data?sarath@ run@
What is the use of ;roc SQl ;983 SQ# is a powerful tool in SAS6 which com'ines the functionality of data and proc steps% ;983 SQ# can sort6 summarie6 su'set6 Roin =mer)e>6 and concatenate datasets6 create new varia'les6 and print the results or create a new dataset all in one stepU ;983 SQ# uses fewer resources when compard to that of data and proc steps% To Roin files in ;983 SQ# it does not re5uire to sort the data prior to mer)in)6 which is must6 is data mer)e% What is SAS 49A;& SAS-49A;& software creates and delivers accurate6 hi)h0impact visuals that ena'le decision ma*ers to )ain a 5uic* understandin) of critical 'usiness issues% Why is a ST8; statement needed for the point?option on a S$T statement When you use the ;8I!T? option6 you must include a ST8; statement to stop DATA step processin)6 pro)rammin) lo)ic that chec*s for an invalid value of the ;8I!T? varia'le6 or Both% Because ;8I!T? reads only those o'servations that are specified in the D8 statement6 SAScannot read an end0of0file indicator as it would if the file were 'ein) read se5uentially% Because readin) an end0of0file indicator ends a DATA step automatically6 failure to su'stitute another means of endin) the DATA step when you use ;8I!T? can cause the DATA step to )o into a continuous loop% What is the difference 'etween nodup and nodup*ey options The !8D(; option chec*s for and eliminates duplicate o'servations% The !8D(;H$ option chec*s for and eliminates duplicate o'servations 'y varia'le values%
.% &ave you used macros "or what purpose you have used es I have6 I used macros in creatin) analysis datasets and ta'les where it is necessary to ma*e a small chan)e throu)h out the pro)ram and where it is necessary to use the code a)ain and a)ain% /% &ow would you invo*e a macro After I have defined a macro I can invo*e it 'y addin) the percent si)n prefix to its name li*e this: macro name a semicolon is not re5uired when invo*in) a macro6 thou)h addin) one )enerally does no harm% C% &ow we can call macros with in data step We can call the macro with 3A##S2;(T % &ow do u identify a macro varia'le Ampersand =O> ,% &ow do you define the end of a macro The end of the macro is defined 'y 2end Statement % "or what purposes have you used SAS macros If we want use a pro)ram step for executin) to execute the same ;roc step on multiple data sets% We can accomplish repetitive tas*s 5uic*ly and efficiently% A macro pro)ram can 'e reused many times% ;arameters passed to the macro pro)ram customie the results without havin) to chan)e the code within the macro pro)ram% 2acros in SAS ma*e a small chan)e in the pro)ram and have SAS echo that chan)e thou)ht that pro)ram%
1% What is the difference 'etween #83A# and 4#8BA# #ocal is a macro varia'le defined inside a macro%4lo'al is a macro varia'le defined in open code =outside the macro or can use anywhere>% <% &ow lon) can a macro varia'le 'e A to*en A component of SAS *nown as the word scanner 'rea*s the pro)ram text into fundamental units called to*ens%� To*ens are passed on demand to the compiler%� compiler then re5uests to*en until it receives a semicolon%� Then the compiler performs the syntax chec* on the statement%
The
% If you use a S2;(T in a DATA step6 when and where can you use the macro varia'le 2acro varia'le is used inside the 3all Symput statement and is enclosed in 5uotes% .F% What do you code to create a macro $nd one 2A398 and 2$!D ..% What is the difference 'etween ;(T and S2B8#4$! ;(T is used to display user defined messa)es on lo) window after execution of a pro)ram where as S2B8#4$! is used to print the value of a macro varia'le resolved6 on lo) window% ./% &ow do you add a num'er to a macro varia'le (sin) eval function .C% 3an you execute a macro within a macro Descri'e% es6 Such macros are called nested macros% They can 'e o'tained 'y usin) sym)et and call symput macros% .% If you need the value of a varia'le rather than the varia'le itself what would you use to load the value to a macro varia'le If we need a value of a macro varia'le then we must define it in such terms so that we can call them everywhere in the pro)ram% Define it as 4lo'al% There are different ways of assi)nin) a )lo'al varia'le% Simplest method is #$T% $x:A6 is macro varia'le% (se followin) statement to assi)n the value of a rather than the varia'le itselfe%)%#et A?xyx?KOAK@This will assi)n KxyK to x6 not the varia'le xy to x% .,% 3an you execute macro within another macro If so6 how would SAS *now where the current macro ended and the new one 'e)an es6 I can execute macro within a macro6 what we call it as nestin) of macros6 which is allowed% $very macro7s 'e)innin) is identified the *eyword macro and end with mend% .% &ow are parameters passed to a macro A macro varia'le defined in parentheses in a 2A398 statement is a macro parameter% 2acro parameters allow you to pass information into a macro% &ere is a simple example: macro plot=yvar? 6xvar? >@ proc plot@ plot OyvarMOxvar@ run@mend plot@ .1% &ow would you code a macro statement to produce information on the SAS lo) This statement can 'e coded anywhere8;TI8!S6 2;9I!T 2#84I3 2$9989 S2B8#4$!@ .<% &ow we can call macros with in data step We can call the macro with 3A##S2;(T6 ;roc SQ# and #$T statement% .% Tell me a'out 3A## S2;(T ta*es can then use this macro varia'le6 I
call symput a value from a data step and assi)ns it to a macro varia'le% I macro varia'le in later steps% To assi)n a value to a sin)le use 3A## S2;(T with this )eneral form:
3A## S2;(T =� macro0varia'le0name� 6 value>@ Where macro0varia'le0name6 enclosed in 5uotation mar*s6 is the name of a macro varia'le6 either new or old6 and value is the value I want to assi)n to that macro varia'le% Value can 'e the name of a varia'le whose value SAS will use6 or it can 'e a constant value enclosed 5uotation mar*s% 3A## S2;(T is often used in if0then statements such as this: If a)eJ?.< then call symput =� status� 6� adult� >@ $lse call symput =� status� 6� minor� >@ These statements create a macro varia'le named Ostatus and assi)n to it a value of either adult or minor dependin) on the varia'le a)e% 3aution: We cannot create a macro varia'le with 3A## S2;(T and use it in the same data step 'ecause SAS does not assi)n a value to the macro varia'le until the data step executes% Data steps executes when SAS encounters a step 'oundary such as a su'se5uent data6 proc6 or run statement% /F% Tell me a'out include and eval The include statement6 despite its percent si)n6 is not a macro statement and is always executed in SAS6 thou)h it can 'e conditionally executed in a macro% It can 'e used to settin) up a macro li'rary% But this is a least approach% The use of include does not actually set up a li'rary% The include statement points to a file and when it executed the indicated file ='e it a full pro)ram6 macro definition6 or a statement fra)ment> is inserted into the callin) pro)ram at the location of the call% When usin) the include 'uildin) a macro li'rary6 the included file will usually contain one or more macro definitions% $VA# is a widely used yet fre5uently misunderstood SAS=r> macro lan)ua)e function due to its seemin)ly simple form% &owever6 when its actual ar)ument is a complex macro expression interlaced with special characters6 mixed arithmetic and lo)ical operators6 or macro 5uotation functions6 its usa)e and result 'ecome elusive and pro'lematic% I" condition in macro is evaluated 'y eval6 to reduce it to true or false% /.% Descri'e the ways in which you can create macro varia'les There are the , ways to create macro varia'les: #et 4lo'al 3all Symput ;roc SQl ;arameters% //% Tell me more a'out the parameters in macro ;arameters are macro varia'les whose value you set when you invo*e a macro% To add the parameters to a macro6 you simply name the macro vars names in parenthesis in the macro statement% Syntax: 2A398 macro0name =parameter0.? 6 parameter0/? 6 �� parameter0n ? >@ macro0text 2$!D macro0name@ /C% What is the maximum len)th of the macro varia'le C/ characters lon)% /% Automatic varia'les for macro $very time we invo*e SAS6 the macro processor automatically creates certain macro var% e): Osysdate Osysday%
/,% What system options would you use to help de'u) a macro De'u))in) a 2acro with SAS System 8ptions% The SAS System offers users a num'er of useful system options to help de'u) macro issues and pro'lems% The results associated with usin) macro options are automatically displayed on the SAS #o)% Specific options related to macro de'u))in) appear in alpha'etical order in the ta'le 'elow%SAS 8ption Description: 2$29;T Specifies that memory usa)e statistics 'e displayed on the SAS #o)% 2$9989: SAS will issue warnin) if we invo*e a macro that SAS didn� t find% ;resents Warnin) 2essa)es when there are misspellin)s or when an undefined macro is called% S$9989: SAS will issue warnin) if we use a macro varia'le that SAS can� t find% 2#84I3: SAS prints details a'out the execution of the macros in the lo)% 2;9I!T: Displays SAS statements )enerated 'y macro execution are traced on the SAS #o) for de'u))in) purposes% S2B8#4$!: SAS prints the value of macro varia'les in lo) and also displays text from expandin) macro varia'les to the SAS #o)% /% If you need the value of a varia'le rather than the varia'le itself what would you use to load the value to a macro varia'le If we need a value of a macro varia'le then we must define it in such terms so that we can call them everywhere in the pro)ram% Define it as 4lo'al% There are different ways of assi)nin) a )lo'al varia'le% Simplest method is #$T% $x:A6 is macro varia'le% (se followin) statement to assi)n the value of a rather than the varia'le itselfe%)%#et A?xyx?KOAK@This will assi)n KxyK to x6 not the varia'le xy to x% /1% 3an you execute macro within another macro If so6 how would SAS *now where the current macro ended and the new one 'e)an es6 I can execute macro within a macro6 what we call it as nestin) of macros6 which is allowed% $very macro7s 'e)innin) is identified the *eyword macro and end with mend% /<% &ow are parameters passed to a macro A macro varia'le defined in parentheses in a 2A398 statement is a macro parameter% 2acro parameters allow you to pass information into a macro% &ere is a simple example: macro plot=yvar? 6xvar? >@ proc plot@ plot OyvarMOxvar@ run@mend plot@ /% &ow would you code a macro statement to produce information on the SAS lo) This statement can 'e coded anywhere8;TI8!S6 2;9I!T 2#84I3 2$9989 S2B8#4$!@ CF% &ow we can call macros with in data step We can call the macro with 3A##S2;(T6 ;roc SQ# and #$T statement% C.% What are S24$T and S2;(T S2;(T puts the value from a dataset into a macro varia'le where as S24$T )ets the value from the macro varia'le to the dataset% C/% What are the macros you have used in your pro)rams (sed macros for various puposes6 few of them are%% .> 2acros written to determine the list of varia'les in a dataset: macro varlist =dsn>@ proc contents data ? Odsn out ? cont noprit@ run@ proc s5l noprint@ select distinct name into: varname.0:varname// from cont@
5uit@ do i ?. to Os5lo's@ put Oi OOvarnameOi@ end@ mend varlist@ varlist=adverse> /> Distri'ution or 2issin) - !on02issin) Values macro missrep=dsn6 vars?GnumericG>@ proc fre5 data?Odsn%@ ta'les Ovars% - missin)@ format GcharacterG Pmissf% GnumericG missf%@ title. �Distri'ution or 2issin) - !on02issin) Values� @ run@ mend missrep@ missrep=study%demo)6 vars?a)e )ender 'date>@ C> Written macros for sortin) common varia'les in various datasets macro sortit =datasetname6 pid6 investi)ator6 timevisit>;983 S89T DATA ? ODATAS$T!A2$@ B O;ID OI!V$STI4AT89@ mend sortit@ > 2acros written to split the num'er of o'servations in a dataset macro split =dsnori)6 dsnsplit.6 dsnsplit/6 o's.>@ data Odsnsplit.@ set Odsnori) =o's ? Oo's.>@ run@ data Odsnsplit/@ set Odsnori) =firsto's ? eval=Oo's. L .>>@ run@ mend split@ split=sasuser%admit6admit6admit,6/> CC% What is auto call macro and how to create a auto call macro What is the use of it &ow to use it in SAS with macros $na'les the user to call macros that have 'een stored as SAS pro)rams% The auto call macro facility allows users to access the same macro code from multiple SAS pro)rams% 9ather than havin) the same macro code for in each pro)ram where the code is re5uired6 with an autocall macro6 the code is in one location% This permits faster updates and 'etter consistency across all the pro)rams% 2acro set0up: The fist step is to set0up a pro)ram that contains a macro6 desired to 'e used in multiple pro)rams% Althou)h the pro)ram may contain other macros and-or open code6 it is advised to include only one macro% Set 2A(T8S8(9S$ and SASA(T8S: Before one can use the autocall macro within a SAS pro)ram6 The 2A(T8S8(9S$ option must 'e set open and the SASA(T8S option should 'e assi)ned% The 2A(T8S8(9S$ option indicates to SAS that the autocall facility is to 'e activated% The SASA(T8S option tells SAS where to loo* for the macros% "or ex: sasauto?� ):'usmeasinternalmacro� @ C% What put do It displays the macro varia'le value when we specify put =my first macro varia'le� is O�� %%>
;ut GautomaticG option displays all the SAS system macro varia'les includind OSSDAT$ A!D OSSTI2
%$.% What are the three types of Roin A% The three types of Roin are inner Roin6 left Roin and ri)ht Roin% The inner Roin option ta*es the matchin) values from 'oth the ta'les 'y the 8! option% The left Roin selects all the varia'les from the first ta'le and Roins second ta'le to it% The ri)ht Roin selects all the varia'les of ta'le ' first and Roin the ta'le a to it% /% &ave you ever used ;983 SQ# for data summariation A% es I have used it for summariation at times� "or e%) if I have to calculate the max value of B; for patients .F. .F/ and .FC then I use the max ='pd> function to )et the maximum value and use )roup 'y statement to )roup the patients accordin)ly% C% Tell me a'out your SQ# experience A% I have used the SAS-A33$SS SQ# pass thru facility for connection with external data'ases and importin) ta'les from them and also 2icrosoft access and excel files% Besides this6 lot of times I have used ;983 SQ# for Roinin) ta'les% % 8nce you have had the data read into SAS datasets are you more of a data step pro)rammer or a ;983 SQ# pro)rammer A% It depends on what types of analysis datasets are re5uired for creatin) ta'les 'ut I am more of a data step pro)rammer as it )ives me more flexi'ility% "or e%) creatin) a chan)e from 'aseline data set for 'lood pressure sometimes I have to retain certain values � use arrays � %or use the first% 0and last% varia'les% ,% What types of pro)rammin) tas*s do you use ;983 SQ# for versus the data step A% ;roc SQ# is very convenient for performin) ta'le Roins compared to a data step mer)e as it does not re5uire the *ey columns to 'e sorted prior to Roin% A data step is more suita'le for se5uential o'servation0'y0o'servation processin)% ;983 SQ# can save a )reat deal of time if u want to filter the varia'les while selectin) or u can modify them � apply format� %creatin) new varia'les 6 macrovaria'les� as well as su'settin) the data% ;983 SQ# offers )reat flexi'ility for Roinin) ta'les% % &ave u ever used ;983 SQ# to read in a raw data file A% !o% I don� t thin* it can 'e used% 1% &ow do you mer)e data in ;roc SQ# The three types of Roin are inner Roin6 left Roin and ri)ht Roin% The inner Roin option ta*es the matchin) values from 'oth the ta'les 'y the 8! option% The left Roin selects all the varia'les from the first ta'le and Roins second ta'le to it% The ri)ht Roin selects all the varia'les of ta'le ' first and Roin the ta'le a to it% ;983 SQ#@ 39$AT$ TAB#$ B8T& AS S$#$3T A%;ATI$!T6 A%DAT$ "892AT?DAT$1% AS DAT$6 A%;(#S$6 B%2$D6 B%D8S$S6 B%A2T "892AT?%. "982 VITA#S A I!!$9 8I! D8SI!4 B 8! =A%;ATI$!T ? B%;ATI$!T> A!D =A%DAT$ ? B%DAT$> 89D$9 B ;ATI$!T6 DAT$@
Q(IT@ <% What are the statements in ;roc SQl Select6 "rom6 Where6 4roup By6 &avin)6 8rder% ;983 SQ#@ 39$AT$ TAB#$ &I4&B;;/ AS S$#$3T ;ATI$!T6 38(!T =;ATI$!T> AS !6 DAT$ "892AT?DAT$1%6 2AE=B;D> AS B;D&I4& "982 VITA#S W&$9$ ;ATI$!T I! =.F. .F/ .FC> 498(; B ;ATI$!T &AVI!4 B;D ? 3A#3(#AT$D B;D&I4& 89D$9 B 3A#3(#AT$D B;D&I4&@ Quit@
% Why and when do you use ;roc SQl ;roc SQ# is very convenient for performin) ta'le Roins compared to a data step mer)e as it does not re5uire the *ey columns to 'e sorted prior to Roin% A data step is more suita'le for se5uential o'servation0'y0o'servation processin)% ;983 SQ# can save a )reat deal of time if u want to filter the varia'les while selectin) or we can modify them6 apply format and creatin) new varia'les6 macrovaria'les� as well as su'settin) the data% ;983 SQ# offers )reat flexi'ility for Roinin) ta'les%
SAS 49A;&: .% What type of )raphs have you have )enerated usin) SAS A% I have used ;roc 4;#8T where I have created chan)e from 'aseline scatter plots% I have also used ;roc #I"$T$ST to create Haplan02eier survival estimates plots for survival analysis to determine which treatment displays 'etter time0to0event distri'ution% /% &ave you ever used 49$;#A A% $S6 I have used the ;983 49$;#A point and clic* interface to inte)rate )raphs in one pa)e% Which were produced 'y the re) procedure% C% What is the sym'ol statement used for A% Sym'ol statement is used for placin) sym'ols in the )raphics output% Associated varia'les can specify the color6 font and hei)hts of the sym'ols displayed% % &ave you ever used the annotate facility What is a situation when you have had to use the A!!8TAT$ facility in the past A% es6 I have used the annotate facility for )raphs% I have used the annotate facility to position la'els in the Haplan02eier survival estimates6 where I had to specify the function as � la'el� and )ive the x and y co0ordinates and the position where this la'el is to 'e placed%
8DS =8(T;(T D$#IV$9 SST$2>: .% What are all the 8DS procedure have u encountered Tracin) and selectin) the procedure 8utput@ 8DS Trace on@ ;roc steps� @ 9un@ 8DS Trace off@
8DS Select statement6 ;roc steps� @ 8DS Select output0o'Rect0list@ 9un@ 8DS 8utput statement6 8DS output output0o'Rect? new SAS dataset@ 8DS html 'ody ? � pathmarine'ody%html� 3ontents ? � pathmarineT83%html� ;a)e ? � pathmarinepa)e%html� "rame? �pathmarineframe%html� @ �%% 8DS html close@ 8DS rtf file ? � filename%rtf� options@ 8ptions li*e columns?n6 'odytitle6 SASdate and style% 8DS rtf close@ Similarly 8DS ;df file ? � filename%pdf� options@ �� %% 8DS pdf close@ /% What is your experience with 8DS A% I have used 8DS for creatin) files output formats 9T" &T2# and ;D" as per the re5uirement of my mana)er% &T2# files could 'e posted on the we' site for viewin) or can also 'e imported into word processors% 8DS &T2# 'ody ? � path� 3ontents? � path� "rame ? � path� 8DS &T2# close@ 8DS 9T" "I#$ ? � path� 8DS 9T" close@ When we create 9T" output we can copy it into word document and edit and resie it li*e word ta'les% C% What does the trace option do A% 8DS Trace is used to find the names of the particular output o'Rects when several of them are created 'y some procedure% 8DS T9A3$ 8!@ 8DS T9A3$ 8""@
SAS (!IE: ;983 SQ#: .% What are the three types of Roin A% The three types of Roin are inner Roin6 left Roin and ri)ht Roin% The inner Roin option ta*es the matchin) values from 'oth the ta'les 'y the 8! option% The left Roin selects all the varia'les from the first ta'le and Roins second ta'le to it% The ri)ht Roin selects all the varia'les of ta'le ' first and Roin the ta'le a to it% /% &ave you ever used ;983 SQ# for data summariation A% es I have used it for summariation at times� "or e%) if I have to calculate the max value of B; for patients .F. .F/ and .FC then I use the max ='pd> function to )et the maximum value and use )roup 'y statement to )roup the patients accordin)ly% C% Tell me a'out your SQ# experience A% I have used the SAS-A33$SS SQ# pass thru facility for connection with external data'ases and importin) ta'les from them and also 2icrosoft access and excel files% Besides this6 lot of times I have used ;983 SQ# for Roinin) ta'les%
% 8nce you have had the data read into SAS datasets are you more of a data step pro)rammer or a ;983 SQ# pro)rammer A% It depends on what types of analysis datasets are re5uired for creatin) ta'les 'ut I am more of a data step pro)rammer as it )ives me more flexi'ility% "or e%) creatin) a chan)e from 'aseline data set for 'lood pressure sometimes I have to retain certain values � use arrays � %or use the first% 0and last% varia'les% ,% What types of pro)rammin) tas*s do you use ;983 SQ# for versus the data step A% ;roc SQ# is very convenient for performin) ta'le Roins compared to a data step mer)e as it does not re5uire the *ey columns to 'e sorted prior to Roin% A data step is more suita'le for se5uential o'servation0'y0o'servation processin)% ;983 SQ# can save a )reat deal of time if u want to filter the varia'les while selectin) or u can modify them � apply format� %creatin) new varia'les 6 macrovaria'les� as well as su'settin) the data% ;983 SQ# offers )reat flexi'ility for Roinin) ta'les% % &ave u ever used ;983 SQ# to read in a raw data file A% !o% I don� t thin* it can 'e used% 1% &ow do you mer)e data in ;roc SQ# The three types of Roin are inner Roin6 left Roin and ri)ht Roin% The inner Roin option ta*es the matchin) values from 'oth the ta'les 'y the 8! option% The left Roin selects all the varia'les from the first ta'le and Roins second ta'le to it% The ri)ht Roin selects all the varia'les of ta'le ' first and Roin the ta'le a to it% ;983 SQ#@ 39$AT$ TAB#$ B8T& AS S$#$3T A%;ATI$!T6 A%DAT$ "892AT?DAT$1% AS DAT$6 A%;(#S$6 B%2$D6 B%D8S$S6 B%A2T "892AT?%. "982 VITA#S A I!!$9 8I! D8SI!4 B 8! =A%;ATI$!T ? B%;ATI$!T> A!D =A%DAT$ ? B%DAT$> 89D$9 B ;ATI$!T6 DAT$@ Q(IT@ <% What are the statements in ;roc SQl Select6 "rom6 Where6 4roup By6 &avin)6 8rder% ;983 SQ#@ 39$AT$ TAB#$ &I4&B;;/ AS S$#$3T ;ATI$!T6 38(!T =;ATI$!T> AS !6 DAT$ "892AT?DAT$1%6 2AE=B;D> AS B;D&I4& "982 VITA#S W&$9$ ;ATI$!T I! =.F. .F/ .FC> 498(; B ;ATI$!T &AVI!4 B;D ? 3A#3(#AT$D B;D&I4& 89D$9 B 3A#3(#AT$D B;D&I4&@ Quit@
% Why and when do you use ;roc SQl ;roc SQ# is very convenient for performin) ta'le Roins compared to a data step mer)e as it does not re5uire the *ey columns to 'e sorted prior to Roin% A data step is more suita'le for se5uential o'servation0'y0o'servation processin)% ;983 SQ# can save a )reat deal of time if u want to filter the varia'les while selectin) or we can modify them6 apply format and creatin) new varia'les6 macrovaria'les� as well as su'settin) the data% ;983 SQ# offers )reat flexi'ility
for Roinin) ta'les%
SAS 49A;&:
.% What type of )raphs have you have )enerated usin) SAS A% I have used ;roc 4;#8T where I have created chan)e from 'aseline scatter plots% I have also used ;roc #I"$T$ST to create Haplan02eier survival estimates plots for survival analysis to determine which treatment displays 'etter time0to0event distri'ution% /% &ave you ever used 49$;#A A% $S6 I have used the ;983 49$;#A point and clic* interface to inte)rate )raphs in one pa)e% Which were produced 'y the re) procedure% C% What is the sym'ol statement used for A% Sym'ol statement is used for placin) sym'ols in the )raphics output% Associated varia'les can specify the color6 font and hei)hts of the sym'ols displayed% % &ave you ever used the annotate facility What is a situation when you have had to use the A!!8TAT$ facility in the past A% es6 I have used the annotate facility for )raphs% I have used the annotate facility to position la'els in the Haplan02eier survival estimates6 where I had to specify the function as � la'el� and )ive the x and y co0ordinates and the position where this la'el is to 'e placed%
8DS =8(T;(T D$#IV$9 SST$2>: .% What are all the 8DS procedure have u encountered Tracin) and selectin) the procedure 8utput@ 8DS Trace on@ ;roc steps� @ 9un@ 8DS Trace off@ 8DS Select statement6 ;roc steps� @ 8DS Select output0o'Rect0list@ 9un@ 8DS 8utput statement6 8DS output output0o'Rect? new SAS dataset@ 8DS html 'ody ? � pathmarine'ody%html� 3ontents ? � pathmarineT83%html� ;a)e ? � pathmarinepa)e%html� "rame? �pathmarineframe%html� @ �%% 8DS html close@ 8DS rtf file ? � filename%rtf� options@ 8ptions li*e columns?n6 'odytitle6 SASdate and style% 8DS rtf close@ Similarly 8DS ;df file ? � filename%pdf� options@ �� %% 8DS pdf close@ /% What is your experience with 8DS A% I have used 8DS for creatin) files output formats 9T" &T2# and ;D" as per the re5uirement of my mana)er% &T2# files could 'e posted on the we' site for viewin) or can also 'e imported into word processors% 8DS &T2# 'ody ? � path�
3ontents? � path� "rame ? � path� 8DS &T2# close@ 8DS 9T" "I#$ ? � path� 8DS 9T" close@ When we create 9T" output we can copy it into word document and edit and resie it li*e word ta'les%
C% What does the trace option do A% 8DS Trace is used to find the names of the particular output o'Rects when several of them are created 'y some procedure% 8DS T9A3$ 8!@ 8DS T9A3$ 8""@
SAS (!IE: .% (nix environment SAS can effectively 'e used with (nix operatin) system% We have some options that would let the pro)rammer to extract files from the terminal as well as save the 8utput to the terminal% /% When would you use (!IE instead of ;3 SAS When we need to su'mit the pro)ram in a 'atch- non0interactive mode% When we are concerned with security issues% C% What operatin) systems can you sit down at today and 'e productive I can 'e productive on (nix and Windows system% % Are you comforta'le at the command line A% es6 I am comforta'le at the command line mode% I can write commands li*e for listin) all files =0a>6 #istin) directory itself =0d> and ls6 ls0l privile)es% ,% Settin) permissions A% r 9ead permission w Write permission x $xecute permission 0 no permission 3han)e permissions on file 3hmod options file 3hmod u L w file )ives the user =owner> write permission 3hmod ) L r file )ives the )roup read permission 3hmod o � x file removes execute permission for others % 3an you write shell scripts A% es6 I can write shell scripts% I have used the VI editor =multiple commands> =n editor6 sin)le line> to write shell scripts =which is a )roup of commands to 'e executed at once>% 3ommand VI opens the editor% =$scape%%colon w5> for savin) any file and will 5uit the editor% "or executin) the shell scripts we write the filename%sh I have written a shell script to match a user id to a person� s name% 1% Do you *now how to use the VI editor
A% It uses standard alpha'etic *eys for command% We can create a newfile 'y this command% VI � filename� %In command mode6 the letters of the *ey'oard perform editin) functions =li*e movin) the cursor6 deletin) text6 etc%>% To enter command mode6 press the escape *ey SAS can effectively 'e used with (nix operatin) system% We have some options that would let the pro)rammer to extract files from the terminal as well as save the 8utput to the terminal%
.%Descri'e the phases of clinical trials Ans:0 These are the followin) four phases of the clinical trials: ;hase .: Test a new dru) or treatment to a small )roup of people =/F0 to evaluate its safety% ;hase /: The experimental dru) or treatment is )iven to a lar)e )roup of people =.FF0CFF> to see that the dru) is effective or not for that treatment% ;hase C: The experimental dru) or treatment is )iven to a lar)e )roup of people =.FFF0CFFF> to see its effectiveness6 monitor side effects and compare it to commonly used treatments% ;hase : The phase study includes the post mar*etin) studies includin) the dru)7s ris*6 'enefits etc% /% Descri'e the validation procedure &ow would you perform the validation for T#4 as well as analysis data set Ans:0 Validation procedure is used to chec* the output of the SAS pro)ram6 )enerated 'y the source pro)rammer% In this process validator write the pro)ram and )enerate the output% If this output is same as the output )enerated 'y the SAS pro)rammer7s output then the pro)ram is considered to 'e valid% We can perform this validation for T#4 'y chec*in) the output manually and for analysis data set it can 'e done usin) ;983 382;A9$% C% &ow would you perform the validation for the listin)6 which has FF pa)es Ans:0 It is not possi'le to perform the validation for the listin) havin) FF pa)es manually% To do this6 we convert the listin) in data sets 'y usin) ;983 9T" and then after that we can compare it 'y usin) ;983 382;A9$% % 3an you use ;983 382;A9$ to validate listin)s Why Ans:0 es6 we can use ;983 382;A9$ to validate the listin) 'ecause if there are many entries =pa)es> in the listin)s then it is not possi'le to chec* them manually% So in this condition we use ;983 382;A9$ to validate the listin)s% ,% &ow would you )enerate ta'les6 listin)s and )raphs Ans:0 We can )enerate the listin)s 'y usin) the ;983 9$;89T% Similarly we can create the ta'les 'y usin) ;983 "9$Q6 ;983 2$A!S6 and ;983 T9A!S;8S$ and ;983 9$;89T% We would )enerate )raph6 usin) proc 4plot etc% % &ow many ta'les can you create in a day Ans:0 Actually it depends on the complexity of the ta'les if there are same type of ta'les then6 we can create 0, ta'les in a day% 1% What are all the ;983S have you used in your experience Ans:0 I have used many procedures li*e proc report6 proc sort6 proc format etc% I have used proc report to )enerate the list report6 in this procedure I have used su'Rid as order varia'le and trtG)rp6 s'd6 d'd as display varia'les% <% Descri'e the data sets you have come across in your life
Ans:0 I have wor*ed with demo)raphic6 adverse event 6 la'oratory6 analysis and other data sets% % &ow would you su'mit the docs to "DA Who will su'mit the docs Ans:0 We can su'mit the docs to "DA 'y e0su'mission% Docs can 'e su'mitted to "DA usin) /. 39" part .. forms% In this doc we have the documentation a'out macros and pro)ram and $0records also% Statistician or proRect mana)er will su'mit this doc to "DA% .F% What are the docs do you su'mit to "DA Ans:0 We su'mit ISS and IS$ documents to "DA% ..% 3an u share your 3DIS3 experience What version of 3DIS3 have you used Ans: I didn7t )et any chance to wor* in 3DIS3 extensively% But I have helped my proRect mana)er and statistician in 3DIS3% I have used version C of the 3DIS3% ./% Tell me the importance of the SA; Ans:0 This document contains detailed information re)ardin) study o'Rectives and statistical methods to aid in the production of the 3linical Study 9eport =3S9> includin) summary ta'les6 fi)ures6 and su'Rect data listin)s for ;rotocol% This document also contains documentation of the pro)ram varia'les and al)orithms that will 'e used to )enerate summary statistics and statistical analysis% .C% Tell me a'out your proRect )roup To whom you would report-contact 2y proRect )roup consistin) of six mem'ers6 a proRect mana)er6 two statisticians6 lead pro)rammer and two pro)rammers% I would report to the lead pro)rammer% If I have any pro'lem re)ardin) the pro)rammin) I would contact the lead pro)rammer% If I have any dou't in values of varia'les in raw dataset I would contact the statistician% "or example the dataset related to the menopause symptoms in women6 if the varia'le sex havin) the values li*e "6 2% I would consider it as wron)@ in that type of situations I would contact the statistician% .% $xplain SAS documentation% SAS documentation includes pro)rammer header6 comments6 titles6 footnotes etc% Whatever we type in the pro)ram for ma*in) the pro)ram easily reada'le6 easily understanda'le are in called as SAS documentation% .,% &ow would you *now whether the pro)ram has 'een modified or not I would *now the pro)ram has 'een modified or not 'y seein) the modification history in the pro)ram header% .% ;roRect status meetin) It is a planetary meetin) of all the proRect mana)ers to discuss a'out the present Status of the proRect in hand and discuss new ideas and options in improvin) the Way it is presently 'ein) performed% .1% Descri'e clin0trial data 'ase and oracle clinical 3lintrial6 the mar*et7s leadin) 3linical Data 2ana)ement System =3D2S>% 8racle 3linical or 83 is a data'ase mana)ement system desi)ned 'y 8racle to provide data mana)ement6 data entry and data validation functionalities to 3linical Trials process% .<% Tell me a'out 2$D9A and what version of 2$D9A did you use in your proRect 2edical dictionary of re)ulatory activities% Version .F .% Descri'e SDT2 3DIS3�s Study Data Ta'ulation 2odel =SDT2> has 'een developed to standardie what
is su'mitted to the "DA% /F% What is 39T 3ase 9eport Ta'ulation /.% What is annotated 39" 3ase report form6 it� s a collection of the forms of all the patients in the trial% //% What do you *now a'out /.39" ;A9T .. Title /. 3"9 ;art .. of the 3ode of "ederal 9e)ulations deals with the "DA )uidelines on electronic records and electronic si)natures in the (nited States% ;art ..6 as it is commonly called6 defines the criteria under which electronic records and electronic si)natures are considered to 'e trustworthy6 relia'le and e5uivalent to paper records% /C% &ave you did validation in your proRects I did validation of the fellow pro)rammers wor* to ensure that the lo)ic and intent of the pro)ram is correct and that data errors are detected% e%)Verify error and warnin) messa)es are )enerated when the macro is called more than .F times which means to add more than .F titles% Verify the error messa)e when TIT#$!(2 parameter is invalid% Verify a warnin) messa)e is )enerated if the total len)th of texts specified in the input parameters #$"T6 3$!T$96 and 9I4&T is )reater than .C/ characters% Also verify precedence is )iven to strin) in input parameter #$"T if the total strin) len)th is more than .C/ characters% Verify there is no error-warnin) messa)e )enerated if the macro is used within a data step and all input parameters are valid% /% What are the contents of A$ dataset What is its purpose What are the varia'les in adverse event datasets The adverse event data set contains the S(BID6 'ody system of the event6 the preferred term for the event6 event severity% The purpose of the A$ dataset is to )ive a summary of the adverse event for all the patients in the treatment arms to aid in the inferential safety analysis of the dru)% /,% What are the contents of la' data What is the purpose of data set The la' data set contains the S(BID6 wee* num'er6 and cate)ory of la' test6 standard units6 low normal and hi)h ran)e of the values% The purpose of the la' data set is to o'tain the difference in the values of *ey varia'les after the administration of dru)% &ow did you do data cleanin) &ow do you chan)e the values in the data on your own I used proc fre5 and proc univariate to find the discrepancies in the data6 which I reported to my mana)er% /%Tell me a'out this company in India &ow 'i) it is Why are they usin) SAS 3$!T9A# D9(4S STA!DA9D 38!T98# 894A!INATI8! &uman-3linical pharmacolo)y trials =phase I> $xploratory trials =;hase II> 3onfirmatory trials =;hase III> A'out A3T � turnover of around PCF million dollars% &ead5uarters in India% /1%&ave you created 39T� s6 if you have6 tell me what have you done in that es I have created patient profile ta'ulations as the re5uest of my mana)er and and the statistician% I have used ;983 9$;89T and ;roc SQl to create simple patient listin) which had all information of a particular patient includin) a)e6 sex6 race etc% /<% &ave you created transport files es6 I have created SAS Eport transport files usin) ;roc 3opy and data step for the
"DA su'missions% These are version , files% we use the li'name en)ine and the ;roc 3opy procedure6 8ne dataset in each xport transport format file% "or version ,: la'els no lon)er than F 'ytes6 varia'le names < 'ytes6 character varia'les width to /FF 'ytes% If we violate these constraints your copy procedure may terminate with constraints6 'ecause SAS xport format is in compliance with SAS , datasets% #i'name sdtm � c:sdtmGdata� @ #i'name dm xport � c:dm%xpt� @ ;roc copy@ In ? sdtm@ 8ut ? dm@ Select dm@ 9un@ /% &ow did you do data cleanin) &ow do you chan)e the values in the data on your own I used proc fre5 and proc univariate to find the discrepancies in the data6 which I reported to my mana)er% CF% Definitions 3DIS30 3linical data interchan)e standards consortium% They have different data models6 which define clinical data standards for pharmaceutical industry% SDT2 � It defines the data ta'ulation datasets that are to 'e sent to the "DA for re)ulatory su'missions% =39T� s> ADa2 � =Analysis data 2odel>Defines data set definition )uidance for creatin) analysis data sets% 8D2 � E2# � 'ased data model for allows transfer of E2# 'ased data % Define%xml � for data definition file =define%pdf> which is machine reada'le% I3& $C: 4uideline6 Structure and 3ontent of 3linical Study 9eports I3& $: 4uideline6 4ood 3linical ;ractice I3& $: 4uideline6 Statistical ;rinciples for 3linical Trials Title /. ;art C./%C/: Investi)ational !ew Dru) Application C.% have you ever done any $dit chec* pro)rams in your proRect6 if you have6 tell me what do you *now a'out edit chec* pro)rams es I have done edit chec* pro)rams % $dit chec* pro)rams � Data validation% .%Data Validation � proc means6 proc univariate6 proc fre5% Data 3leanin) � findin) errors% /%3hec*in) for invalid character values% ;roc fre5 data ? patients@ Ta'les )ender dx ae - nocum nopercent@ 9un@ Which )ives fre5uency counts of uni5ue character values% C% ;roc print with where statement to list invalid data values% systolic 'lood pressure 0
Data Analysis � set6 mer)e6 update6 *eep6 drop in data step% 3reate datasets � ;983 I2;89T and data step from flat files% $xtract data � #IB!A2$% SAS-STAT � ;983 A!8VA6 ;983 9$4%
.F% Duplicate Data � ;983 S89T !odup*ey or !oduplicate !odup*ey � only chec*s for duplicates in B !oduplicate � chec*s entire o'servation =matches all varia'les> "or )ettin) duplicate o'servations first sort B nodup*ey and mer)e it 'ac* to the ori)inal dataset and *eep only records in ori)inal and sorted% ..%"or creatin) analysis datasets from the raw data sets I used the ;983 "892AT6 and rename and len)th statements to ma*e chan)es and finally ma*e a analysis data set% C/% What is Verification The purpose of the verification is to ensure the accuracy of the final ta'les and the 5uality of SAS pro)rams that )enerated the final ta'les% Accordin) to the instructions S8; and the SA; I selected the su'set of the final summary ta'les for verification% $%) Adverse event ta'le6 'aseline and demo)raphic characteristics ta'le% The verification results were verified a)ainst with the ori)inal final ta'les and all discrepancies if existed were documented% CC% What is A!!8TAT$D 39" An annotated 39" is a 39" in which the varia'le names are written next to the spaces provided for the investi)ator% It serves as a lin* 'etween the data'ase-data sets and the 5uestions on the 39"% C% What is ;ro)ram Validation Its same as macro validation except here we have to validate the pro)rams i%e accordin) to the S8; I had to first determine what the pro)ram is supposed to do6 see if they wor* as they are supposed to wor* and create a validation document mentionin) if the pro)ram wor*s properly and set the status as pass or fail%;ass the input parameters to the pro)ram and chec* the lo) for errors% C,% What do you l*now a'out ISS and IS$6 have you ever produced these reports ISS =Inte)rated summary of safety>: Inte)rates safety information from all sources =animal6 clinical pharmacolo)y6 controlled and uncontrolled studies6 epidemiolo)ic data>% KISS is6 in part6 simply a summation of data from individual studies and6 in part6 a new analysis that )oes 'eyond what can 'e done with individual studies%K IS$ =Inte)rated Summary of efficacy> ISS O IS$ are critical components of the safety and effectiveness su'mission and expected to 'e su'mitted in the application in accordance with re)ulation% "DA� s )uidance "ormat and 3ontent of 3linical and Statistical Sections of Application )ives advice on how to construct these summaries% !ote that6 despite the name6 these are inte)rated analyses of all relevant data6 not summaries% C% $xplain the process and how to do Data Validation I have done data validation and data cleanin) to chec* if the data values are correct or if they conform to the standard set of rules% A very simple approach to identifyin) invalid character values in this file is to use ;983 "9$Q to list all the uni5ue values of these varia'les% This )ives us the total num'er of invalid o'servations% After identifyin) the invalid data � we have to locate the o'servation so that we can report to the mana)er the particular patient num'er% Invalid data can 'e located usin) the data GnullG pro)rammin)% "ollowin) is e%) DATA G!(##G@ I!"I#$ K3:;ATI$!TS6TETK ;AD@ "I#$ ;9I!T@ MMMS$!D 8(T;(T T8 T&$ 8(T;(T WI!D8W@ TIT#$ K#ISTI!4 8" I!VA#ID DATAK@ MMM!8T$: W$ WI## 8!# I!;(T T&8S$
VA9IAB#$S 8" I!T$9$ST@ I!;(T +. ;AT!8 PC% + 4$!D$9 P.% +/ DE PC% +/1 A$ P.%@ MMM3&$3H 4$!D$9@ I" 4$!D$9 !8T I! =7"7672767 7> T&$! ;(T ;AT!8? 4$!D$9?@ MMM3&$3H DE@ I" V$9I"=DE67 F./C,1<7> !$ F T&$! ;(T ;AT!8? DE?@ MMM3&$3H A$@ I" A$ !8T I! =7F767.767 7> T&$! ;(T ;AT!8? A$?@ 9(!@ "or data validation of numeric values li*e out of ran)e or missin) values I used proc print with a where statement% ;983 ;9I!T DATA?3#$A!%;ATI$!TS@ W&$9$ &9 !8T B$TW$$! F A!D .FF A!D &9 IS !8T 2ISSI!4 89 SB; !8T B$TW$$! % The main advanta)e of usin) ;983 (!IVA9IAT$ =default n mean std s*ewness *urtosis> is that we )et the extreme values i%e lowest and hi)hest , values which we can see for data errors% If u want to see the patid for these particular o'servations �%%state and ID patno statement in the univariate procedure% C1% 9oles and responsi'ilities ;ro)rammer: Develop pro)rammin) for report formats =ISS O IS$ shell> re5uired 'y the re)ulatory authorities% (pdate ISS-IS$ shell6 when re5uired%
3linical Study Team: ;rovide information on safety and efficacy findin)s6 when re5uired% ;rovide updates on safety and efficacy findin)s for periodic reportin)% Study Statistician Draft ISS and IS$ shell% (pdate shell6 when appropriate% Analye and report data in approved format6 to meet periodic reportin) re5uirements% C<% $xplain Types of 3linical trials study you come across Sin)le Blind Study When the patients are not aware of which treatment they receive Dou'le Blind Study When the patients and the investi)ator are unaware of the treatment )roup assi)ned Triple Blind Study Triple 'lind study is when patients6 investi)ator6 and the proRect team are unaware of the treatments administered% C% What are the domains-datasets you have used in your studies Demo) Adverse $vents Vitals $34 #a's 2edical &istory ;hysical$xam F% 3an you list the varia'les in all the domains Demo): ;atient Id6 A)e6 Sex6 9ace6 Screenin) Wei)ht6 Screenin) &ei)ht6 B2I Adverse $vents: ;rotocol no6 Investi)ator no6 ;atient Id6 ;referred Term6 Investi)ator Term6 =A'dominal dis6 "re5 urination6 headache6 diiness6 hand0food syndrome6 rash6 #eu*openia6 !eutropenia> Severity6 Seriousness =y-n>6 Seriousness Type =death6 life threatenin)6 permanently disa'lin)>6 Visit num'er6 Start time6 Stop time6 9elated to study dru) Vitals: Su'Rect num'er6 Study date6 ;rocedure time6 Sittin) 'lood pressure6 Sittin) 3ardiac 9ate6 Visit num'er6 3han)e from 'aseline6 Dose of treatment at time of vital si)n6 A'normal =yes-no>6 B2I6 Systolic 'lood pressure6 Diastolic 'lood pressure% $34: Su'Rect no6 Study Date6 Study Time6 Visit no6 ;9 interval =msec>6 Q9S duration =msec>6 QT interval =msec>6 QTc interval =msec>6 Ventricular 9ate ='pm>6 3han)e from 'aseline6 A'normal% #a's: Su'Rect no6 Study day6 #a' parameter =#parm>6 la' units6 (#! =upper limit of normal>6 ##! =lower limit of normal>6 visit num'er6 chan)e from 'aseline6 4reater than (#! =yes-no>6 la' related serious adverse event =yes-no>% 2edical &istory: 2edical 3ondition6 Date of Dia)nosis =yes-no>6 ears of onset or occurrence6 ;ast condition =yes-no>6 3urrent condition =yes-no>% ;hysical$xam: Su'Rect no6 $xam date6 $xam time6 Visit num'er6 9eason for exam6 Body system6 A'normal =yes-no>6 "indin)s6 3han)e from 'aseline =improvement6 worsenin)6 no chan)e>6 3omments .% 4ive me the example of edit c*ec*s you made in your pro)rams $xamples of $dit 3hec*s
Demo): Wei)ht is outside expected ran)e Body mass index is 'elow expected = chec* wei)ht and hei)ht> A)e is not within expected ran)e D8B is )reater than the Visit date Invalid 4ender value Adverse Stop is 'efore the start or visit Start is 'efore 'irthdate Study medicine discontinued due to adverse event 'ut completion indicated =382;#$T$ ?.> #a's 9esult is within the normal ran)e 'ut a'normal is not 'lan* or � !� 9esult is outside the normal ran)e 'ut a'normal is 'lan* Vitals Diastolic B; J Systolic B; 2edical &istory Visit date prior to Screen date ;hysical ;hysical exam is normal 'ut comment included /% What are the advanta)es of usin) SAS in clinical data mana)ement Why should not we use other software products in mana)in) clinical data ADVA!TA4$S 8" (SI!4 A SAS�0BAS$D SST$2 #ess hardware is re5uired% A Typical SAS� 0'ased system can utilie a standard file server to store its data'ases and does not re5uire one or more dedicated servers to handle the application load% ;3 SAS� can easily 'e used to handle processin)6 while data access is left to the file server% Additionally6 as presented later in this paper6 it is possi'le to use the SAS� product SAS� -Share to provide a dedicated server to handle data transactions% "ewer personnel are re5uired% Systems that use complicated data'ase software often re5uire the hirin) of one ore more DBA� s =Data'ase Administrators> who ma*e sure the data'ase software is runnin)6 ma*e chan)es to the structure of the data'ase6 etc% These individuals often re5uire special trainin) or 'ac*)round experience in the particular data'ase application 'ein) used6 typically 8racle% Additionally6 consultants are often re5uired to set up the system and-or studies since dedicated servers and specific expertise re5uirements often complicate the process% (sers with even casual SAS� experience can set up studies% !ovice pro)rammers can 'uild the structure of the data'ase and desi)n screens% 8r)aniations that are involved in data mana)ement almost always have at least one SAS� pro)rammer already on staff% SAS� pro)rammers will have an understandin) of how the system actually wor*s which would allow them to extend the functionality of the system 'y directly accessin) SAS� data from outside of the system% Speed of setup is dramatically reduced% By *eepin) studies on a local file server and ma*in) the data'ase and screen desi)n processes extremely simple and intuitive6 setup time is reduced from wee*s to days% All phases of the data mana)ement process 'ecome homo)eneous% "rom entry to analysis6 data reside in SAS� data sets6 often the end )oal of every data mana)ement )roup% Additionally6 SAS� users are involved in each step6 instead of havin) specialists from different areas hand off pieces of studies durin) the proRect life cycle% !o data conversion is re5uired% Since the data reside in SAS� data sets natively6
no conversion pro)rams need to 'e written% Data review can happen durin) the data entry process6 on the master data'ase% As lon) as records are mar*ed as 'ein) dou'le0*eyed6 data review personnel can run edit chec* pro)rams and 'uild 5ueries on some patients while others are still 'ein) entered% Ta'les and listin)s can 'e )enerated on live data% This helps speed up the development of ta'le and listin) pro)rams and allows pro)rammers to avoid havin) to ma*e continual copies or extracts of the data durin) testin)% C% &ave you ever had to follow S8;s or pro)rammin) )uidelines S8; descri'es the process to assure that standard codin) activities6 which produce ta'les6 listin)s and )raphs6 functions and-or edit chec*s6 are conducted in accordance with industry standards are appropriately documented% It is normally used whenever new pro)rams are re5uired or existin) pro)rams re5uired some modification durin) the set0up6 conduct6 and-or reportin) clinical trial data% % Descri'e the types of SAS pro)rammin) tas*s that you performed: Ta'les #istin)s 4raphics Ad hoc reports 8ther ;repared pro)rams re5uired for the ISS and IS$ analysis reports% Developed and validated pro)rams for preparin) ad0hoc statistical reports for the preparation of clinical study report% Wrote analysis pro)rams in line with the specifications defined 'y the study statistician% Base SAS =2$A!S6 "9$Q6 S(22A96 TAB(#AT$6 9$;89T etc> and SAS-STAT procedures =9$46 4#26 A!8VA6 and (!IVA9IAT$ etc%> were used for summariation6 3ross0Ta'ulations and statistical analysis purposes% 3reated Statistical reports usin) ;roc 9eport6 Data GnullG and SAS 2acro% 3reated6 derived and mer)ed and pooled datasets6listin)s and summary ta'les for ;hase0I and ;hase0II of clinical trials% ,% &ave you 'een involved in editin) the data or writin) data 5ueries If your interviewer as*s this 5uestion6 the u should as* him what he means 'y editin) the data� and data 5ueries� % Are you involved in writin) the inferential analysis plan Ta'le� s specifications 1% What do you feel a'out hardcodin) ;ro)rammers sometime hardcode when they need to produce report in ur)ent% But it is always 'etter to avoid hardcodin)6 as it overrides the data'ase controls in clinical data mana)ement% Data often chan)e in a trial over time6 and the hardcode that is written today may not 'e valid in the future%(nfortunately6 a hardcode may 'e for)otten and left in the SAS pro)ram6 and that can lead to an incorrect data'ase chan)e% <% &ow do you write a test plan Before writin) KTest planK you have to loo* into on K"unctional specificationsK% "unctional specifications itself depends on K9e5uirementsK6 so one should have clear understandin) of re5uirements and functional specifications to write a test plan% % What is the difference 'etween verification and validation Althou)h the verification and validation are close in meanin)6 KverificationK has more of a sense of testin) the truth or accuracy of a statement 'y examinin) evidence or conductin) experiments6 while KvalidateK has more of a sense of declarin) a statement to 'e true and mar*in) it with an indication of official sanction%