Previous: Multivariate models: Bivariate Normal | Up: Writing New Models | Next: The Intuitive Layout |
Most statistical methods relate explanatory variables 69#69 to a dependent variable of interest 102#102 for each observation 70#70 . Let 12#12 be a set of parameters that correspond to each column in 53#53 , which is an 7#7 matrix with rows 69#69 . For a single equation model, the linear predictor is
103#103 |
For a two equation model such as bivariate probit, the linear predictor becomes a matrix with columns corresponding to each dependent variable 107#107 :
108#108 |
In addition, the way in which 104#104 is created also affects the way parameters are estimated. Let's say that you want two parameters to have the same effect in different equations. By setting up 53#53 and 12#12 in a certain way, you can let users set constraints across parameters. Continuing the bivariate probit example above, let the model specification be:
formulae <- list(mu1 = y1 ~ x1 + x2 + tag(x3, "land"), mu2 = y2 ~ x3 + tag(x4, "land"))where tag() is a special function that constrains variables to have the same effect across equations. Thus, the coefficient for x3 in equation mu1 is constrained to be equal to the coefficient for x4 in equation mu2, and this effect is identified as the ``land'' effect in both equations. In order to consider constraints across equations, the structure of both 53#53 and 12#12 matter.