I have a sample dataset as follows:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte id str8 date byte month_num int year byte seq float(oc_per10000 ec_per10000) byte period 1 "Jan 2022" 1 2022 1 632.7574 4.2058268 0 1 "Feb 2022" 2 2022 2 572.58765 4.0631905 0 1 "Mar 2022" 3 2022 3 633.962 4.245679 0 1 "Apr 2022" 4 2022 4 605.58405 3.6853316 0 1 "May 2022" 5 2022 5 616.6671 4.1147165 0 1 "Jun 2022" . . . . . . 1 "Jul 2022" 7 2022 6 596.7175 5.263053 1 1 "Aug 2022" 8 2022 7 620.8705 5.038163 1 1 "Sep 2022" 9 2022 8 571.1929 4.3138437 1 1 "Oct 2022" 10 2022 9 577.1292 4.168524 1 1 "Nov 2022" 11 2022 10 560.5041 4.1477256 1 2 "Jan 2022" 1 2022 1 632.7574 4.2058268 0 2 "Feb 2022" 2 2022 2 572.58765 4.0631905 0 2 "Mar 2022" 3 2022 3 633.962 4.245679 0 2 "Apr 2022" 4 2022 4 605.58405 3.6853316 0 2 "May 2022" 5 2022 5 616.6671 4.1147165 0 2 "Jun 2022" . . . . . . 2 "Jul 2022" 7 2022 6 596.7175 5.263053 1 2 "Aug 2022" 8 2022 7 620.8705 5.038163 1 2 "Sep 2022" 9 2022 8 571.1929 4.3138437 1 2 "Oct 2022" 10 2022 9 577.1292 4.168524 1 2 "Nov 2022" 11 2022 10 560.5041 4.1477256 1 end
Code:
* Declare data to be time-series data tsset id monthly * sort by ID and time sort id monthly di monthly("2022m7","YM") *log for percentage point change; gen logec_per10000=ln(ec_per10000) gen logoc_per10000=ln(oc_per10000) *ITSA initial model; itsa ec_per10000, single treat(1) trperiod(750) posttrend replace *test for autocorrelation; actest ,lags(9) *ITSA final model; itsa ec_per10000, single treat(1) trperiod(750) posttrend replace force *ITSA Log; itsa logec_per10000, single treat(1) trperiod(750) posttrend fig replace force
- When you log transform the dependent variable, is taking the natural log the appropriate method?
- Do I have to further exponentiate the coefficients to interpret it as a monthly growth rate? (i.e., (exp(coef)-1)*100)?
0 Response to Interpreting Log transformed ITSA model
Post a Comment