Hello, I am just starting to use Stata, so excuse me in advance if my question is a bit sketchy. I am using an annual database with a binary variable column "x"; I wish to create another column "y", which will take values 1 for the 10 previous years for which x is equal to 1. (e.g.: If x = 1 in 2011, then "y" will take values of 1 from 2001:2010). Thank you for your help.
Related Posts with Logical test involving two columns
Transposing date part into the rest of the panelHello all, I have a very big dataset, that I want to transpose it into a panel. The thing is, I hav…
Gradient code bugDear forum visitors! I got a problem, working with panel data and max likelihood model. Specificall…
Reverse Causality Test with Panel DataHi there, I was wondering if it was possible for some assistance on how to carry out a reverse caus…
Understanding command "fracreg" (fractional logistic regression)Hello everyone, I would like to apply a fractional logistic regression using the command "fracreg" …
Interpretation of ß coeffiicientsHello Statalist, this is my first post and I hope you can help me interpreting my regression coeffi…
Subscribe to:
Post Comments (Atom)
0 Response to Logical test involving two columns
Post a Comment