Clinical sas programmer interview questions for freshers –Part 3

Clinical sas programmer interview questions for freshers 

This is the continuation of clinical sas programmer interview questions part2.

21) how to assign the title and footnotes for the created report or tables?

Ans: we can create the title and footnotes in SAS using title and footnote statement.

The syntax is as follows,

Title1 “  the demographic results for patient n=20 “ ;

Title are visible at the top of the report or table.

And

Footnote1 “ here we are in this table we are having the 2 dropouts”;

And footnote are visible at the bottom of the report or table.

We will create the 10 title and and 10 footnote at a time in SAS. If we assign the same title or footnote two time in SAS programme it will override to next one and like that output will be create in the report window.

Related: Phases of clinical trials- Overview

22) how to convert the SAS report and output tables into the external files?

Ans: there are many external reporting files are available for submitting the reports and dataset. Which are as follows,

  1. pdf (portable data file)
  2. rtf (rich text file)
  3. txt (text file)
  4. doc (word file)

Many time we want to convert our SAS output report and outputs into this external reporting files. For that within SAS output delivery system (ODS) is the statement available.

For EX:

Suppose, we want to make PDF file output

The syntax is as follows.

Ods pdf file = “path with extension where we want to create the file”;

Proc print data=sashelp.class;

Run;

Ods pdf close;

Whichever program are mentioned within first ods and last ods statement that output will be created in the pdf file.

clinical sas programmer interview questions pharmaclub

23) what is the use of array in SAS programme?

Ans: suppose if we want to do same task repeatedly many time say 20 time. If we are going by traditional way, we want to make programme 20 times. It will take lots of time and hard work. By using array, we will do it by using the single programme. It will reduce time as well as hard work.

i.e by using array we will make the series of observation into single variable.

The syntax of array is as follows,

Array array_name (n) Array_values;

24) suppose we have given the following programme

Libname abcd “path of folder”;

Data abcd.one;

       A=4;

        B=7

        D=a*b;

Run;

What output we will get for variable D?

Ans: In SAS different operators are available for making some expression or calculations.

  1. exponential operator (**) means (^)
  2. subtraction (-)
  3. multiplication (*)
  4. addition (+)
  5. division (/)

Here in our programme it is an exponential operator

Here A =4 and b=7

So we will get

C=a*b=4**7 =16384

We will get this output in the output window.

25) what is the use and difference of drop and keep statement as well as options in SAS?

Ans: the drop and keep options we are using independently in the options statement. As well as in set statement and data step.

The syntax is

Options drop=var_a keep=var_c;  * means we are droping here variable var_a and keeping variable var_c;

Also we can use in data and set statement.

EX.

Data abc (keep=var_a);

                                Set abc1 (drop=var_abc);

Run;

 Now, drop and keep statement we will be use in the data set for dropping and keeping the variables.

Ex.

Data abc ;

Set abcd;

Drop var_1;

Keep var_2;

Run;

26) How to deal with the missing date values in SAS?

Ans: In SAS while working on the data some time we are having some missing date values.

For example:

Data abc;

                                Input date &;

Datalines

21/07/18

;

Here we want this date as in some century.

Date= 21/07/18 here we don’t know this date belongs to which century.

Within SAS we are having yearcutoff option which creates the 100 years’ time span.

The by default yearcutff value is 1920 that is it will create (1920-2019) this 100 years’ time span.

And

Here our data =21/07/18 are come under 2018 century. So this 21/07/2018 will be shown in the output. Like that we are dealing with the missing date values in SAS.

27)  what is the use of proc print procedure?

Ans: this is the procedure in SAS which shows the listing output of the SAS dataset in the output window. Also we can restrict the listing dataset for showing the observations that we don’t want in the output window using obs and firstobs option.

For Ex.

Suppose we are having SAS dataset sys_bp which contain 20 observations

Now we want to show listing output and only first 10 observations.

Data SYS_bp;

             Set SYS_bp2;

Run;

Proc print data=sys_bp firstobs=1 obs=10;

Run;

That is, we will get the listing output for only first 10 variables in the output window.

28) Suppose we are having the SAS dataset

Data ab;

                   Input pid gender $ 6.;

Datalines;

01 Male;

02 Female;

03 Male;

04 Female;

Run;

Now we want to convert this male and female values in binary number 0 and 1.

Write the programme for it?

Ans:

Here for doing this task we want to use here conditional looping or also we will do it by creating our own user defined format. In SAS there are many ways for doing one task or thing differently.

First we will do it using conditional looping

Data ab;

                                Input pid gender $ 6.;

                                If gender=” Male” then sex=1;

                                Else if gender =” female” then sex=0;

Run;

Now we can do it using proc format

First we will create the user defined format

Proc format;

               Value gender$

            “Male” = 1

            “Female”=0

;

Data ab;

                  Input pid gender $ 6. ;

                  Format gender$.;

Datalines;.

01 Male;

02 Female;

03 Male;

04 Female;

Run;

29) what is the SAS standard rule for the naming and assigning length for character and numeric variable in SAS?

Ans: In SAS for each type of variables we are having some SAS standard rules which is as follows

  1. Character variables: this variable contains only A-Z letters, and special characters.

The maximum length of the character variables is 32k means (32767 bytes). For 1-character digit it will take the 1 bytes.

  1. numeric variable: this variable contains the 0-9 digits, E notations etc.

The maximum length of the numeric variable Is 8 bytes which is very huge length lots of numeric values comes under this length.

Also for assigning label length is 256-character long. If it exceeds the 256 character, then SAS programme shows the error in the log window.

30) what is the use of where statement in SAS?

Ans: In practically when we are working in clinical related fields many time we want to subset the dataset or categorise the dataset for doing it where statement is very useful.

To create the subset of the larger dataset where statement is used.

For Ex: Suppose, we are having the demographics data which contains all the demographics information of (n=50) patients. But we want only those patients for the analysis whose age is greater than 18. By using where statement we can do it.

Programme is as follows,

Data abc;

              Set abc1;

              Where age > 18;

Run;

Here we will get new SAS dataset abc which contains all observations for those patients age is greater than 18.

Author: Mayur Kharche (Clinical sas programmer& Biostatistician)

Please share this post and comment your opinion below. If you need any other clinical sas programmer interview questions feel free to drop a comment below.

Clinical sas interview questions for freshers –Part 1

Clinical sas interview questions

Here we have provided a list of basic clinical SAS interview questions. These are the common questions usually asked in interview (especially for freshers). These question and answers are prepared from freshers point of view. Before attending an interview you must have at least below clinical sas interview questions and answers

Every sponsor company may not have this job vacancy(Usually MNC company have this department). Usually sponsor will outsource their work to CRO. Every Contract Research Organisation(CRO) have data management department. It includes Clinical SAS department. And this vacancy(Clinical SAS programmer) is available in this department.

Any life science graduate can learn Clinical SAS program to get a job. Clinical sas Interview questions are provided and given with a brief explanation. Due to length of this questions, clinical sas interview questions and answers divided in 3 parts. Questions and answers as follows.

1) What Is SAS?

Ans: SAS stands for the statistical analysis system or software. It is a tool for collecting, summarizing, analysing the data.it is used in the variety of domains like clinical, Banking, network marketing, Trading etc.

2) what is the use of _N_ and _Error_ in SAS?

Ans: _N_  and _Error_ is the automatic variables in SAS which created in the backend each one having its unique usages. _N_ is the number of iteration means how many times the data step or proc steps begins to execute.

And _Error_ shows the error present in the programme or not. It takes only two values 0 and 1.

If _Error_=1 then there is error present in the programme and if _Error_ =0 then there is no error present in the programme.

clinical sas interview questions in cognizant, sas logical interview questions,clinical sas programmer interview questions answers, clinical sas interview questions and answers

3) what is the use of Proc means and by default which statistics we will get?

Ans: Proc means is the procedure in SAS which is used for finding the descriptive statistics.

By default, we will get N, minimum, maximum, mean, standard deviation.

 Syntax is as follows,

Proc means data = dataset name;

                Var variable_names;

Run;

Related: Medical representative interview questions

4) what is the use of SDTM and ADaM CDISC standard in the data management?

Ans: CDISC (clinical data interchange standard consortium) it the non-profitable organisation which defines the standards for industry drug submission Like SDTM (Study data tabulation model), AdaM (analysis dataset model, CDASH (clinical data acquisition standard harmonisation), SEND (standard for exchange of non-clinical data), LAB (laboratory dataset model), PRM (protocol representation model), ODM (operational dataset model) each standard having its unique specification. Standard implementation guides for each and every standard are created by CDISC team for easy drug regulatory submission.

SDTM is stands for study or standard data tabulation model which is use for the conversion of the Non-standard data into the standard form in the clinical domain. Because standard data is easy to analysis and it is easy for researcher to make valid interpretation from the standard data. The latest version of implementation guide for SDTM is SDTMIG v3.1.2.

ADaM is stands for the analysis dataset model. this standard is use for converting the SDTM standard dataset in to analysis ready dataset for the analysis purpose. The latest version of implementation guide for ADaM is AdaMIG v2.1.

5) How to combine the two or more datasets in SAS?

Ans: there are some methods available in SAS for combining the SAS datasets. Which is as follows

  • Concatenation: this method is used used to connect two or more dataset

The syntax is

Data Newdataset1_name;

                                Set existingdataset1_name existingdataset2_name;

Run;

  • Interleaving: this method combines the sorted datasets according the sorted by variables.

The syntax is

Proc sort data=existingdataset1 out=existingdataset1_name;

                                By Variables_name;

Run;

Proc sort data=existingdataset2 out=existingdataset2_name;

                                By variables_name;

Run;

Data Newdataset_name;

                                Set existingdataset1_name existingdataset2_name;

                         By variables_name;

run;

  • Merging: this method combines the observations from two or more datasets into single observation in the new data set.

The syntax is

Proc sort data=existingdataset1 out=existingdataset1_name;

                                By Variables_name;

Run;

Proc sort data=existingdataset2  out=existingdataset2_name;

                                By variables_name;

Run;

Data Newdataset_name;

                                merge existingdataset1_name existingdataset2_name;

                         By variables_name;

run;

6) what is the SAS datasets variables attributes?

Ans: there are 5 SAS datasets variables attributes. (Type, length, name, label, format and informat).

  1. Type: character and numeric data is the type of the variable.
  2. length: The length of variable means the how many character or digits that variables take to store the value.
  3. Name: the name of the variables
  4. format: The way in which we want to store the variable.

Ex: ddmmyy10. is the date format

  1. Informat: the variable which already in some standard SAS format and we want to convert it

into some other format it is informant.

Ex: suppose, if we want to convert 10,300 as $10,300 in SAS

Then here we will use the dollar8. Informant

7) what is the use of libname statement in SAS?

Ans: libname statement is use for the assigns the path of file which are store in some folder.by using that path we can access that files.

Syntax: libname file_ref “ path of the folder”;

8) what is the difference between proc means and proc summary?

Ans: The use of the both procedure is to make the descriptive statistics of the data and the proc summary with the print option is an identical to the proc means.

Syntax:

Proc means data = dataset_name;

                Var variable names;

Run;

Proc summary data =dataset_name print;

                Var variable_name;

Run;

9) How many different ways to create the macros in SAS?

Ans: we will create the macro for reducing the programme which reduce the time for executing it.

There are 8 different ways for creating macros in SAS which are as follows,

  1. %let statement
  2. %macro statement
  3. %global statement
  4. %local statement
  5. %windows statement
  6. %input statement
  7. into clause in proc sql
  8. using call symput routine

10) what is the use of proc report in clinical research process?

Ans: Proc report is the procedure in SAS for creating the tables that show some information regarding the study results.

Suppose in clinical trials many times we want to create shift table which show the how much shift occur form baseline to post treatment. For summarizing that results we want to create the mock up table. In SAS using Proc report procedure we will create this mock up tables.

Syntax:

Proc report data= Dataset_name;

                Column variable_names;

                Define variable_name / attributes options;

Run;

Author: Mayur Kharche (Cinical SAS programmer & Biostatistician)

Please share this post and comment your opinion below.