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)
IV ordered probit using CMP (syntax help)Hi There, I am estimating the causal effect of maternal education on child health. My dependent var…
Series 0 not found using grc1leg2Dear all, I am using Stata 14 on Windows 10. The following code is supposed to create a combined gra…
Reshape data in order to calculate gini coefficient panel data using income groupsDear Statalist, I'm trying to calculate the Gini of counties using the the population of 20+ income…
Difference in Consecutive Values by Group LabelsDear Statalisters, I need to generate another variable called 'difference' which contains the differ…
outreg2 keep option does not workHello, I am in desperate need for some help for my thesis regarding Stata. I would like to make us…
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