StatBean Name: DensityTrace

Purpose: Estimates the probability density function for a single column of numeric data.

DataSource: Any.


Read/Write Properties
NameTypeDescriptionPossible ValuesDefault Value
columnNamesString arrayThe names of the columns (if more than one) to be analyzed.One or more strings.{""}
intervalWidthintPercentage of data used to estimate trace at each location.1-9940
methodStringType of method used to estimate the trace."Boxcar","Cosine""Cosine"
resolutionintFor continuous distributions, the number of points at which the function is calculated.50+300
tablewiseExclusionbooleanWhether all rows of the data table containing a missing value in any column should be excluded from the plot.true,falsefalse
xVariableNameStringThe name of the column with data values (if only one) to be plotted on the horizontal axis.Any string.""

Code Sample

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

//set the file name to be read
fileDataSource1.setFileName("c:\\statbeans\\samples\\cardata.txt");

//create a chart bean
DensityTrace densitytrace1 = new STATBEANS.DensityTrace();

//set the column to be plotted
densitytrace1.setXVariableName("horsepower");

//show the plot
add(densitytrace1);

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

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