oph_gsl_fit_linear_coeff

Description

Behaviour

It computes the linear regression coefficients.

Parameters

  • input measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’.
  • output measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’.
  • measure: input measure.
  • dimension: input dimension; data type must be ‘oph_double’; by deafult, it is set to 1 (array length).
  • mask: indicates the best-fit linear regression coefficients to be extracted. Possible configurations are:
    • 000000: invalid;
    • 1xxxxx: intercept (‘c0’);
    • x1xxxx: slope (‘c1’) (default);
    • xx1xxx: term ‘cov00’ of covariance matrix;
    • xxx1xx: term ‘cov01’ of covariance matrix;
    • xxxx1x: term ‘cov11’ of covariance matrix;
    • xxxxx1: sum of squares of the residuals (‘sumsq’).

Return type

Binary-array.

Examples

Compute the slope of a time series.

oph_gsl_fit_linear_coeff('OPH_DOUBLE','OPH_DOUBLE',measure,dimension)

Operation type

Reduce.

Arguments

Argument name Type Mandatory Values Default Min/Max-value Min/Max-times
input measure type “oph_type” “yes” “‘oph_double’|’oph_float’|’oph_int’|’oph_long’|’oph_short’|’oph_byte’”     “1” / “1”
output measure type “oph_type” “yes” “‘oph_double’|’oph_float’|’oph_int’|’oph_long’|’oph_short’|’oph_byte’”     “1” / “1”
measure “binary-array” “yes”       “1” / “1”
dimension “binary-array” “no”   “1:array length”   “0” / “1”
mask “string” “no”   “010000”   “0” / “1”