BKW influential observation diagnostics
[results]=dfbeta(y, arg1,...,argn)
* y = either an ols results tlist or a 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
* argi = an argument which can be:
- the string 'noprint' if the user doesn't want to print the results of the regression
or, and only if y is not an ols results tlist:
- a time series
- a real (nx1) vector
- a string equal to the name of a time series or a (nx1) real vector between quotes
- 'dropna' if the user wants to remove the NA values from the data
* results = a results tlist with
- results('meth') = 'dfbeta'
- results('nobs') = # of observations
- results('nvar') = # of variables in x-matrix
- results('dfbeta') = df betas
- results('dffits') = df fits
- results('hatdi') = hat-matrix diagonals
- results('stud') = studentized residuals
- result('namex') = name of the x variables
- result('namey') = name of the y variable
- result('prests') = boolean indicating the presence or absence of a time series in the regression
- result('dropna') = boolean indicating if NAs have been droped
- result('nonna') = vector indicating position of non-NAs (if the option 'dropna' was active)
exo = grand(100,6,'nor',0,1); exo(:,1) = ones(100,1); exo(:,3) = exo(:,2) + grand(100,1,'nor',0,1)*0.05; bet = ones(6,1); endo = exo*bet + grand(100,1,'nor',0,1); // now add a few outliers endo(50,1) = 10.0; endo(70,1) = -10.0; result = dfbeta('endo','exo'); // This example is taken from function dfbeta_d. The example provides dfbetas, dffits, // hat-matrix, studentized residuals for a regression whose endogenous variable is y // and exogenous variables is a matrix (as in dfbeta_d), a vector or a ts x. | ![]() | ![]() |