maximum likelihood estimation of an autocorrelated model
[result]=olsar1(namey,arg1,...,argn)
* argi = an argument 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 elements
- the string 'noprint' if the user doesn't want to display the results of the regression
* arg1,...,argn = arguments which can be:
- 'optfunc=optim' if the user wants to use the optim optimisation function (default: optimg)
- 'opt_nelmead=crit,nitermax' with crit the value of the convergence criterion in the Nelder-Meade optimisation function and nitermax the maximum number of iterations (default = 'opt_nelmead=2*%eps,1000')
- 'opt_optim=opts' where opts are options for optim that can be entered after the starting value of the parameters (default = 'opt_optim=,''ar'',1e6,1e6'')
- 'opt_optim_ineq=opts' where opts are inequality options for the parameters (default = ',''b'',[-1+%eps ; -%inf*ones(nvar,1)] ,[1-%eps ; %inf*ones(nvar,1)]')
- 'opt_convg=val' where val is the threshold on gradient norm (default = 'opt_convg=1e-5')
* rolsar1 = a results tlist with
- rolsar1('meth') = ' ar(1) maximum likelihood'
- rolsar1('y') = y data vector
- rolsar1('x') = x data matrix
- rolsar1('nobs') = # observations
- rolsar1('nvar') = # variables
- rolsar1('beta') = bhat
- rolsar1('yhat') = yhat
- rolsar1('resid') = residuals
- rolsar1('vcovar') = estimated variance-covariance matrix of beta
- rolsar1('sige') = estimated variance of the residuals
- rolsar1('sigu') = sum of squared residuals
- rolsar1('ser') = standard error of the regression
- rolsar1('tstat') = t-stats
- rolsar1('pvalue') = pvalue of the betas
- rolsar1('dw') = Durbin-Watson Statistic
- rolsar1('condindex') = multicolinearity cond index
- rolsar1('prescte') = boolean indicating the presence or absence of a constant in the regression
- rolsar1('rsqr') = rsquared
- rolsar1('rbar') = rbar-squared
- rolsar1('f') = F-stat for the nullity of coefficients other than the constant
- rolsar1('pvaluef') = its significance level
- rolsar1('prests') = boolean indicating the presence or absence of a time series in the regression
- rolsar1('namey') = name of the y variable
- rolsar1('namex') = name of the x variables
- rolsar1('bounds') = if there is a timeseries in the regression, the bounds of the regression
- rolsar1('rho') = estimated first order autocorrelation of residuals
- rolsar1('trho') = its Student t
- rolsar1('like') = log-likelihood of the regression
load('grocer/bdexamples/bdhenderic.dat') ; bounds('1964q3','1989q2') ; rolsar1=olsc('del(lm1-lp)','del(lp)','rnet','lagts(1,lm1-lp-ly)','cte') // example, taken from olsar1_d, shows the estimation of first order autocorrelated model on Hendry and Ericsson (1991) preferred specification // from which the variable 'del(lagts(1,lm1-lp-ly))' has been withdrawn. | ![]() | ![]() |