If year=1,2,3,4; and prov=1,2,3,4,5,6,7. So how to calculate i*j, thanks a lot!
I run this,but it is wrong.
forvalues i=1/4 {
forvalues j=1/7 {
gen yearprov `i' `j'=year`i'*prov`j'
}
}
Related Posts with How to generate i*j by forvalues?
Merging two panel datasetI am facing problem to merge the individual data set e.g Dataset 1: prepaid data for location 1 has…
multiple regression when significant difference between groups within 1 regression?Hi there, I am studying the effect of becoming a parent on the earnings of fathers versus mothers. …
Putexcel, Save Multiple Tables into One ExcelHello everyone, I am a beginner in Stata and encountered a problem while using putexcel. I ran: bys…
Can someone help?! Can not get the mean of observations vertically! (with missing values)I have several financial metrics for about 60,000 stocks (+2.5M observations), and a sample of my Re…
How to draw Chinese map in stata?Dear statalisits, I recently puzzeled by using stata to draw Chinese map. "How to draw Chinese map i…
Subscribe to:
Post Comments (Atom)
0 Response to How to generate i*j by forvalues?
Post a Comment