Previously, Nick Cox kindly introduces the mipolate and its applications at https://www.statalist.org/forums/for...-interpolation
I follow his guidance and try to convert monthly to daily frequency, but it does properly process what I expect because my codes on daily parts are somewhat odd. Could you please advise me on how to fix the line? Thank you.
clear all
// Import Daily data
input str11 sdate GNP(%)
date TNA
2019-12-31 0.743
2020-01-31 1.037
2020-02-29 1.37
2020-03-31 1.923
2020-04-30 3.132
2020-05-31 3.593
2020-06-30 4.401
2020-07-31 6.694
2020-08-31 7.213
2020-09-30 7.952
2020-10-31 11.893
2020-11-30 16.556
2020-12-31 37.326
2021-01-31 56.148
2021-02-28 71.492
2021-03-31 74.326
2021-04-30 85.461
2021-05-31 98.696
2021-06-30 94.388
2021-07-31 106.678
2021-08-31 126.547
2021-09-30 126.002
2021-10-31 151.083
2021-11-30 153.071
2021-12-31 130.322
2022-01-31 98.111
end
generate mdate = monthly(sdate, "YMD")
format mdate %tm
generate ddate = day(dofc(mdate))
tsset ddate
format ddate %td
tsfill
sort ddate
I follow his guidance and try to convert monthly to daily frequency, but it does properly process what I expect because my codes on daily parts are somewhat odd. Could you please advise me on how to fix the line? Thank you.
clear all
// Import Daily data
input str11 sdate GNP(%)
date TNA
2019-12-31 0.743
2020-01-31 1.037
2020-02-29 1.37
2020-03-31 1.923
2020-04-30 3.132
2020-05-31 3.593
2020-06-30 4.401
2020-07-31 6.694
2020-08-31 7.213
2020-09-30 7.952
2020-10-31 11.893
2020-11-30 16.556
2020-12-31 37.326
2021-01-31 56.148
2021-02-28 71.492
2021-03-31 74.326
2021-04-30 85.461
2021-05-31 98.696
2021-06-30 94.388
2021-07-31 106.678
2021-08-31 126.547
2021-09-30 126.002
2021-10-31 151.083
2021-11-30 153.071
2021-12-31 130.322
2022-01-31 98.111
end
generate mdate = monthly(sdate, "YMD")
format mdate %tm
generate ddate = day(dofc(mdate))
tsset ddate
format ddate %td
tsfill
sort ddate

Comment