Hi everyone,
I think my question is quite simple but I wasn't able to solve it.
I have a panel dataset with information on 280 housing units over 24 time periods (years). For every unit and period I have the monthly rent of the unit (rr) and a dummy called t_change, which takes on value 1 if a new tenant enters the unit during that year.
I want Stata to generate a variable reporting the difference between the rent paid by tenants who just entered the unit (so, the rent paid in years when t_change = 1) and the rent paid for the same unit in the year before (by the old tenant).
What is the easiest way to do this?
Aurora
Related Posts with Generating a variable reporting the difference between values of another variable considered in different years (Panel dataset)
Significant interaction term in fixed effects modelDear all, I am currently running linear fixed effects regression models (xtreg, fe vce(cluster id)) …
Removing observations based on a sequence of observations within a groupI have a panel data for stock returns, at the daily level, with the following variables: firm, year,…
Implications of a not positive (semi)definite tetrachoric correlation matrixHello, I am doing an Exploratory Factor Analysis on data from a 15-item questionnaire that contains …
Combining mi:passive with egen optionsHi All I've just imputed my dataset (in the wide format), and I would like to create a set of passi…
Running a regression for each year using prior 10 years of dataDear STATA Users, Please, correct me if I am wrong. I need to run a regression at the industry leve…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a variable reporting the difference between values of another variable considered in different years (Panel dataset)
Post a Comment