Namespace Regression

namespace regression

Functions

void linear(af::array xss, af::array yss, af::array &slope, af::array &intercept, af::array &rvalue, af::array &pvalue, af::array &stderrest)

Calculate a linear least-squares regression for two sets of measurements. Both arrays should have the same length.

Parameters
  • xss: Expects an input array whose dimension zero is the length of the time series (all the same) and dimension one indicates the number of time series.
  • yss: Expects an input array whose dimension zero is the length of the time series (all the same) and dimension one indicates the number of time series.
  • slope: Slope of the regression line.
  • intercept: Intercept of the regression line.
  • rvalue: Correlation coefficient.
  • pvalue: Two-sided p-value for a hypothesis test whose null hypothesis is that the slope is zero, using Wald Test with t-distribution of the test statistic.
  • stderrest: Standard error of the estimated gradient.