.- help for ^grand2^ (statalist distribution 14sep1998) .- Compute an estimate of the grand mean/intercept and differences from the grand ------------------------------------------------------------------------------- ^grand2^ indicator_variable_list [^, l^evel^(^#^)^ ] ^grand2^ typed without arguments redisplays the prior estimates. Description ------------ For use after @fit@ to present a set of indicator/dummy variables in the form of a "grand mean" and differences from the "grand mean". The specified list of variables (indicator_variable_list) must be orthogonal and completely span the space. The model estimated by @fit@ must also include the complete list of indicator variables that fully span the space. Use the ^hascons^ option on @fit@ to allow the full set of indicators to be included in the model. Note: ^grand2^ cannot be used after @regress@, it requires some of the results stored by @fit@. Options -------- ^level(^#^)^ specifies the confidence level, in percent, for confidence intervals; see help @level@. Technical Notes ---------------- ^grand2^ recasts the full parameter and variance estimates from the prior @fit@ and saves the result as the current estimates. In this sense, ^grand2^ acts like an estimator. The coefficients, standard errors, and matrices may be accessed in the same way as any estimator (See [U] 26 Estimation and post-estimation commands). Specifically, @test@ may be used to perform tests with the grand mean and differences. If estimates in the original space are required, the ^fit^ command must be reissued. The grand mean is presented as the coefficient on _cons. This method is used so that @predict@ will produce expected results after the estimates have been transformed by ^grand2^. Example -------- Using the auto data, generate a full set of mutually exclusive indicators for repair record. ^. tab rep78, gen(reprec)^ Repair | Record 1978 | Freq. Percent Cum. -------------+----------------------------------- 1 | 2 2.90 2.90 2 | 8 11.59 14.49 3 | 30 43.48 57.97 4 | 18 26.09 84.06 5 | 11 15.94 100.00 -------------+----------------------------------- Total | 69 100.00 Estimate the full model using -fit- with the -hascons- option. ^. fit price displ reprec*, hascons^ Source | SS df MS Number of obs = 69 ----------+------------------------------ F( 5, 63) = 7.36 Model | 212659562 5 42531912.4 Prob > F = 0.0000 Residual | 364137397 63 5779958.68 R-squared = 0.3687 ----------+------------------------------ Adj R-squared = 0.3186 Total | 576796959 68 8482308.22 Root MSE = 2404.2 ------------------------------------------------------------------------------- price | Coef. Std. Err. t P>|t| [95% Conf. Interval] ----------+-------------------------------------------------------------------- displ | 21.21876 3.569023 5.945 0.000 14.08664 28.35089 reprec1 | 511.7159 1831.576 0.279 0.781 -3148.397 4171.829 reprec2 | 827.3793 1212.444 0.682 0.497 -1595.497 3250.255 reprec3 | 1548.21 930.9655 1.663 0.101 -312.1759 3408.596 reprec4 | 2276.878 853.5133 2.668 0.010 571.2674 3982.488 reprec5 | 3555.788 826.2275 4.304 0.000 1904.704 5206.872 ------------------------------------------------------------------------------- Obtain the grand means and marginal differences by specifying the full set of orthogonal indicators on the ^grand2^ command line. ^. grand2 reprec*^ Estimates as grand mean/intercept and marginal impacts ------------------------------------------------------------------------------- price | Coef. Std. Err. t P>|t| [95% Conf. Interval] ----------+-------------------------------------------------------------------- displ | 21.21876 3.569023 5.945 0.000 14.08664 28.35089 reprec1 | -1433.012 1675.361 -0.855 0.396 -4780.955 1914.93 reprec2 | -1117.349 814.6588 -1.372 0.175 -2745.314 510.6168 reprec3 | -396.5179 349.24 -1.135 0.261 -1094.418 301.3826 reprec4 | 332.1495 491.956 0.675 0.502 -650.9461 1315.245 reprec5 | 1611.06 733.4134 2.197 0.032 145.4504 3076.67 _cons | 1944.728 763.6394 2.547 0.013 418.7167 3470.739 ------------------------------------------------------------------------------- Note: The grand mean is the coefficient of _cons Perform a test in the new coefficient space. ^. test _cons + reprec1 + reprec4 = 0^ ( 1) reprec1 + reprec4 + _cons = 0.0 F( 1, 63) = 0.21 Prob > F = 0.6457 Author ------- Vince Wiggins StataCorp. vwiggins@@stata.com Also see --------- Manual: ^[U] 26 Estimation and post-estimation commands^ On-line: help for @lincom@, @predict@, @test@, @testnl@