@@ 1976-1994 (lines=19) @@ | ||
1973 | } |
|
1974 | ||
1975 | $bestFitLinear = trendClass::calculate(trendClass::TREND_LINEAR,$yValues,$xValues,$const); |
|
1976 | if ($stats) { |
|
1977 | return array( array( $bestFitLinear->getSlope(), |
|
1978 | $bestFitLinear->getSlopeSE(), |
|
1979 | $bestFitLinear->getGoodnessOfFit(), |
|
1980 | $bestFitLinear->getF(), |
|
1981 | $bestFitLinear->getSSRegression(), |
|
1982 | ), |
|
1983 | array( $bestFitLinear->getIntersect(), |
|
1984 | $bestFitLinear->getIntersectSE(), |
|
1985 | $bestFitLinear->getStdevOfResiduals(), |
|
1986 | $bestFitLinear->getDFResiduals(), |
|
1987 | $bestFitLinear->getSSResiduals() |
|
1988 | ) |
|
1989 | ); |
|
1990 | } else { |
|
1991 | return array( $bestFitLinear->getSlope(), |
|
1992 | $bestFitLinear->getIntersect() |
|
1993 | ); |
|
1994 | } |
|
1995 | } // function LINEST() |
|
1996 | ||
1997 | ||
@@ 2035-2053 (lines=19) @@ | ||
2032 | } |
|
2033 | ||
2034 | $bestFitExponential = trendClass::calculate(trendClass::TREND_EXPONENTIAL,$yValues,$xValues,$const); |
|
2035 | if ($stats) { |
|
2036 | return array( array( $bestFitExponential->getSlope(), |
|
2037 | $bestFitExponential->getSlopeSE(), |
|
2038 | $bestFitExponential->getGoodnessOfFit(), |
|
2039 | $bestFitExponential->getF(), |
|
2040 | $bestFitExponential->getSSRegression(), |
|
2041 | ), |
|
2042 | array( $bestFitExponential->getIntersect(), |
|
2043 | $bestFitExponential->getIntersectSE(), |
|
2044 | $bestFitExponential->getStdevOfResiduals(), |
|
2045 | $bestFitExponential->getDFResiduals(), |
|
2046 | $bestFitExponential->getSSResiduals() |
|
2047 | ) |
|
2048 | ); |
|
2049 | } else { |
|
2050 | return array( $bestFitExponential->getSlope(), |
|
2051 | $bestFitExponential->getIntersect() |
|
2052 | ); |
|
2053 | } |
|
2054 | } // function LOGEST() |
|
2055 | ||
2056 |