<< explosys Multivariate regressions syslist >>

Grocer >> Multivariate regressions > sur

sur

Zellner Seemingly Unrelated Regression

CALLING SEQUENCE

rsur=sur(arg1,...,argn)

PARAMETERS

Input

* argi = arguments which can be:

  - equations written 'vary=coef1*varx1+...+coefi*varxi' where:

    . coefi = the name of a coefficient

    . varxi = the name of a variable

  - 'coef=xx' where xx is a vector of coefficients names

  - 'niter=x' where x is the max # iterations authorized (optional; default =100)

  - 'crit=x' where x is the convergence criterion

  - the string 'noprint' if the user doesn't want to print the results of the regression

  - 'unequal' if the equations do not all cover the entered the time span given by the bounds (so, the user must have bounds by the use of the function bounds) and the user wants to estimate all equations over the largest time span included in the one covered by the bounds

  - the string 'dropna' if the user wants to remove the NA values from the data

  - the string 'dropna' if the user wants to remove the NA values from the data

 

Output

* rsur = a results tlist with:

  - rsur('meth') = 'sur'

  - rsur('nobs') = # of observations

  - rsur('neqs') = # of estimated equations

  - rsur('ncoef') = # of estimated coefficients

  - rsur('beta') = bhat

  - rsur('tstat') = t-stats

  - rsur('pvalue') = pvalue of the betas

  - rsur('sigma') = covariance matrix of the residuals

  - rsur('sigu') = (1 x neqs) sum of squared residuals

  - rsur('sigu') = (1 x neqs) sum of squared residuals

  - rsur('dw') = (1 x neqs) Durbin-Watson

  - rsur('prests') = boolean indicating the presence or absence of a time series in the regression

  - rsur('dropna') = boolean indicating if NAs have been dropped

  - rsur('namecoef') = (ncoef x 1) mame of the coeffcients

  - rsur('namey') = name of endogenous variables

  - rsur('eqs') = list of the neqs equations

  - rsur('coefs') = list of the coefs names in each equation

  - rsur('bounds') = if any, the bounds of the equations:

    . a string vector if the bounds are common to all equations (option 'unequal' not given)

    . a list of string vectors if the bounds are specific to each equation (option 'unequal' given)

  - rsur('nonna') = vector indicating position of non-NAs

DESCRIPTION

Computes Zellner Seemingly Unrelated Regression. Some coefficients can be commun to several equations.There can be spaces in the text of the equations. If you want to introduce a constant in your equation, you can omit the '*varxi' in the text of the equation. The exogenous variable can be expressed anyway. The only constraint is that the model must be linear in its coefficients. The standard procedure assumes that the "panel" is balanced (all equations cover the same period) and, if there are time series and the bounds are not given, the function determines the largest time span for which all series exist. The user can however estimate the equations on an unbalanced panel: in that case, she must give bounds with the function bounds and enter the option 'unequal'.

EXAMPLE

load(GROCERDIR+'/data/grun.dat')
// grunfeld investment data
// see page 650, Green 1997
 
ige  = grun(:,1); // general electric
fge = grun(:,2);
cge = grun(:,3);
 
iwest  = grun(:,4); // westinghouse
fwest = grun(:,5);
cwest = grun(:,6);
 
igm  = grun(:,7); // general motors
fgm = grun(:,8);
cgm = grun(:,9);
 
ich  = grun(:,10); // chrysler
fch = grun(:,11);
cch = grun(:,12);
 
iuss  = grun(:,13); // us steel
fuss = grun(:,14);
cuss = grun(:,15);
 
 
eq1='igm=a1*fgm+a2*cgm+a3'
eq2='ich=a4*fch+a5*cch+a6'
eq3='ige=a7*fge+a8*cge+a9'
eq4='iwest=a10*fwest+a11*cwest+a12'
eq5='iuss=a13*fuss+a14*cuss+a15'
 
eq1='igm=a1*fgm+a2*cgm+a3';
eq2='ich=a4*fch+a5*cch+a6';
eq3='ige=a7*fge+a8*cge+a9';
eq4='iwest=a10*fwest+a11*cwest+a12';
eq5='iuss=a13*fuss+a14*cuss+a15';
r=sur(eq1,eq2,eq3,eq4,eq5)
// Example taken from function sur_d. Here coefficients names are a1 to a15 and are not given as input of the function.
// # of iterations is set to default. Results are printed.
sur('igm=c1*fgm+c2*cgm+c3','ich=c1*fch+c4*cch+c5','ige=c6*fge+c7*cge+c8','namecoef='+joinstr('c',string([1:8]),','),'itmax=20','noprint')
// Example 2 makes use of options on itmax and on the name of the coefficients.
// Note that the coefficient c1 is imposed to be the same in equations 1 and 2.

AUTHOR

Eric Dubois 2002-2007

Report an issue
<< explosys Multivariate regressions syslist >>