**Have a Question?**

**Phone:** +1 (888) 427-9486

+1 (312) 257-3777

Contact Us

# SLR_PARAM

Calculates the OLS regression coefficients values.

## Syntax

**SLR**(

^{i}_PARAM**X**,

**Y**,

**Intercept**,

**Return_type**,

**Parameter Index**,

**Alpha**)

**X**

is the independent (aka explanatory or predictor) variable data array (one dimensional array of cells (e.g. rows or columns)).

**Y**

is the response or the dependent variable data array (one dimensional array of cells (e.g. rows or columns)).

**Intercept**

is the constant or the intercept value to fix (e.g. zero). If missing, an intercept will not be fixed and is computed normally.

**Return_type**

is a switch to select the return output (1 = P-value (default), 2 = test stats, 3 = test score, 4 = p-value, 5 = upper value, 6 = lower value).

Method | Description |
---|---|

1 | Mean Value |

2 | Standard Error |

3 | t-stat |

4 | p-value |

5 | Upper Limit |

6 | Lower Limit |

**Parameter Index**

is a switch to designate the target parameter (0 = intercept (default), 1 = explanatory variable).

Method | Description |
---|---|

0 | Intercept |

1 | Explanatory Variable |

**Alpha**

is the statistical significance of the test (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed.

## Remarks

- The underlying model is described here.
- The regression slope (i.e. ) is computed as follows:

And the intercept (i.e. ) is expressed as follows:

Where:

- is the number of observations.
- is the empirical sample average for the explanatory variable ().
- is the emprical sample average for the dependent variable ().

- The standard errors in the regression coefficients are expressed as follows:

Where:

- denotes the statistical variance.

- The sample data may include missing values.
- Each column in the input matrix corresponds to a separate variable.
- Each row in the input matrix corresponds to an observation.
- Observations (i.e. row) with missing values in X or Y are removed.
- The number of rows of the response variable (Y) must be equal to the number of rows of the explanatory variables (X).
- The SLR_PARAM function is available starting with version 1.60 APACHE.

## Examples

## References

- Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6
- Kenney, J. F. and Keeping, E. S. (1962) "Linear Regression and Correlation." Ch. 15 in Mathematics of Statistics, Pt. 1, 3rd ed. Princeton, NJ: Van Nostrand, pp. 252-285