ridge regression
[rridge]=ridge(namey, arg1,...,argn)
* grocer_namey = a time series, a real (nx1) vector or a string equal to the name of a time series or a (nx1) real vector between quotes; all values should be 0 or 1.
* argi = an argument which can be:
* argi = arguments which can be:
- a time series
- a real (nx1) vector
- a real (nxk) matrix
- a string equal to the name of a time series or a (nxk) real vector or matrix between quotes
- a list of such elemnts
- the string 'noprint' if the user doesn't want to display the results of the regression
- the string 'theta=xx' if the user wants to enter theta's value (default is the one recommended by Hoerl and Kennard)
* rridge = a tlist with
- rridge('meth') = 'ridge'
- rridge('y') = y data vector
- rridge('x') = x data matrix
- rridge('nobs') = nobs
- rridge('nvar') = nvars
- rridge('beta') = bhat
- rridge('yhat') = yhat
- rridge('resid') = residuals
- rridge('vcovar') = estimated variance-covariance matrix of beta
- rridge('sige') = estimated variance of the residuals
- rridge('sige') = estimated variance of the residuals
- rridge('ser') = standard error of the regression
- rridge('tstat') = t-stats
- rridge('pvalue') = pvalue of the betas
- rridge('dw') = Durbin-Watson Statistic
- rridge('prescte') = boolean indicating the presence or absence of a constant in the regression
- rridge('rsqr') = rsquared
- rridge('rbar') = rbar-squared
- rridge('f') = F-stat for the nullity of coefficients other than the constant
- rridge('pvaluef') = its significance level
- rridge('prescte') = boolean indicating the presence or absence of a time series in the regression
- rridge('namey') = name of the y variable
- rridge('namex') = name of the x variables
- rridge('bounds') = if there is a timeseries in the regression, the bounds of the regression
- rridge('theta') = the scale factor theta
load('grocer/bdexamples/bdhenderic.dat') ; bounds('1964q3','1989q2') ; r= ridge('del(lm1-lp)','del(lp)','del(lagts(1,lm1-lp-ly))','rnet','lagts(1,lm1-lp-ly)','cte') r = ridge('del(lm1-lp)','del(lp)','del(lagts(1,lm1-lp-ly))','rnet','lagts(1,lm1-lp-ly)','cte', 'theta=0.001') // These examples shows the results of a ridge regression on Hendry and Ericsson's preferred regression, // using for theta the default parameter in example 1 and 0.001 in example 2. | ![]() | ![]() |