Su Stata. Gen lag2 x n 2. With detail the same information is presented along with the.
Without the detail option the number of nonmissing observations the mean and standard deviation and the minimum and maximum values are presented. Basic panel data commands in stata panel data refers to data that follows a cross section over time for example a sample of individuals surveyed repeatedly for a number of years or data for all 50 states for all census. Sort state year.
For the updated video in stata 1.
Sort state year. Basic panel data commands in stata panel data refers to data that follows a cross section over time for example a sample of individuals surveyed repeatedly for a number of years or data for all 50 states for all census. Gen lead1 x n 1 you can create lag or lead variables for different subgroups using the by prefix. Gen lag1 x n 1.