Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php
public static function STEYX($yValues, $xValues)
    {
        if (!self::checkTrendArrays($yValues, $xValues)) {
            return Functions::VALUE();
        }
        $yValueCount = count($yValues);
        $xValueCount = count($xValues);

        if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
            return Functions::NA();
        } elseif ($yValueCount == 1) {
            return Functions::DIV0();
        }

        $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);

        return $bestFitLinear->getStdevOfResiduals();
    }
public static function STEYX($yValues, $xValues)
    {
        if (!self::checkTrendArrays($yValues, $xValues)) {
            return Functions::VALUE();
        }
        $yValueCount = count($yValues);
        $xValueCount = count($xValues);

        if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
            return Functions::NA();
        } elseif ($yValueCount == 1) {
            return Functions::DIV0();
        }

        $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);

        return $bestFitLinear->getStdevOfResiduals();
    }
public static function STEYX ( $ yValues , $ xValues ) { if ( ! self :: checkTrendArrays ( $ yValues , $ xValues ) ) { return Functions :: VALUE ( ) ; } $ yValueCount = count ( $ yValues ) ; $ xValueCount = count ( $ xValues ) ; if ( ( $ yValueCount == 0 ) || ( $ yValueCount != $ xValueCount ) ) { return Functions :: NA ( ) ; } elseif ( $ yValueCount == 1 ) { return Functions :: DIV0 ( ) ; } $ bestFitLinear = Trend :: calculate ( Trend :: TREND_LINEAR , $ yValues , $ xValues ) ; return $ bestFitLinear -> getStdevOfResiduals ( ) ; }
STEYX.

Returns the standard error of the predicted y-value for each x in the regression.

@param mixed[] $yValues Data Series Y
@param mixed[] $xValues Data Series X

@return float
STEYX .