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


Please Help Members By Posting Answers For Below Questions

How to limit decimal places for variable using proc means?

689


What is the different between functions and PROCs that calculate the same simple descriptive statistics?

1361


How can you limit the variables written to output dataset in data step?

871


What are the default statistics for means procedure?

748


How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?

1675






what is study design in while working with SAS? what are screening variables in SAS?

1796


Have you used macros? For what purpose you have used? : sas-macro

668


How can I remove header from output data set?

2202


How would you invoke a macro? : sas-macro

650


How to read an input file in sas?

745


Tell e how how dealt with..

1869


how to read the variables in sas? : Sas-administrator

641


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

1420


what are the categories that sas informats are used to the place the data? : Sas-administrator

710


Enlist the functions performed by sas.

774