DATA ABC;
INPUT TDATE DATE9. AVG;
CARDS;
18APR2008 150.00
19APR2008 167.00
20APR2008 123.00
21APR2008 145.00
;
RUN
HOW CAN I FIND THE DIFFERENCE BETWEEN AVG OF 18APR2008 ANF
21APR2008??
IF ANY ONE GETS IT PLS TRY TO POST IT.
Answer Posted / rohitbedi
Shortest answer: Copy the dataset and create a new field using difn function on avg where n=3 as shown below.
data abc2;
set abc;
diff = dif3(avg);
run;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to limit decimal places for variable using proc means?
What is the different between functions and PROCs that calculate the same simple descriptive statistics?
How can you limit the variables written to output dataset in data step?
What are the default statistics for means procedure?
How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?
what is study design in while working with SAS? what are screening variables in SAS?
Have you used macros? For what purpose you have used? : sas-macro
How can I remove header from output data set?
How would you invoke a macro? : sas-macro
How to read an input file in sas?
Tell e how how dealt with..
how to read the variables in sas? : Sas-administrator
I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry
what are the categories that sas informats are used to the place the data? : Sas-administrator
Enlist the functions performed by sas.