WHAT IS LAG FUNCTION ? WHERE CAN YOU IMPLEMENT THIS
FUNCTION?
Answers were Sorted based on User's Feedback
Answer / zyin2
Lag() function returns the value of the first previous
observation in a time series. It could be used in Auto
Regression analysis for time series.
For example, Let y be the cloumn name for the original time
series, the analysis for AR(2) could be:
data test;
set test;
m = lag(y);
n = lag(m);
run;
proc reg data = test;
model y = m n;
run;
Is This Answer Correct ? | 10 Yes | 1 No |
Answer / sai
Lag function can be used if you want to perform
computations across the observations.
Is This Answer Correct ? | 0 Yes | 0 No |
whenever we using the merging through data set merging ,we can get note in log like this "MERGE STATEMENT HAS MORE THAN ONE ONE DATASET BY REPEATED BY VAIABLES" but the output has come in good manner,whenever in in sql(full join) we can get cartion product.so How do overcome this problem in sql?
data task; input id date date9. visit; cards; 101 01jan2015 1 101 02jan2015 2 101 06jan2015 3 102 04jan2015 1 102 07jan2015 2 102 12jan2015 3 103 06jan2015 1 103 13jan2015 2 ; run; write a program to find out missing dates between visits by each subject.
i am importing large data from oracle to work library. in log there is a error message worklibrary space is not enough. then how to import the data safely to sas environment.
What is the difference between nodup and nodupkey options?
20 Answers iFlex, Makro, Talwar,
What is your favorite all time computer book? Why?
how to read character value without using substr function in sas ?
What system options would you use to help debug a macro? : sas-macro
How do you write a test plan?
How do you define proc in sas? : sas-grid-administration
If you?re not wanting any SAS output from a data step, how would you code the data statement to prevent SAS from producing a set?
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 is the function of Stop statement in a SAS Program?