{smcl} {* *! version 0.5.0 26May2009}{...} {cmd:help gcmodel}: Specify binary model for group comparisons \ 0.5.0 2009-05-26. {hline} {title:Title} {p2colset 5 18 18 2}{...} {p2col:{hi:gcmodel} {hline 2}}Specifies the independent (RHS) variables for the model; indicates the sample and method used for computing means used for predictions; and specifies other details about the model.{p_end} {p2colreset}{...} {title:Syntax} {p 4 10 2} {cmd:gcmodel} {rhs-varlist} {ifin} {cmd:,} [ {cmdab:lin:ear(}{it:variables}{cmd:)} {cmdab:squ:ared(}{it:variables}{cmd:)} {cmdab:cub:ed(}{it:variables}{cmd:)} {cmd:svy} {cmd:esample} {cmdab:dig:its(}{it:#}{cmd:)} {cmd:label(}{it:model-label}{cmd:)} {cmd:details} {cmd:reset} ] {synoptline} {p 4 4 2} 1. {it:rhs-varlist} list the non-group RHS variables used in the model.{p_end} {p 4 4 2} 2. The list does not include the group variables which are specified in {cmd:gcsetup}.{p_end} {p 4 4 2} 3. If the model includes linear and quadratic (and even cubic) variables (e.g., {cmd:age} and {cmd:agesqrd}), {it:rhs-varlist} should include the linear variables but {it:not} the squared or cubic variables. Those variables are only specified with the {cmd:squared} and {cmd:cubed} options. For example, {cmd:gcmodel x w q, linear(w q) squared(w2 q2) cubed(w3 q3)}. The squared and cubic terms must already be in the dataset.{p_end} {title:Description} {pstd} {opt gcmodel} specifies the RHS variables in the model, including options for indicating squared and cubed terms. The command generates variables that are interactions between the groups indicator variable created by {cmd:gcsetup} and the RHS variables. It also creates globals containing the RHS variables needed in an non-interactive model (i.e., group is only included as a dummy variable) and the interactive model (i.e., coefficients for all RHS variables can differ by group). These globals make it simpler to estimate the model. Globals are also created in which the RHS variables are set equal to the global means (both groups combined), the group 1 means, and the group 0 means. These can be used in {cmd:gcprvalue}. {title:Options} {phang} {opt digits()} is the number of decimal digits to include when creating strings to pass to {cmd:gcprvalue} as {cmd:x()} options. The default is 3. {phang} {opt label()} is a short string to label the current model. {phang} {opt esample} indicates that the current estimation should be used when computing means. {phang} {opt svy} indicates that survey means should be used. {phang} {opt details} produces details on the variables and global variables that are created. {phang} {opt reset} resets the globals to null strings. {p 2 2 2} Note on linear, squared, and cubed optons: these variables must already exist. The linear variables must be in the {it:varlist}. The squared and cubed should not be in the {it:varlist}. These options make it easier to specify values for predictions. For example, if {cmd:age} and {cmd:agesquared} are in the model, if you hold {cmd:age} at the mean, you want to hold {cmd:agesquared} at the square of the mean of {cmd:age} not at the mean of {cmd:agesquared}. {phang} {opt linear()} optionally lists variables from {it:varlist} that have squares and/or cubes in the model (e.g., {cmd:age}, {cmd:agesqrd}, {cmd:agecubd}). {phang} {opt squared()} lists variables that are the squares of the variables specified with the {cmd:linear()} option. {phang} {opt cubed()} lists variables that are the cubes of the variables specified with the {cmd:linear()} option. {title:Examples} {phang}{cmd:. gcmodel...}{p_end} {title:Saved globals and variables} {pstd} {synoptset 15 tabbed}{...} {p2col 5 15 19 2: Globals}{p_end} {synopt:{cmd:a}}...to be added{p_end} {synopt:{cmd:b}}...to be added{p_end} {p2col 5 15 19 2: Variables}{p_end} {synopt:{cmd:a}}...to be added{p_end} {synopt:{cmd:b}}...to be added{p_end} {p2colreset}{...} INCLUDE help gc_adofooter