I have been experiencing such an issue in terms of lagging variables of my dyadic unbalanced panel in Rstudio. Although the same command below worked out well before, now it gives back a variable with a different name but an identical value to the original one. As you can see, the difference is zero and when included in regressions, summary with/out lag are identical. Could you please check the formula and let me know if anything should be corrected to have a `(t-1)` lag?

FYI, I am encountering the same problem in terms of creating quantiles. I tried to create a variable that would be divided into quantiles, but it was not recognized by Rstudio while it is visible inside the data frame (lags are also there, but they are not useful either). Thanks in advance for your time! `

> my_data % arrange(HOME, YEAR) %>% group_by(HOME) %>% mutate( LAG_LPPPCONSTREP = lag(LPPPCONSTREP), LAG_POPGROWTHREP = lag(POPGROWTHREP) ) %>% ungroup() > summary(my_data$LPPPCONSTREP - my_data$LAG_LPPPCONSTREP) Min. 1st Qu. Median Mean 3rd Qu. Max. NA's 0 0 0 0 0 0 1210

More Nurlan Pashazade's questions See All
Similar questions and discussions