Hi everyone,
I basically want to replicate figure four in Pontusson and Kwon (2010) with different data or, I guess, create the graph in 16:10 https://www.youtube.com/watch?v=RyqTeDxklfk (Stata Time Series Tutorial: The Rolling Regression). The plan is to use a rolling regression with 10-year windows and Prais-Winsten estimates; panel corrected errors and first order autoregressive corrections.
My variables are: id, idn, year (time), uegen (my dependent variable), leftcum (my independent variable), and controls. id=countries (Austria, Denmark, Sweden etc.), year=from 1960 to 2019 (although missing data roughly before and after 1980 and 2011 respectively), uegen=index of unemployment benefits, leftcum=cummulative years of left government rule (so restarting for each country and rising over consecutive years). Unfortunately, It's not my data so won't be able to share it.
I've so far identified the commands: "rolling _b _se, window(10): prais uegen leftcum", generate upper = _b_leftcum_ + 1.96*_se_leftcum, and generate lower = _b_ leftcum - 1.96*se_leftcum. However, I'm not able to plot the figure. Using "two-way (line_b_leftcum) (line upper lower)" from https://www.stata.com/manuals13/tsrolling.pdf (Rolling - Stata) gives the error message "too few variables specified". I don't know how to specify years as the time variable because "tsset" doesn't seem to apply to pooled time series data "repeated time values in sample".
Summary: I'd like to plot 10 year windows of Prais-Winsten estimates with 95% confidence intervals but can't figure out how to create the figure.
Related Posts with Rolling regression with pooled time series data; plotting 10 year windows with 95% CI
Comparing each observation from one variable to few hundred thousand in anotherHi all, I am wondering if anyone has any ideas on how I can compare each observation from one varia…
Command to obtain effect sizes.Hello, I am running two models on a panel data of 50 firms over 15 years (one using the xtnbreg and …
Regular expression helpHello, Apologies for making a second regular expressions-related post today, but the topic is new t…
Analyzing length of stay in clustered data (back transform)Hello, I'm a relatively new Stata user and am working on a project. I'm looking at length of stay (…
Calculation of directly standardized rates "distrate" or "dstdize" commandsHello, First of all I dont know if this is the proper site to publish this, correct me if its not. …
Subscribe to:
Post Comments (Atom)
0 Response to Rolling regression with pooled time series data; plotting 10 year windows with 95% CI
Post a Comment