Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is LAG function?How is it used? can any one explain

Answer Posted / naveen

this Question was raised by saddi soorath....

lag function enables you to have the previous value.

we have the following data
Name num
Naveen 1
Naveen 2
Basha 1
Basha 2

so in data step
if u give num1 =lag(num) you will have the following result

Name num num1
Naveen 1 .
Naveen 2 1
Basha 1 .
Basha 2 1

Thanks and regards

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how does sas handle missing values in procs? : Sas programming

1152


Explain data_null_?

1001


where to use sas business intelligence? : Sas-bi

1000


Explain the use of proc print and proc contents?

902


what is program data vector? : Sas-administrator

1008


Explain the purpose of retain statement.

1002


Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??

2547


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

1717


How do you control the number of observations and/or variables read or written? Approximately what date is represented by the SAS date value of 730?

1622


Do you need to know if there are any missing values?

993


What are the functions which are used for character handling functions?

1075


what is data governance? : Sas-di

965


how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming

1271


What does the RUN statement do?

1255


if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation

1549