Hello everyone!
My name is Fábio and I am completely new at Stata. Since I am a beginner, I will post my question to you:
So, imagine I have four columns: id, year, cash and neighbourhood (dummy). Each ID is a different company and each ID has seven lines (same ID for seven years, so line 1 = id 1; line 2 = id 1; ... ; line 8 = id 2 and so on). Is it possible to calculate an average for cash of all companies (different IDs), but cash from the previous year?
In other words, if a company has dummy = 1 in 2010 and 2012 and other company has dummy = 1 for 2009, is it possible to calculate the average of cash 2009 and cash 2011 (first company) and cash 2008 (second company)?
I hope you can understand what I mean. Thank you a lot!
EDIT: I mean "Average" in the title instead of "Descriptive statistics".
My name is Fábio and I am completely new at Stata. Since I am a beginner, I will post my question to you:
So, imagine I have four columns: id, year, cash and neighbourhood (dummy). Each ID is a different company and each ID has seven lines (same ID for seven years, so line 1 = id 1; line 2 = id 1; ... ; line 8 = id 2 and so on). Is it possible to calculate an average for cash of all companies (different IDs), but cash from the previous year?
In other words, if a company has dummy = 1 in 2010 and 2012 and other company has dummy = 1 for 2009, is it possible to calculate the average of cash 2009 and cash 2011 (first company) and cash 2008 (second company)?
I hope you can understand what I mean. Thank you a lot!
EDIT: I mean "Average" in the title instead of "Descriptive statistics".
Comment