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

How do you read in the variables that you need?

9 Answers   Accenture,


How do you debug and test your SAS programs? What can you learn from the SAS log when debugging? How do you test for missing values? How would you create multiple observations from a single observation? What are some good SAS programming practices for processing very large data sets? Briefly describe 5 ways to do a "table lookup" in SAS. Why is SAS considered self-documenting? Are you sensitive to code walk-throughs, peer review, or QC review? What other SAS features do you use for error trapping and data validation? How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

2 Answers  


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 are the best practices to process the large data sets in sas programming? : Sas-administrator

0 Answers  


Name statements that are recognized at compile time only?

3 Answers   Accenture,






What was the last computer book you purchased? Why?

0 Answers   Oracle,


How do you connect the desktop application to metadata server? : sas-grid-administration

0 Answers  


what is sas data set?

0 Answers  


what is the difference between nodup and nodupkey options? : Sas programming

0 Answers  


what are the methods that you would employ to fine tune your SQL extract process using SAS/Access or Proc SQL?

1 Answers  


do you prefer proc report or proc tabulate? Why? : Sas programming

0 Answers  


How do you test for missing values?

0 Answers   Quintiles,


Categories