Page 1 of 1
How to graph two time series with different frequent?
Posted: Tue Feb 01, 2022 8:04 pm
by hardmann
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
Re: How to graph two time series with different frequent?
Posted: Wed Feb 02, 2022 7:54 am
by TomDoan
Probably the best thing to do is use the DOTS style for an overlay:
graph(overlay=dots,ovsamescale) 2
# monthly
# quarterly
Re: How to graph two time series with different frequent?
Posted: Sat Feb 05, 2022 6:30 am
by hardmann
Dear Tom:
Sorry, it doesn't work.
Hardmann
Re: How to graph two time series with different frequent?
Posted: Sat Feb 05, 2022 12:37 pm
by TomDoan
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
Re: How to graph two time series with different frequent?
Posted: Sat Feb 05, 2022 5:07 pm
by hardmann
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
Re: How to graph two time series with different frequent?
Posted: Sat Feb 05, 2022 7:50 pm
by TomDoan
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?
Posted: Wed Feb 09, 2022 8:55 am
by hardmann
Dear Tom:
Thanks.
Hardmann