Hello,
I am using the command coefplot and need to label the axis for an interaction between a time dummy and a continuous regressor. So the model looks like:
reghdfe ddebt i.period#c.shock, a(period state)
I want to label the interaction term i.period#c.shock but only using the date (i.e. the variable "period"), which is formatted as year-month (%tm).
I've read the post: https://www.statalist.org/forums/for...d-interactions
Based on that, I created a regular expression to rename the interaction coefficients as follows:
coefplot, keep(*.period#c.shock) vertical rename(^([0-9][0-9][0-9]).period#c.shock$ = \1, regex)
The problem is I get the labels in numeric format (650, 651), not in date format (2014m3, 2014m4). Is there a way to do it using the option coeflabels()? I couldn't find the way and I have many dates to do it manually.
Thanks for any help!
Mariela
Related Posts with Coefplot: Labelling interactions with a month-year date
DHS Data - Sample weights and stratification - Nigeria 2008 and 2018Dear all, Currently I am using DHS data in combination with Stata for the first time. I intend to e…
Graded fading of the background color using plotregion(color())Hello, I am using Stata 16.1 MP. I have the code and output for a simple injury risk (burden) matr…
Generating means for a region using only one observation per householdHi, I have a question regarding generating averages. I have one column with a unique Houshold ID fo…
Unit root in variablesFor my study I am writing a research paper for the first time and I seem to be having a problem with…
Main effect in logistic regression with interactionHello, I have a logistic regression model with interaction term (variable##sex). Variable is catego…
Subscribe to:
Post Comments (Atom)
0 Response to Coefplot: Labelling interactions with a month-year date
Post a Comment