data PREDICTED (drop=WEIGHT index ); set User ; array month_{6} xxxx (1,2,3,4,5,6) ; array weigh_{6} ; EXISTING_WEIGHT=WEIGHT; do index=1 to dim(month_);
put _all_; weigh_{index}=month_{index}+WEIGHT+WEIGHT*.02; WEIGHT=weigh_{index}
end; run;
proc print data=PREDICTED;run;
What value you will put in place of xxxx , so that all month_ variable become temporary and will not be part of output?
Correct Answer : Get Lastest Questions and Answer : Explanation: If you want that all the variables created by an array to be temporary and you dont need them after program execution, you can use _temporary_ keyword after array declaration.
Question : You have been given below dataset
Which of the following will correctly read the files.
Correct Answer : Get Lastest Questions and Answer : Explanation: As you can see given data needs to be read with the fixed column width. There are mixed of values numeric as well as character. Whenever you need to read character values, you have to use $ sign. So you can clearly remove option 4 and its not correct. Now you need to make sure that $ sign should be just after variable name and then width of the variable. Hence, option 2 and 3 is also out. Only correct answer is 1st one.
Question : You have been given some data in a text file at below location and you tried to read it is using SAS column input. filename course22 '/folders/myfolders/hedata/course22.txt;
Which of the following statements are correct with regards to column input?
A. If your datasets column has blank spaces than it can be read using column input. B. If data is missing than it is not mandatory to have placeholder. C. You can read either standard or non-standard values D. It is not necessary that data stored in course22.txt file should be separated by either comma or space.
Correct Answer : Get Lastest Questions and Answer : Explanation: When you use column input to read data than your data can have blank space, but can be read successfully. For missing data there is no need to have place holder they will be marked as missing in case of numeric as . and in case of character it would be a blank space. You should use column input only to read standard values. As column input can read data based on column position so it is not required that you have blank space or any other delimiter for the data.