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
Format of combined histograms using -grc1leg-Hello community, Me again. I need help with output format using the -grc1leg- command combining 12 …
Local with conditions within a loopHi everyone, I have to generate a new variable (adjusted_pri) for each country (cname) that is the r…
Working with hierarchical dataHi, I’m working with hierarchical data from the Current Population Survey. Each household (QSTNUM) …
Importing several excel files: matching columnsHi everyone, I imported over 250 excel files and appended them all together to 1 dta file, by using…
xtgraph option xlabUsing xtgraph, I noticed that the option xlab (..., ..., ...) doesn't work. Whether it's specified o…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating averages over a time-series
Post a Comment