Hi all,
I am trying to replicate results from https://data.princeton.edu/eco572/std, to calculate standardized mortality ratio by Indirect Standarization using istdize, lamentably this function give me a error: "using required".
Its possible get the same results with istdize??. Example of my do file is:
I know that istdize require a .dta file but I am confuse what kind of file input whit using whit this web example.
I tried with a direct Standarization but gave differents results:
Thanks in advance.
Rodrigo
I am trying to replicate results from https://data.princeton.edu/eco572/std, to calculate standardized mortality ratio by Indirect Standarization using istdize, lamentably this function give me a error: "using required".
Its possible get the same results with istdize??. Example of my do file is:
HTML Code:
clear all set more off infile str10 country str5 ageg pop deaths using https://data.princeton.edu/eco572/da...ston21long.dat gen rates = 1000 * deaths / pop bysort age (country): gen swrates = rates[2] tabstat swrates [fw=pop], by(country) quietly sum rates [fw=pop] if country == "Kazakhstan" scalar kzcmr = r(mean) quietly sum swrates [fw=pop] if country == "Kazakhstan" di "SMR = ", kzcmr/r(mean) SMR = 1.7671271 *here I tried to replicate but fail with it. istdize deaths pop ageg , by( country ) using required r(100);
I tried with a direct Standarization but gave differents results:
HTML Code:
dstdize deaths pop ageg , by( country ) Summary of Study Populations: country N Crude Adj_Rate Confidence Interval -------------------------------------------------------------------------- Kazakhsta 8698860 0.007423 0.010412 [ 0.010333, 0.010491] Sweden 4385469 0.010548 0.006328 [ 0.006270, 0.006385]
Thanks in advance.
Rodrigo
Comment