Is there a code with which i can replace certain areas of a larger code while only one line
For example, i have:
import excel "D_EU_Austria.xlsx", sheet("Price History")
gen D_EU_Austria = ln(Total_Return_Gross_Unh / Total_Return_Gross_Unh[_n-1])
keep D_EU_Austria Date
drop if D_EU_Austria == 0
drop if D_EU_Austria == .
save "D_EU_Austria.dta", replace
Can I replace every instance of D_EU_Austria in my code with something else by writing it only once? I have to repeat this entire code for 20 countries.
Thank you so much (first time poster)
Related Posts with Replacing pieces of code with one line
Analyze data on Continuous Glucose Monitoring or Flash Glucose Monitoring in various Diabetes TechnologiesHello Everyone, hope you all are safe and healthy I have been trying to analyze CGM/FGM data for t…
Sensitivity Check of Longitudinal MediationDear all, I run a linear model to test for a mediation (outcome and mediator are both metric, the t…
big panel data managementHi, I am struggling to manage my large panel dataset 300k observation over 36 months. I would be gra…
Include all contrasts of categorical IV in margins after mlogitHi! I would like to visualize all contrasts of a categorical IV in an mlogit model, but am stuck on…
Mediation analysis with 3 conditions categorical IVHello Statalist, I have some questions regarding to my mediation analysis as I'm very new to Stata…
Subscribe to:
Post Comments (Atom)
0 Response to Replacing pieces of code with one line
Post a Comment