Admin Production ni-theme
Current Publication

GaussFitInterval

LabWindows/CVI

GaussFitInterval

Advanced Analysis Library Only

AnalysisLibErrType GaussFitInterval (double arrayX[], double arrayY[], double weight[], ssize_t numberOfElements, int intervalType, double confidenceLevel, double amplitude, double center, double standardDeviation, double upperBound[], double lowerBound[], double *deltaAmplitude, double *deltaCenter, double *deltaDeviation);

Purpose

Calculates the confidence interval for the best Gaussian fitting function or the prediction interval for the observations. The confidence interval refers to the interval within which the actual function is expected to fall. The prediction interval refers to the interval within which the y values are expected to fall in repeated measurements.

Parameters

Input
Name Type Description
arrayX double [] The x value of the data set (x, y).
arrayY double [] The y value of the data set (x, y).
weight double [] The weight of each data point. If weight is NULL, the function assumes all the weights are 1.
numberOfElements ssize_t The length of arrayX, arrayY, and weight.
intervalType int The type of interval. intervalType must be one of the following values:
  • CONFIDENCE_INTVL (0)
  • PREDICTION_INTVL (1)
deltaAmplitude, deltaCenter, and deltaDeviation are not referenced if intervalType is PREDICTION_INTVL.
confidenceLevel double The level of certainty for the confidence interval or prediction interval. For the confidence interval, confidenceLevel specifies the probability that the actual function lies within the confidence interval. For the prediction interval, confidenceLevel specifies the probability that the arrayY values lie within the prediction interval in repeated measurements. confidenceLevel must be between 0 and 1.
amplitude double The amplitude of the fitted Gaussian model calculated using the Least Square method.
center double The center of the fitted Gaussian model calculated using the Least Square method.
standardDeviation double The standard deviation of the fitted Gaussian model calculated using the Least Square method.
Output
Name Type Description
upperBound double [] The upper bound of the confidence interval or prediction interval.
lowerBound double [] The lower bound of the confidence interval or prediction interval.
deltaAmplitude double The uncertainty radius of amplitude. deltaAmplitude is available only when intervalType is CONFIDENCE_INTVL.
deltaCenter double The uncertainty radius of center. deltaCenter is available only when intervalType is CONFIDENCE_INTVL.
deltaDeviation double The uncertainty radius of standardDeviation. deltaDeviation is available only when intervalType is CONFIDENCE_INTVL.

Return Value

Name Type Description
status AnalysisLibErrType A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 8.0 and later