Grocer Function
NAME
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
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('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
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.
EXAMPLE
1) 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)
2) sur('y1=c1*x1+c2*x2','y2=c1*x1+c3*log(x4)','coeff=[c1,c2,c3]','itmax=20','noprint')
Example 1 is 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.
Example 2 makes use of all options. Note that the coefficient c1 is imposed to be the same in equations for y1 and y2.
AUTHOR
Eric Dubois 2002