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
Automating web downloads when 0 is included, an issue with forvalueThe blog post on the Stata Blog has helped me a lot in creating a loop to download folders at once (…
Piecewise multilevel modellingHi All, I am trying to do piecewise multilevel modelling for a continuous outcome (say pain score) a…
Reshaping Datastream DataHello community. first of all I would like to thank you for the inclusion in this really instructive…
Comparison of predicted values after OLS regressionDear all, I am interested in predicted values after an OLS regression. Moreover, I am curious how t…
How to run a Mantel-Haenszel for 2*j tableDear Users, I am looking at the impact of 4 different treatments on recovery (yes/no) using data fr…
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