SAS Training Questions and Answers: A+ Rated, Exams of Nursing

A compilation of sas training questions and their correct answers, rated a+. It covers essential concepts such as data steps, proc steps, global statements, and various procedures like proc contents, proc freq, proc univariate, and proc sql. The questions address common errors, data manipulation techniques, and data summarization methods, making it a valuable resource for learning and reinforcing sas programming skills. It also includes practical tips and explanations to enhance understanding and application of sas concepts. Useful for university students.

Typology: Exams

2024/2025

Available from 12/01/2025

whitegiraffe69485
whitegiraffe69485 ๐Ÿ‡ฌ๐Ÿ‡ง

6.3K documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
SAS Training questions with correct
answers rated A+
Error 180-322: Statement is not valid or it is used out of proper order -
correct answer โœ”โœ” Probably means you forgot a semicolon at the end of a
statement
3 types of steps in SAS program - correct answer โœ”โœ” DATA step, PROC step,
and Global statements
DATA step - correct answer โœ”โœ” creates a dataset and manipulates data as
desired
PROC step - correct answer โœ”โœ” Reads a SAS dataset and performs some
canned procedure
Global statements - correct answer โœ”โœ” indicates some options or directive to
be accessible during a future DATA or PROC step
set statement - correct answer โœ”โœ” reads in an existing data set to a DATA
step
run; - correct answer โœ”โœ” used to end a step
for each and every row, SAS repeats the execution of every line of code in a
DATA step - correct answer โœ”โœ” jsyk
pf3
pf4
pf5

Partial preview of the text

Download SAS Training Questions and Answers: A+ Rated and more Exams Nursing in PDF only on Docsity!

SAS Training questions with correct

answers rated A+

Error 180-322: Statement is not valid or it is used out of proper order - correct answer โœ”โœ” Probably means you forgot a semicolon at the end of a statement 3 types of steps in SAS program - correct answer โœ”โœ” DATA step, PROC step, and Global statements DATA step - correct answer โœ”โœ” creates a dataset and manipulates data as desired PROC step - correct answer โœ”โœ” Reads a SAS dataset and performs some canned procedure Global statements - correct answer โœ”โœ” indicates some options or directive to be accessible during a future DATA or PROC step set statement - correct answer โœ”โœ” reads in an existing data set to a DATA step run; - correct answer โœ”โœ” used to end a step for each and every row, SAS repeats the execution of every line of code in a DATA step - correct answer โœ”โœ” jsyk

When you define a dataset in SAS without specifying a library it gets stored in a temporary library called WORK - correct answer โœ”โœ” So set NFL_Census; is the same statement as set WORK.NFL_Census; Creating a library - correct answer โœ”โœ” libname CONGRESS '/nas/igarc04/work/ew21/users/tlawt'; commenting in SAS - correct answer โœ”โœ” /* comment */ Always click rename columns to comply with SAS naming conventions when importing data - correct answer โœ”โœ” jsyk PROC CONTENTS data=datasetname; - correct answer โœ”โœ” shows number of records/observations in data set, number of variables in data set and list of variables in data set. PROC FREQ data=datasetname; tables variable variable etc. ; run; - correct answer โœ”โœ” shows the number of records corresponding to each value of the variables you are interested in. (Just put semicolon after the last variable) In proc FREQ if you set tables

var2); run; - correct answer โœ”โœ” this will remove var1 and var2 from the dataset KEEP chooses which variables to keep and is implemented similarly DATA datasetname; set orig_dataset; if missing(var1) = 1 then delete; run; - correct answer โœ”โœ” this will remove all records where there is a missing value for var1. The log tab will tell you how many records you removed. PROC SORT data=datasetname; by var1; run; - correct answer โœ”โœ” sorts the specified data set by var PROC SUMMARY data=datasetname; by var1; output out = summarized_datasetname; sum(var2) = sum_var; run; - correct answer โœ”โœ” Will return a summary of the dataset including the created variable of sum_var. The dataset must be sorted first. By default, will output the number of observations of the variable you are aggregating by. proc sql; select variable_u_want_to_summarize_by, sum(variable_to_sum) as optional_name

avg(varialbe_to_average) as name from dataset_i_want_to_summarize group by variable_u_want_to_summarize_by; quit; - correct answer โœ”โœ” Used for aggregating/summarizing data similar to PROC SORT followed by PROC SUMMARY. proc sql; create table data_with_added_fields as select a.*,b.added_field from original_dataset a left join another_dataset b on a.var_to_merge_on = b.var_to_merge_on; quit; - correct answer โœ”โœ” taking added field from b and showing it as an extra column for a sorted by var_to_merge_on. puts it all in the created table. Kind of like what you thought merge should do for R.

  • correct answer โœ”โœ”