SAS_Institute
A00-212 · Question #156
The variable TOTOBS has a value of 123, which represents the total number of observations in a SAS data set. Which assignment statement correctly creates the variable PTOBS that guarantees a valid…
The correct answer is C. ptobs = ceil(ranuni(0) * totobs). See the full explanation below for the reasoning.
Question
The variable TOTOBS has a value of 123, which represents the total number of observations in a SAS data set. Which assignment statement correctly creates the variable PTOBS that guarantees a valid observation number in that SAS data set?
Options
- Aptobs = ranuni(0) * totobs;
- Bptobs = int(ranuni(0) * totobs);
- Cptobs = ceil(ranuni(0) * totobs);
- Dptobs = floor(ranuni(0) * totobs);
How the community answered
(25 responses)- A4% (1)
- B8% (2)
- C84% (21)
- D4% (1)
Community Discussion
No community discussion yet for this question.