How to graph two time series with different frequent?
How to graph two time series with different frequent?
Dear Tom:
How to graph two time series with different frequent? Firstly, we have quarterly GDP. Secondly, The series was rearranged, so it can be read into the monthly frame with data only for the final month of each quarter i.e. data is placed in March, June, September, and December respectively. We use @disaggregate procedure to get monthly GDP. We want to plot quarterly GDP in line merely with 3,6,9,12 months. How can we compare them in a same graph or special graph (spgraph)?
Best Regard
Hardmann
How to graph two time series with different frequent? Firstly, we have quarterly GDP. Secondly, The series was rearranged, so it can be read into the monthly frame with data only for the final month of each quarter i.e. data is placed in March, June, September, and December respectively. We use @disaggregate procedure to get monthly GDP. We want to plot quarterly GDP in line merely with 3,6,9,12 months. How can we compare them in a same graph or special graph (spgraph)?
Best Regard
Hardmann
- Attachments
-
- disaggregate qgdp into mgdp.RPF
- (3.19 KiB) Downloaded 908 times
-
- US_mGDP_2021Q4.xlsx
- (50.27 KiB) Downloaded 926 times
Re: How to graph two time series with different frequent?
Probably the best thing to do is use the DOTS style for an overlay:
graph(overlay=dots,ovsamescale) 2
# monthly
# quarterly
graph(overlay=dots,ovsamescale) 2
# monthly
# quarterly
Re: How to graph two time series with different frequent?
Dear Tom:
Sorry, it doesn't work.
Hardmann
Sorry, it doesn't work.
Hardmann
Re: How to graph two time series with different frequent?
Works fine in you restrict the range. If you graph the entire range, the series are so close together that the graphs won't be clearly different.
graph(overlay=dots,ovsamescale) 2
# mgdp_rw1 2010:1 2015:4
# gdp 2010:1 2015:4
graph(overlay=dots,ovsamescale) 2
# mgdp_rw1 2010:1 2015:4
# gdp 2010:1 2015:4
Re: How to graph two time series with different frequent?
Dear Tom:
Yes, I do. In my code, I use
GRAPH(STYLE=LINE,OVERLAY=dot,ovsamescale,KEY=BELOW) 2
# MGDP 1947:01 1950:12
# GDP 1947:01 1950:12
In fact, I want to get two lines., graph attached is done by MS EXCEL.
I want to graph directly by Rats.
Best Regard
Hardmann
Yes, I do. In my code, I use
GRAPH(STYLE=LINE,OVERLAY=dot,ovsamescale,KEY=BELOW) 2
# MGDP 1947:01 1950:12
# GDP 1947:01 1950:12
In fact, I want to get two lines., graph attached is done by MS EXCEL.
I want to graph directly by Rats.
Best Regard
Hardmann
- Attachments
-
- BC Q&M.png (538.33 KiB) Viewed 35985 times
Re: How to graph two time series with different frequent?
If you do lines, it will do ---- lines in connecting the quarterly numbers. I'm really not sure why you would want to do lines connecting the quarterly numbers. You've gone to considerable effort to come up with a monthly distribution of the GDP numbers and then you want to show them the same way as a strictly artificial linear interpolation.
Re: How to graph two time series with different frequent?
Dear Tom:
Thanks.
Hardmann
Thanks.
Hardmann