Hi Guys
I'm new here so please forgive me if I didn't create a perfect question.
My Data looks like this:
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(o1 o2 o3 id Indep-Var1 Indep-Var2 )
1 0 1 1 1 0
0 1 1 2 1 0
0 1 1 3 1 0
0 1 1 4 0 1
0 0 1 5 0 1
In this example I have 3 observations per subject (o1 o2 o3) and I was wondering how to create a new variable oit (where i is the subject and t is the corresponding number of the observation) so i can create a regression that looks like this:
reg oit Indep-Var1 Indep-Var2,r
cheers
I'm new here so please forgive me if I didn't create a perfect question.
My Data looks like this:
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(o1 o2 o3 id Indep-Var1 Indep-Var2 )
1 0 1 1 1 0
0 1 1 2 1 0
0 1 1 3 1 0
0 1 1 4 0 1
0 0 1 5 0 1
In this example I have 3 observations per subject (o1 o2 o3) and I was wondering how to create a new variable oit (where i is the subject and t is the corresponding number of the observation) so i can create a regression that looks like this:
reg oit Indep-Var1 Indep-Var2,r
cheers
Comment