Hello, I am new to Stata's syntax and cannot figure out the syntax to do what I would like:
Let's say that my chart looks like:
var1 var2 var3
1.3 4.5 3.3 (row 1)
3.3 2.3 3.6 (row 2)
4.5 1.1 2.2 (row 3)
I would like to run a command that I wrote but for all values except each row (that is, I would like to run my program with just row 2+3, 1+3, and 1+2 to give 3 different outputs).
I was wondering how I can make a for loop from say i= 1 to # of rows and within the for loop:
delete row[i]
run the program, give output
insert row[i]
I cannot seem to find anything online that seems to fit. Thank you very much!
Let's say that my chart looks like:
var1 var2 var3
1.3 4.5 3.3 (row 1)
3.3 2.3 3.6 (row 2)
4.5 1.1 2.2 (row 3)
I would like to run a command that I wrote but for all values except each row (that is, I would like to run my program with just row 2+3, 1+3, and 1+2 to give 3 different outputs).
I was wondering how I can make a for loop from say i= 1 to # of rows and within the for loop:
delete row[i]
run the program, give output
insert row[i]
I cannot seem to find anything online that seems to fit. Thank you very much!
Comment