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 |
How do you read in the variables that you need?
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?
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;
what are the best practices to process the large data sets in sas programming? : Sas-administrator
Name statements that are recognized at compile time only?
What was the last computer book you purchased? Why?
How do you connect the desktop application to metadata server? : sas-grid-administration
what is sas data set?
what is the difference between nodup and nodupkey options? : Sas programming
what are the methods that you would employ to fine tune your SQL extract process using SAS/Access or Proc SQL?
do you prefer proc report or proc tabulate? Why? : Sas programming
How do you test for missing values?