I'm having trouble finding guidance on this. I want to create a dataset that has a variable called "location" and contains the values 1, 3, 4, 6, 7 with another variable called "action" that contains values1, 2, 3, 4, 5. I want my dataset to contain every combination of these, but I do not want to input manually. Any ideas?
location action
1 1
1 2
1 3
1 4
1 5
3 1
3 2
...
Related Posts with Create Dataset in Stata using a Loop
variable name abbreviation in generate/replace sequenceThere seems to be some inconsistency about how to abbreviate variable names. I would like to abbrevi…
landmark analysis differences between time-periodsHello everyone, I have a cohort with 1 group (no comparison group). I created a landmark analysis …
Lexis Diagram- Not able to make Parallelograms to show follow up of cohortDear Stata Users I am quite new to stata and using version 15.1 in mac. I have been trying to make L…
How to rename dummy variables based on category names?Hi, all. I have a data set with variable "town_id" indicating town id (such as 160, 155, 178, etc.)…
How can I covert Oaxaca-Decomposition coef. into an amount(dollar...)?I got the following results through oaxaca two-fold method. ---------------------------------------…
Subscribe to:
Post Comments (Atom)
0 Response to Create Dataset in Stata using a Loop
Post a Comment