data voter;
input Age Party : $1. (Ques1-Ques4)($1. + 1);
datalines;
23 D 1 1 2 2
45 R 5 5 4 1
67 D 2 4 3 3
39 R 4 4 4 4
19 D 2 1 2 1
75 D 3 3 2 3
57 R 4 3 4 4
;
Idont understand what the (Ques1-Ques4)($1. + 1) means.
I have seen (Ques1-Ques4)(4*$1.), but what is
(Ques1-Ques4)($1. + 1)?
Appreciate all help
Thanks
Answer Posted / naveen
In this example you have to read the data after the party
variable specifying the numeric variables (Ques1-Ques4).
This way is possible only for numeric variables. $1.
specifying the column range(width of the data value) and +1
refers to eliminate the non required data.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do dates work in SAS data?
What is proc sort?
Explain data_null_?
What is the differnce between SDTM 3.1.2 to 3.1.1 version
Name and describe few sas character functions that are used for data cleaning in brief.
What are the differences between sum function and using “+” operator?
what are the benefits of data integration? : Sas-di
what are the component of range? : Sas-bi
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
What is the use of %include statement?
what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming
What is the good sas programming practices for processing large data sets?
To what type of programms have you used scratch macros?
what is function of retain statment
If a variable contains letters or special characters, can it be numeric data type?