# STEYX - script function

STEYX() returns the aggregated standard error of the predicted y-value for each x-value in the regression for a series of coordinates represented by paired numbers in x-expression and y-expression iterated over a number of records as defined by a group by clause.

Syntax:

STEYX (y-value, x-value)

Return data type: numeric

Arguments:

STEYX arguments

| Argument | Description |
| --- | --- |
| y\_value | The expression or field containing the range of y-values to be measured. |
| x\_value | The expression or field containing the range of x-values to be measured. |

Limitations:

Text values, NULL values and missing values in any or both pieces of a data-pair result in the entire data-pair being disregarded.

Examples and results:

Add the example script to your document and run it. Then add, at least, the fields listed in the results column to a sheet in your document to see the result.

Examples and results

| Example | Result |
| --- | --- |
| `Trend:`<br>`Load *, 1 as Grp;`<br>`LOAD  * inline [`<br>`Month\|KnownY\|KnownX`<br>`Jan\|2\|6`<br>`Feb\|3\|5`<br>`Mar\|9\|11`<br>`Apr\|6\|7`<br>`May\|8\|5`<br>`Jun\|7\|4`<br>`Jul\|5\|5`<br>`Aug\|10\|8`<br>`Sep\|9\|10`<br>`Oct\|12\|14`<br>`Nov\|15\|17`<br>`Dec\|14\|16`<br>`] (delimiter is '\|');` `STEYX1:``LOAD Grp,``  STEYX(KnownY, KnownX) as MySTEYX ``Resident Trend Group By Grp;` | In a table with the dimension `MySTEYX`, the result of the STEYX() calculation in the load script is 2.0714764. |