Click or drag to resize

StatisticsProbabilityDensity Method

Estimates a probability density function using kernel density estimation.

Namespace: Altaxo.Calc.Probability
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public static StatisticsProbabilityDensityResult ProbabilityDensity(
	this IReadOnlyList<double> x,
	double bw,
	string bwSel,
	double adjust,
	StatisticsConvolutionKernel kernel,
	IReadOnlyList<double> weights,
	double width,
	string widthSel,
	int n,
	double from,
	double to,
	double cut
)

Parameters

x  IReadOnlyListDouble
The sample values.
bw  Double
The bandwidth. Use NaN to select it via bwSel / widthSel.
bwSel  String
Bandwidth selection rule (e.g. "nrd0", "nrd").
adjust  Double
Scaling factor applied to the bandwidth.
kernel  StatisticsConvolutionKernel
The kernel to use.
weights  IReadOnlyListDouble
Optional weights; if , equal weights are used.
width  Double
Kernel width (alternative to specifying bw directly). Use NaN if unused.
widthSel  String
Width selection rule (used when bw and width are unspecified).
n  Int32
Number of evaluation points.
from  Double
Lower bound of the evaluation interval. Use NaN to choose automatically.
to  Double
Upper bound of the evaluation interval. Use NaN to choose automatically.
cut  Double
Number of bandwidths to extend the range beyond the data extremes (default: 3).

Return Value

StatisticsProbabilityDensityResult
A StatisticsProbabilityDensityResult containing the evaluation points and density values.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IReadOnlyListDouble. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
Adapted from the R project (www.r-project.org), Version 2.72, file density.R.
See Also