Previous: Easy Ways to Manage Up: Easy Ways to Manage Next: The Computationally-Efficient Layout

The Intuitive Layout

A stacked matrix of 53#53 and vector 12#12 is probably the most visually intuitive configuration. Let 93#93 be the number of equations in the bivariate probit model, and let 110#110 be the total number of unique covariates in both equations. Choosing model.matrix(..., shape = "stacked") yields a 111#111 matrix of explanatory variables. Again, let 112#112 be an 106#106 vector representing variable x1, 113#113 x2, and so forth. Then

114#114    

Correspondingly, 12#12 is a vector with elements

115#115    

where 116#116 are the intercept terms for equation 117#117 . Since 53#53 is 118#118 and 12#12 is 119#119 , the resulting linear predictor 104#104 is also stacked into a 120#120 matrix. Although difficult to manipulate (since observations are indexed by 4#4 and 121#121 for each 70#70 rather than just 4#4 ), it is easy to see that we have turned the two equations into one big 53#53 matrix and one long vector 12#12 , which is directly analogous to the familiar single-equation 104#104 .



Gary King 2011-11-29