I want to generate a variable 'wave' to identify each wave in the dataset. I have the responding person identifier, but no year variable and so I need to create a wave variable to xtset (tsset) my panel (e.g. id, wave). I've searched throughout Statalist and elsewhere with no luck to date.
Can anyone kindly steer me in the right direction with the code please?
Related Posts with Generating a wave (time) variable in a panel data set
can we generate 0,1 and missing values simutaneously? Code: gen A = B==0 & C==1 replace A = . if B== .| C==. In other words, can we simplify the two …
Obtain new variable after 3 consecutive signals and generate new values after 6 and 8 periodsHi! With the variable buy_signal I've created buy signals. I have the following rule after which I w…
Bayesian regression analysis with sampling weightHi all Does anyone know if I could do Bayesian regression analysis with sampling weight? I have got …
r(1400) after meglmHi together, I tried to use meglm models according to this tutorial: https://stats.idre.ucla.edu/st…
cluster on firm or two-way level?Hello all, If the model is y_it = x1_it + x2_it + x3_t + e_it, which means there is a time-serial v…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a wave (time) variable in a panel data set
Post a Comment