Posts

SAS Interview Questions & Answers:Clinical trials

Image
1.Describe the phases of clinical trials? Ans:- These are the following four phases of the clinical trials: Phase 1: Test a new drug or treatment to a small group of people (20-80) to evaluate its safety. Phase 2: The experimental drug or treatment is given to a large group of people (100-300) to see that the drug is effective or not for that treatment. Phase 3: The experimental drug or treatment is given to a large group of people (1000-3000) to see its effectiveness, monitor side effects and compare it to commonly used treatments. Phase 4: The 4 phase study includes the post marketing studies including the drug's risk, benefits etc. 2. Describe the validation procedure? How would you perform the validation for TLG as well as analysis data set? Ans:- Validation procedure is used to check the output of the SAS program generated by the source programmer. In this process validator write the program and generate the output. If this output is same as the output gen...

SAS interview Q & A: PROC SQl and SAS GRAPH and ODS

PROC SQL: 1. What are the types of join avaiable with Proc SQL ? A.  Different Proc SQL JOINs JOIN: Return rows when there is at least one match in both tables •LEFT JOIN: Return all rows from the left table, even if there are no matches in the right table •RIGHT JOIN: Return all rows from the right table, even if there are no matches in the left table •FULL JOIN: Return rows when there is a match in one of the tables (source: www.w3schools.com ) There are 2 types of SQL JOINS – INNER JOINS and OUTER JOINS. If you don't put INNER or OUTER keywords in front of the SQL JOIN keyword, then INNER JOIN is used. In short "INNER JOIN" = "JOIN" (note that different databases have different syntax for their JOIN clauses). The INNER JOIN will select all rows from both tables as long as there is a match between the columns we are matching on. In case we have a customer in the Customers table, which still hasn't made any orders (there are no entries for this...

DISCLAIMER

Image
This blog is not responsible for any kind of copyright violation. My blog just collects the links hosted or posted by other server/people/search engines. The creator of this page or the ISP(s) hosting any content on this site take no responsibility for the way you use the information provided on this site. If anybody has any copyright claim on it and doesn’t wish the information provided to be shown on our site, please do respond to learnsasonline@gmail.com . We shall remove them off immediately. Any inconvenience is regretted. Please do mention your exact grievance/problems with respect to certain third party links. We assure you that appropriate action will be taken. Thank you..We cannot guarantee the authenticity or trueness of the study material provided in this blog. We aren't responsible for any such issues.SAS® is trademark of SAS Inc.www.studysas.blogspot.com is not endorsed, associated or affiliated in any way with SAS Inc. All other trademarks, company names, products nam...

SAS interview questions: Macros

SAS Macros Interview Questions and Answers SAS Macros Interview Questions and Answers This document provides a collection of interview questions and answers related to SAS Macros, which are a powerful feature in SAS for automating repetitive tasks and dynamically generating code. 1. What is a macro in SAS? A macro in SAS is a code that generates SAS statements dynamically. Macros allow for automation, reusability, and parameterization of code, making it more flexible and efficient. 2. How do you create a simple macro in SAS? You can create a macro in SAS using the %MACRO and %MEND statements. Here's an example: %macro simple_macro; data new_data; set old_data; /* Your SAS code here */ run; %mend simple_macro; %simple_macro; 3. What is the difference between a macro variable and a data step variable? Macro variables are defined and used in the macro language (outside of the DATA step) ...

SAS Interview Questions: Base SAS

Very Basic: What SAS statements would you code to read an external raw data file into a DATA step? You would use the INFILE statement to specify the location of the external raw data file, and the INPUT statement to read in the data into the variables in a SAS dataset. How do you read in the variables that you need? You use the INPUT statement with specific column pointers, such as @5 or 12-17 , to define where each variable is located in the raw data file. Are you familiar with special input delimiters? How are they used? Yes, special input delimiters like DLM and DSD are used to specify how fields are separated in the data. They are included in the INFILE statement. For example, the DLM option can be used to specify a comma as a delimiter for CSV files. The DSD option is used for comma-separated values (CSV) files and treats consecutive delimiters as missing values and ignores delimiters enclosed in quotation marks. If reading a variable-length file with fixed inp...

How to Create a new data set from multiple data sets based upon sorted order

Image
Create a new data set from multiple data sets based upon sorted order Use the SET and BY statements to interleave data sets. Note: Interleaving uses a SET statement and a BY statement to create a new, sorted data set from multiple data sets. The number of observations in the new data set is the sum of the number of observations in the original data sets. The observations in the new data set are arranged by the values of the BY variable(s) and, within each BY-Group, the order of the data sets in which they occur, including duplicates. To interleave, data sets need to be in sorted order or indexed on the BY variables. Output: source: support.sas.com

Dynamically generate SET statement to combine multiple data sets

Dynamically generate SET statement to combine multiple data sets You can manually enter the data set names or use MACRO logic to generate the repetitive data set names when combining many data sets on a SET statement. Note: Variable name lists are not valid for data sets. In other words, if you have WORK.DS1, WORK.DS2, and WORK.DS3, you can NOT specify WORK.DS1-WORK.DS3 on the SET statement. /* names use the naming convention of DSn, where n is an incrementing /* number. data ds1; x=1; run; data ds2; x=2; run; data ds3; x=3; run; /* Build a macro called NAMES with two parameters. The first parameter / * is the 'prefix' of the naming pattern. The second parameter is the / * maximum number of data sets you want to generate on the SET statement. */ %macro names(prefix,maxnum); %do i=1 %to &maxnum; &prefix&i %end; ; %mend names; /* Call the macro on the SET statement */ data all; set %names(DS,3); run; proc print data=all; title "Appended results"; run; run; A...