On Fri, 24 Aug 2007, Franck Nadaud wrote: > I am currently working on AIDS models to be estimated as sytems. > So I use the command : > > system > ... > ... > end system > > with restrictions inside. However those restrictions imply a > singular covariance matrix. In other pacakges (SAS for example) > estimation is done by deleting one equation, and the missing > coefficient is recovered by the restrictions. > > I would like to know how GRETL handles such cases, and more > specifically whith which methods.
Gretl first estimates the unrestricted system, then estimates the restricted system. The method for the second step is to form augmented versions of the X and y matrices using R, R' and q, as in the representation of the restriction as Rb = q. Depending on whether an F-test or a likelihood ratio test is appropriate, we either save the original coefficient vector and covariance matrix (F-test) or the original log-likelihood. The procedure is found in plugin/sysest.c in the gretl source: the main driver is the function system_estimate(). See William Greene, Econometric Analysis, 4e, section 7.3, "The Restricted Least Squares Estimator". Note 7 on page 281 deals with the question of possible singularity of X'X, which doesn't matter so long as the restriction-augmented matrix is of full rank. Allin. > I would like to know if it is possible in system estimation to > recover all the coefficients and standards errors, because i > have to compute the AIDS elasticities. Right now, it's not. But I should add that. The question is, how should one define the matrix of coefficients for an arbitrary set of equations? Two possibilities occur to me: (a) Create a matrix with a column for each equation, and a number of rows equal to the maximum number of coefficients in any equation. For each column (equation) enter the coefficients in the order they're printed, starting from the top, and pad out the rest of the column with zeros if required. (b) More complicated: create an n x g zero matrix, where n is the total number of distinct variables appearing on the right hand side of *any* equation and g is the number of equations. Fill in the appropriate values. I'm inclined towards (a) but I'd welcome comments. Just to clarify, consider this example: open greene13_1.gdt system name=Grunfeld equation I_GE 0 F_GE C_GE equation I_WE 0 F_WE C_WE end system estimate Grunfeld method=sur Under method (a) the coefficient matrix would be 3 x 2, with no zero entries, while under method (b) it would be 5 x 2, with two blocks of zeros, since the variables on the right-hand sides of the two equations differ. Allin.
