maxlikmtKernelDensity#

Purpose#

To compute kernel density estimate and plot for a given dataset using specified kernel types and parameters.

Format#

out = maxlikmtKernelDensity(dataset, c0)#
Parameters:
  • dataset (string) – Name of the GAUSS dataset.

  • c0 – Instance of maxlikmtKernelDensityControl structure with detailed configuration.

Returns:

out – An instance of the maxlikmtKernelDensityResults structure.

Example#

new;
library maxlikmt;

// Specify the dataset
dataset = getGAUSSHome("pkgs/maxlikmt/examples/maxlikmttobit.dat");

// Initialize the control structure with default settings
struct maxlikmtKernelDensityControl c0;
c0 = mlmtKernelDensityControlCreate();

// Customize the control structure
c0.varNames = "Y";
c0.Kernel = 1; // Use normal kernel
c0.NumPoints = 100;
c0.EndPoints = {-3 3};
c0.Smoothing = 0; // Let the function compute the smoothing coefficient

// Compute the kernel density estimate and plot
struct maxlikmtKernelDensityResults out;
out = maxlikmtKernelDensity(dataset, c0);

Remarks#

  • The function generates kernel density plots of the selected parameters using the specified configurations. This method is useful for visualizing the distribution of parameters or data points within a dataset.