.-
help for ^prstar^ - 11/26/00
.-

Setting values for independent variables for ^prchange^, ^prgen^, ^prtab^, and
^prvalue^
    
The commands ^prchange^, ^prgen^, ^prtab^, and ^prvalue^ compute predicted values 
based on specific values of the independent variables. For these commands, 
the values of the independent variables are set using the ^x()^, ^rest()^, and 
^all^ options. This entry provides a detailed description of how to use these 
options to set the values for the independent variables for any of these 
commands.

Options to set values of independent variables
----------------------------------------------
    
^x(^variable1 value1 ...^)^ assigns value1 to variable1, value2 to variable2, 
    and so on. You can assign values to as many or as few variables as you 
    want. The assigned value is either a specific number (e.g., female 1) or
    a mnemonic specifying a descriptive statistic (e.g., phd mean to set 
    variable phd to the sample mean; pub3 max to assign pub3 to the maximum 
    value in the sample). The available descriptive statistics are presented 
    below. Only numeric values can be used if a group statistic has been 
    specified with ^rest()^.
    
^rest(^stat^)^ sets the values of all variables not specified in ^x()^ to 
    the sample statistic indicated by stat. If ^x()^ is not specified, all 
    variables are set to stat, e.g., rest(mean) sets all variables to 
    their mean. The choices for stat can be unconditional or conditional on a
    group specified by ^x()^. For example, ^x(female 0) rest(grmean)^ sets 
    female to 0 and all other variables to the their mean for those where 
    female is 0. If ^rest()^ is not specified, it is assumed to be ^rest(mean)^. 
    The available types of ^stat^ are:
    
        ^mean^, ^median^, ^min^, and ^max^ refer to the mean, median, minimum, 
            and maximum, conditional on any ^if^ or ^in^ conditions that are 
            specified. Descriptive statistics are calculated using the 
            estimation sample unless the ^all^ option has been specified, in 
            which case all observations in memory are used.
    
        ^previous^ refers to the most recently used values.
    
        ^upper^ and ^lower^ can only be used with binary models, and refer to 
            the values of the independent variables that yield either the 
            highest (^upper^) or lowest (^lower^) probability of a positive 
            outcome.
    
        ^grmean^, ^grmedian^, ^grmin^, ^grmax^ refer to the group mean, median, 
            minimum, and maximum. These statistics are calculated for 
            whatever group of observations is specified in ^x()^. For example, 
            ^prvalue, x(male 0 white 0) rest(grmean)^ calculates predicted 
            probabilities where male and white are held to 0 and the other 
            independent variables are held to the means of the observations 
            in which male==0 and white==0. This is the same as typing 
            ^prvalue if male==0 & white==0, x(male 0 white 0) rest(mean)^.
    
^all^ specifies that all observations in memory are to be used to calculate 
    descriptive statistics, excepting cases excluded by ^if^ or ^in^ conditions
    or the use of ^rest(^gr*^)^. The default is to use only the cases in the 
    estimation sample.

Examples
--------

To set all independent variables to mean    

^. prvalue^

To set male to 0, ed to 12, age to 30, and hold all other independent 
variables to their means:

^. prvalue, x(male 0 ed 12 age 30) rest(mean)^

To set age to 40, while male stays at 0 and ed stays at 12:

^. prvalue, x(age 40) rest(previous)^

To set male to 0, and hold all other values to the mean for males:

^. prvalue, x(male 0) rest(grmean)^

To set male to 0, age to median, all other independent variables to the mean:

^. prvalue, x(male 0 age median) rest(mean)^

To compute means using the full sample instead of the estimation sample:

^. prvalue, x(male 0 age median) rest(mean) all^

.-
Authors: J. Scott Long and Jeremy Freese
         www.indiana.edu/~jslsoc/spost.htm
         spostsup@@indiana.edu
         
         