.-
help for ^adjmean^                                         (STB-43: sg33.1)
.-

Adjusted means  (JMGarrett 02/04/98)
--------------

   ^adjmean^ yvar [^if^ exp]^, by(^xvar1 [xvar2]^)^ [^a^djust^(^covlist^) m^odel
                   ^l^evel^(^#^) g^raph ^b^ar graph_options]

^adjmean^ calculates and optionally graphs adjusted means and confidence
   intervals from linear regression estimates for one or two nominal X
   variables, adjusted for covariates.  If a second X is specified, means
   are calculated for all possible combinations of X categories, and an
   interaction effect is tested. Default shows estimated means and confidence
   intervals only. Optionally, model estimates and/or a graph may be displayed.
   Dummy variables are created for xvar1. The lowest dummy variable defaults
   to the reference group. If xvar2 is specified, dummy variables are created
   for it also, as well as interaction terms.

 
Variables and options required
------------------------------

    yvar -- dependent variable  (continuous)

    ^by(^xvar1^)^ -- nominal variable for categories of estimated means

    ^by(^xvar1 xvar2^)^ -- categories of all combinations of xvar1 and
                       xvar2; interaction between xvar1 and xvar2 tested 

        
Options allowed 
---------------

    ^adjust(^covlist^)^ -- any covariates (if none specified, unadjusted means
                       reported); Covariates are set to their mean, based on
                       observations used in the analysis, or can be set to user
                       specified values (e.g., age=50 gender=1).

    ^model^ -- shows linear regression table as well as estimated means

    ^level(^#^)^ -- specifies the confidence level, in percent, for calculation
                    of confidence intervals of the adjusted means (default=95%)

    ^graph^ -- if one X (xvar1), graphs means and confidence intervals; if
             both xvar1 and xvar2 specified, points graphed for each mean, but 
             confidence intervals are not graphed; xvar1 is used for the x-axis
             with separate points for categories of xvar2

    ^bar^ -- can be used with the ^graph^ option to display a bar graph instead
            of points  
    

Examples
--------

 . ^adjmean chol, by(race) adjust(sys age=50)^
        Calculates the mean cholesterol level by race category,
         adjusted for mean systolic blood pressure and age=50

 . ^adjmean chol, by(ses) adjust(sys age) model graph xlabel(1,2,3) ylabel^  
        Calculates the mean cholesterol by levels of socio-economic status,
        adjusted for systolic blood pressure and age; displays model and graph

 . ^adjmean sbp, by(gender race) adjust(age smoke etoh) level(90) ^
        Calculates the mean cholesterol for all combinations of gender
        (2 categories) and race (4 categories) for a total of 8 means, adjusted
        for age, smoking status, and alcohol consumption; tests for interaction
        between gender and race; 90% confidence intervals

 . ^adjmean sbp, by(race gender) adjust(age smoke etoh) graph bar ylabel^
        Calculates adjusted mean cholesterol for all combinations of gender
        and race; bar graph of means, race on the x-axis


Author
------

      Joanne M. Garrett
      University of North Carolina at Chapel Hill
      garrettj@@med.unc.edu


See also
--------

     STB:  STB-43 sg33.1, STB-24 sg33
