```..-
help for ^grand^                               (statalist distribution 02feb199
> 8)
..-

Compute an estimate of the grand mean/intercept and differences from the grand
- -----------------------------------------------------------------------------
> -

^grand^ indicator_variable_list [^, l^evel^(^#^)^ ]

Description
- -----------

For use after ^fit^ to present a set of indicator/dummy variables in a "grand
mean" and difference from the "grand mean" form.  The specified list of
variables (indicator_variable_list) must be orthogonal and completely span the
space.  The model estimated by fit must include the complete list of indicator
variables that fully span space.  Use the ^hascons^ or ^nocons^ on ^fit^ to
allow the full set of indicators to be included in the model.

Note, -grand- cannot be used after -regress-, it requires some of the results
stored by -fit-.

Options
- -------

^level(^#^)^ specifies the confidence level, in percent, for confidence interva
> ls;
see help @level@.

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.3
> 6
Model |   212659562     5  42531912.4               Prob > F      =  0.0000
Residual |   364137397    63  5779958.68               R-squared     =  0.3687
- ---------+------------------------------               Adj R-squared =  0.318
> 6
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 -grand- command line.

. grand reprec*

Estimate of grand mean/intercept and marginal impacts
- -----------------------------------------------------------------------------
> -
price |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
- ---------+-------------------------------------------------------------------
> -
grand |   1944.728   763.6394      2.547   0.013       418.7167    3470.739
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
- -----------------------------------------------------------------------------
> -

Saved Results
- -------------
^S_E_b^    a matrix containing the grand mean and difference from the mean
estimates.
^S_E_se^   a matrix containing the standard errors of the estimates.

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@
```