levelsof year, local(years)
egen flag = tag(id_job year)
gen stateratio = .
foreach y of local years {
summ occ if year == `y' & flag, meanonly
local odds = `r(mean)'*100
replace stateratio = `odds' if year == `y'
}
Related Posts with How to writing a code similar as the following code but by region?
Question on stcompetDear Statalisters, I have a question on the command stcompet. I am considering the entry into a ma…
Labelling values by importing information from .csv fileHello, We collected survey data on over 12,000 respondents across several hundred districts. The dis…
Collinarity in Fracreg analysis and collin commandDear statalisters, I am writing you because I am using fractional logistic regressions for my analy…
Problems with destring CIK numbersHi guys, In a dataset, I have rows with fyear (fiscal year) and CIK numbers, which are company iden…
Exporting sts list data?Hi, Does anyone know how to export sts list data using putdocx or other means -- without having to …
Subscribe to:
Post Comments (Atom)
0 Response to How to writing a code similar as the following code but by region?
Post a Comment