StatBean Name: PeriodogramPlot

Purpose: Plots a peridodogram or integreated periodogram for a time series.

DataSource: any.


Read/Write Properties
NameTypeDescriptionPossible ValuesDefault Value
integratedbooleanWhether to plot a cumulative periodogram.true,falsefalse
probabilityLimitsColorColorThe color of the probability limits.Any valid Color.Color.red
removeMeanbooleanWhether to subtract mean from time series before calculating periodogram.true,falsetrue
seasonalLengthintThe number of time periods comprising a season.1+1
showProbabilityLimitsbooleanWhether to display 95% and 99% Kolmogorov-Smirnov limits on an integrated plot.true,falsetrue
taperdoubleAmount of tapering to apply at each end of time series (as a percentage).0.0-50.00.0
timeSeriesVariableNameStringThe name of the column with data values to be plotted.Any string.""

Other Public Methods
NameDescriptionArgumentsReturn Value
double getCumulativeSum(int i)Returns the sum of the first i+1 ordinates.Index.Cumulative sum.
double getFrequency(int i)Returns the i-th Fourier frequency.Index.Frequency.
int getNumberOfMissingValuesReplaced()Returns the number of missing values replaced with estimates.None.Number replaced.
int getNumberOfOrdinates()Returns the number of ordinates (or frequencies).None.Number.
double getOrdinate(int i)Returns the periodogram ordinate at the i-th frequency.Index.Ordinate.
double getSum()Returns the sum all the ordinates.None.Sum.
int getSampleSize()Returns the number of data values used to obtain estimates.None.Sample size.


Code Sample

//create a datasource bean
FileDataSource fileDataSource1 = new STATBEANS.FileDataSource();

//set the file name to be read
fileDataSource1.setFileName("c:\\statbeans\\samples\\stocks.txt");
//create a plot bean

PeriodogramPlot plot1 = new STATBEANS.PeriodogramPlot();
//set the variable names for plotting

plot1.setTimeSeriesVariableName("price");

//add the plot to the application frame
add(plot1);

//make the plot bean a listener for changes in the FileDataSource bean
fileDataSource1.addDataChangeListener(plot1.listenerForDataChange);

//instruct the fileDataSource bean to read the file
fileDataSource1.readData();