Hi, I am trying to generate the index "z" in Stata, so that Z has the same value for all Xs and Ys. For example:
x y z
1 1 1
1 2 1
1 3 1
2 4 2
2 5 3
2 6 3
4 7 4
5 2 1
6 3 1
7 8 5
Any help would be much appreciated. Thanks!
Related Posts with generating an index
Forvalues loop for the repeated variableHi, I have a question regarding the loop! I generated a variable and replaced it like this; gen t…
margins after gmm and count outcome variableHello Stata listers, I am regressing a count outcome variable on an interaction using GMM and do no…
Error with ICD10I am trying to work with the ICD codes in my data. I have several variables for primary and another …
eventdd matsortDear All, I need help with the eventdd command. When I type Code: xtset artist_name2 bdate2 ssc i…
If observations matches on two variables, but at least one has a value for a third variable, create a new variable with output 1Dear all, I have a dataset with the variables, bvdidnumber (companynumber), uniquecontactidentifier…
Subscribe to:
Post Comments (Atom)
0 Response to generating an index
Post a Comment