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
Answers were Sorted based on User's Feedback
Answer / nbohr02
You are read data for a 4 question poll
(Q1-Q4) is an arrary ($1. is the format of each element
+1) tells sas to increment the array index for each line.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / tsk
You are read data for a 4 question poll
(Q1-Q4) is an arrary ($1. is the format of each element
+1) tells that space b/n the each and every variable called
q1 ,q2 ,q3 ,q4.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / 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 |
WHAT DIFFERRENCE DID YOU FIND AMONG VERSION 6 8 AND 9 OF SAS.
Hi, I need to create a SAS Map of USA using SAS Graphs(Proc Gmap).The data i have dosent contain any co-ordinates of USA cities or counties or states, and the zip codes are diffrent in the data i have from the zip code in the Maps.US dataset in the Maps Library for SAS MAPS. the data i have is a sales report. i have to generate the maps according to the states,cities aligned in the sales data, HELP Appriciated
There is a river notoriously known for it?s large crocodile population. With ease, how do you safely cross it?
What is a put statement?
what is PhaseIII, ODS, TLG, Macro and Proc in SAS
CHOOSE ANY ONE OF THE PROCEDURE FOLLOWING TO GENERATE THE REPORTS? HOW CAN YOU SAY IT IS BETTER THAN THE OTHER? AND DEFERENCIATE THESE TWO ? 1). REPORT PROCEDURE 2). TABULATE PROCEDURE
What are some problems you might encounter in processing missing values? In Data steps? Arithmetic? Comparisons? Functions? Classifying data?
How do you put an elephant in the refrigerator?
How would you include common or reuse to be processed along with your statements?
is QUALCOMM using SAS ?
what is pdv? how it is related to input buffer in sas?
What is the maximum and minimum length of macro variable