Visualizing time series data code extension

library tsmt;

//Load data
fname = getGAUSShome $+ "pkgs\\tsmt\\examples\\wpi1.dat";

//Load data
y = loadd(fname, "ln_wpi");

//Take first differences
y_diff = vmdiffmt(y, 1);

//Set up plot format
struct plotControl myplot;
myplot = plotGetDefaults("XY");

//Turn off grid
plotSetGrid(&myPlot, "off");

plotSetTitle(&myPlot, "U.S. World Price Index ",
               "Helvetica Neue", 18);

//Y-axis label
plotSetYLabel(&myPlot, "ln(wpi)",
                "Helvetica Neue", 14);

//Start Date
dtstart = 196001;

//Frequency (quarterly)
freq = 4;

plotlayout(2, 1, 1);

//Plot level data
plotTS(myPlot, dtstart, freq, y);

plotlayout(2, 1, 2);

//Change itle
plotSetTitle(&myPlot, "",
               "Helvetica Neue", 18);

//Change Y-axis label
plotSetYLabel(&myPlot, "First differences ln(wpi)",
                "Helvetica Neue", 14);

//Plot level data
plotTS(myPlot, dtstart, freq, y_diff);

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.


Thank you for your interest in the GAUSS family of products.

© Aptech Systems, Inc. All rights reserved.

Privacy Policy | Sitemap