Hello,
I am looking for a function to calculate the average unemployment rate (mean) over two sets of years (2007-2011) and (2012-2020) for various regions defined by the variable 'regionid'. For the years I have produced a dummy variable 'post' where post=0 if year <= 2011 and post=1 if year > 2011.
I have tried the following functions but I am having difficulty in combining them into one function which incorporates both post and regionid.
tabstat ur, stat(mean) by(regionid)
tabstat ur, stat(mean) by(post)
I am looking to create a table like this using STATA.
Could someone please guide me in finding the right command.
Array
Thank you.
Related Posts with Calculating averages over a time-series
dropping observations if 2 strings are emptyHi I want to drop all observations which don't have date in 2 string variables: for example if A =…
Noabsorb option for ivreghdfeBest users, A bit of a general question, but how come the code (xrd is the dependent variable and p…
Dynamic panel gravity model with PPMLDear Joao Santos Silva Tom Zylkin , Currently, I'm doing an investigation about the effects of Free…
count variable and keep the firstDear statalist, I have a list of companies (isin) on different dates ( variable DATE format DD/MM/Y…
Generate a list of unique firmsHi, I have a panel data and would like to generate a list of unique firms (e.g. gvkey), preferable e…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating averages over a time-series
Post a Comment