WHAT IS LAG FUNCTION ? WHERE CAN YOU IMPLEMENT THIS
FUNCTION?

Answers were Sorted based on User's Feedback



WHAT IS LAG FUNCTION ? WHERE CAN YOU IMPLEMENT THIS FUNCTION?..

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

WHAT IS LAG FUNCTION ? WHERE CAN YOU IMPLEMENT THIS FUNCTION?..

Answer / hari

Returns values from the queues

Is This Answer Correct ?    3 Yes 3 No

WHAT IS LAG FUNCTION ? WHERE CAN YOU IMPLEMENT THIS FUNCTION?..

Answer / sai

Lag function can be used if you want to perform
computations across the observations.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;

0 Answers   L&T,


what is Enterprise Guide?what is the use of it?

2 Answers   CitiGroup, Oracle,


"What is the difference between proc sort nodup and proc sort nodupkey?"

2 Answers  


I have 2 data sets A & B. Both have a variable called Age in them, each of them specifying a different functionality. In my program I use bot these data sets. How do I specify which Age variable I want to use?

6 Answers  


What is the command used to find missing values?

0 Answers  






What is proc sort?

0 Answers  


In the flow of DATA step processing, what is the first action in a typical DATA Step?

9 Answers  


What is the difference between SAS Data step and SAS PROC SQL, and which is better?

1 Answers   TCS,


WHAT DIFFERRENCE DID YOU FIND AMONG VERSION 6 8 AND 9 OF SAS.

4 Answers   Genzyme,


Have you ever linked SAS code? If so, describe the link and any required statements used to either process the code or the step itself.

2 Answers   Accenture,


In the following DATA step, what is needed for ‘fraction’ to print to the log? data _null_; x=1/3; if x=.3333 then put ‘fraction’; run;

1 Answers  


We have a string like this "kannafromsalembut" ,from this i want to get only "fromsal" (but one condition with out using substring function)here we can not use scan because in the given string there is no delimeter? so give ans without out using substring ?

5 Answers  


Categories