• NumXL shopping Cart
  •  
    NumXL for Microsoft Excel makes sense of time series analysis:

    • Build, validate, rank models, and forecast right in Excel
    • Keep the data, analysis and models linked together
    • Make and track changes instantly
    • Share your results by sending just one file

    >>Read More


    | Free Trial
  • Home
  • Products
  • Tips & Demos
  • Support
    • Documentation
    • Blog
    • FAQ
    • Library
    • Service Level Agreement
    • Thank you
    • Beta Program
    • Resources
  • About Us
  • Prices
  •  
     

    Have a Question?

    Phone: +1 (888) 427-9486
    +1 (312) 257-3777
    Contact Us

    Home >> Support >> Documentation >> NumXL >> Reference Manual >> Factor Analysis >> Multiple Linear Regression Models >> MLR_GOF

    MLR_GOF

    Calculates different measures for the regression goodness of fit (e.g. R^2).

    Syntax

    MLRi_GOF(X, Mask, Y, Intercept, Return_type)

    X
    is the independent (explanatory) variables data matrix, such that each column represents one variable.

    Mask
    is the boolean array to choose the explanatory variables in the model. If missing, all variables in X are included.

    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 a fitness measure (1 = R-Square (default), 2 = Adjusted R Square, 3 = RMSEi, 4 = LLFi, 5 = AICi, 6 = BICi/SICi).

    Method Description
    1 R-Square (Coefficient of determination)
    2 Adjusted R Square
    3 Regression Error (RMSE)
    4 log-likelyhood (LLF)
    5 Akaike-information criterion (AIC)
    6 Schwartz/Bayesian Information criterion (SBIC)

    Remarks

    1. The underlying model is described here.
    2. The coefficient of determination, denoted $ R^2 $ provides a measure of how well observed outcomes are replicated by the model.

      \[ R^2 = \frac{\mathrm{SSR}} {\mathrm{SST}} = 1 - \frac{\mathrm{SSE}} {\mathrm{SST}} \]
    3. The adjusted R-square (denoted $ \bar R^2 $) is an attempt to take account of the phenomenon of the $ R^2 $ automatically and spuriously increasing when extra explanatory variables are added to the model. The $ \bar R^2 $ adjusts for the number of explanatory terms in a model relative to the number of data points.

      \[ \bar R^2 = {1-(1-R^{2}){N-1 \over N-p-1}} = {R^{2}-(1-R^{2}){p \over N-p-1}} = 1 - \frac{\mathrm{SSE}/(N-p-1)}{\mathrm{SST}/(N-1)} \]

      Where:

      • $ p $ is the number of explanatory variables in the model.
      • $ N $ is the number of observations in the sample.
    4. The regression error is defined as the square root for the mean square error (RMSE):
      \[ \mathrm{RMSE} = \sqrt{\frac{SSE}{N-p-1}} \]

    5. The log likelihood of the regression is given as:

      \[ \mathrm{LLF}=-\frac{N}{2}\left(1+\ln(2\pi)+\ln\left(\frac{\mathrm{SSR}}{N} \right ) \right ) \]

      The Akaike and Schwarz/Bayesian information criterion are given as:

      \[ \mathrm{AIC}=-\frac{2\mathrm{LLF}}{N}+\frac{2(p+1)}{N} \]

      \[ \mathrm{BIC} = \mathrm{SIC}=-\frac{2\mathrm{LLF}}{N}+\frac{(p+1)\times\ln(p+1)}{N} \]
    6. The sample data may include missing values.
    7. Each column in the input matrix corresponds to a separate variable.
    8. Each row in the input matrix corresponds to an observation.
    9. Observations (i.e. row) with missing values in X or Y are removed.
    10. The number of rows of the response variable (Y) must be equal to the number of rows of the explanatory variables (X).
    11. The MLR_GOF 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

    External Links

    • Wikipedia - Linear regression
    • Wikipedia - Regression analysis
    • Wikipedia - Ordinary least squares

    ‹ MLR_FOREupMLR_PARAM ›

    • Download Sites - NumXL
    Try our full-featured product free for 14 days

    Download NumXL Free 30-day Trial

    Help desk

    Questions?
    Request a feature?
    Report an issue?

    » Go to your help desk «

    Or email us:
    support@numxl.com

    • NumXL 1.65 (HAMMOCK) Está Aquí!
      05/18/2017 - 21:31
    • NumXL 1.65 (HAMMOCK) is Here!
      05/18/2017 - 21:14
    • NumXL 1.64 (TURRET) is here
      12/25/2016 - 13:12

    ARIMA ARMA Forecast Getting Started goodness of fit LLF SARIMA scenario simulation statistical test tutorial user's guide
    more tags
     

    • Support
    • FAQ
    • Demos & Tutorials
    • Documentation
    • Help Desk

    • Resources
    • Order Help

    • About Spider
    • Contact Spider
    • Corporate Information
    • Legal Information
    • Partners

    Follow Us

    Contact | Glossary | Sitemap | Blog | Links
    © 2008-2018 Spider Financial | Disclaimer | Terms of Use | Privacy Policy | Trademarks & Copyrights