Hello
I have a series of mortality data for 100 countries.
I have (clumsily) coded the following for the first country:
tssmooth ma Albania_5yrmortality_mean =yearly_mort_Albania, window(0 1 4)
gen ismiss = missing(yearly_mort_Albania)
replace Albania_5yrmean = . if ismiss > (4/5)
drop ismiss
is there a way to repeat this for all countries?
many thanks
Catherine
Related Posts with repeating a smoothing function in a time series
Cannot get options to work on graph twowayI'm using the following code to produce a bar chart with confidence intervals. If I drop the options…
Bulk reordering the name of variable conditional on it's formatI am currently cleaning survey data that contains 1000+ variables many of which need to be renamed b…
Exporting Stata Regression Results to LatexHi Everyone, I am using tex (online version) to present my work. I would like to export my stata-re…
"Un-panelling" of a datasetHi, To tell stata you're dealing with a panel data set you use the command 'xtset'. I've saved the …
Merge households and individuals datasetsI am using a dataset divided into several different files, some of those are at the household level …
Subscribe to:
Post Comments (Atom)
0 Response to repeating a smoothing function in a time series
Post a Comment