Hello,

I need to store values after the reshape wide command, such that I can use them in the forvalues loop.

That is, I have managed to extract the number of X_ij variables using the code below:

Code:
. char list _dta[ReS_Xij_n]
  _dta[ReS_Xij_n]:            3
How do I then insert this value (3) in the forvalues loop?

forvalues i=1(1)_dta[ReS_Xij_n] does not work and I could not find a solution so far. I tried doing it through scalar x=_dta[ReS_Xij_n], but this returns me _dta not found.