My dataset comes from a survey with 5 waves that has a general score (variable GScore). I am trying to do the following:
1) I am trying to generate a new variables that shows the General Score increase from each wave to the next (so that a decrease in scores will be a negative value). What code would work best for this? I am currently trying to use the following unsuccessfully:
bysort id: gen GScore_increase = GScore - GScore[_n-1]
2) What code would calculate the overall mean increase (or potential decrease) in the GScore across all waves for all participants?
3) Is there an efficient code I could use to determine how many participants decreased or maintained the same GScore across all waves (i.e. how many never increased their Gscore across all the waves)?
Related Posts with Generating Variable That Depicts Increase
Paneldata regression with a loopDear all, I am using Stata MP 16.1. For my masterthesis I want to obtain elasticities for sector x …
Unique IDs by monthHi everyone, I have three variables of my interest for my microdata: consumer IDs, month, card type…
Generate date variable from string monthly dataDear all, I have my date variable in the following string format 201501, 201502, 201503, etc.. I wo…
Standard errors calculation: Correlated random effects models with unbalanced panels by Wooldridge (2019)Dear all, I want to estimate the Correlated random effects models with unbalanced panels proposed b…
Question about Heterogeneous (and possible cross correlated) Dynamic Narrow PanelDear Statalist colleagues, I am working with a narrow panel dataset (N <10, T = 30), where I fin…
Subscribe to:
Post Comments (Atom)
0 Response to Generating Variable That Depicts Increase
Post a Comment