{smcl} {* 4aug2009}{...} {cmd:help bivar} {hline} {title:Title} {pstd}{cmd:bivar} {hline 2} Bivariate associations {title:Syntax} {p 8 17 2} {cmdab:bivar} {varname} {it:modvarlist} {ifin} [{cmd:,} {cmdab:o:verall} {cmd:hi(}{it:pvalue}{cmd:)} {cmdab:m:oren} {cmdab:d:ecimal} {it:{help labelsopt:labels option}} {it:{help outopt:out option}} {opt store}] {pstd}Where {it:modvarlist} is a standard {varlist}, in which any or every element may have appended one of the following {bf:modifiers}: {p 8 8 2}{cmd:.cont}{break} {cmd:.cat}{break} {cmd:.catr}{break} {cmd:.catc}{break} {cmd:.di}[{it:expression}] {title:Description} {pstd}{cmd:bivar} displays a table of associations between {it:varname} and each variable of {it:modvarlist}. The details for each variable depend on whether it is continuous, dichotomous, or categorical. {pstd}For {cmd:cont}inuous variables, the mean and sd for each level of {it:varname} is shown, along with a p-value from a one-way anova. {pstd}For {cmd:di}chotomous variables, the percent "true" is shown, with a p-value from a chi-sqaured. By default, "true" is any value other than zero or missing; however, "true" can be defined in the attached {it:expression}. {pmore}If an {it:expression} is appended, nonzero, nonmissing values of {it:expression} will be treated as true. {it:expression} can include {cmd:#V} as a placeholder for the relevant variable. For example: {phang2}o-{space 2}{cmd:date.di!mi(#V)} will treat {cmd:date} as a dichotomous variable, with true defined as not missing. {phang2}o-{space 2}{cmd:likert.di#V>=3} will treat {cmd:likert} as a dichotomous variable, with true defined as {cmd:likert}>=3. {pstd}For {cmd:cat}egorical variables (including {cmd:catr} and {cmd:catc}) a sub-table is shown with a chi-squared for the sub-table. The percentages reported are determined by the {bf:modifier}/{bf:vtype}: {phang2}{cmd:cat} variables report the cell percent.{p_end} {phang2}{cmd:catr} variables report the row percent, and include an {cmd:->} arrow{p_end} {phang2}{cmd:catc} variables report the column percent, and include a {cmd:v} arrow. {pstd}There are three possibilities for determining how each variable will be treated: {phang}1. Variables that have a {bf:modifier} appended in the {cmd:bivar} command will be treated accordingly.{p_end} {phang}2. Variables with no modifiers, but which have had an equivalent {bf:vtype} (minus the {cmd:.}) assigned with a prior command, will use that {bf:vtype}.{p_end} {phang}3. Other variables will have a {bf:vtype} assigned as follows: {p 8 11 2}o- String variables will be assigned the {bf:vtype} {cmd:catc}{p_end} {p 8 11 2}o- Numeric variables whose only non-missing values are 0 and 1 will be assigned the {bf:vtype} {cmd:di}{p_end} {p 8 11 2}o- Remaining numeric variables that have a labeled non-missing value will be assigned the {bf:vtype} {cmd:catc}{p_end} {p 8 11 2}o- Remaining numeric variables will be assigned the {bf:vtype} {cmd:cont} {pstd}{bf:vtype}s assigned by the command will be stored with the dataset if the {opt store} option is specified. {pstd}{bf:vtype}s can also used to exclude variables from {cmd:bivar} output: A variable (with no {bf:modifier}) with a {bf:vtype} other than the six listed above is excluded from processing by {cmd:bivar}. For example, ID variables etc. could be assigned the {bf:vtype} {cmd:admin}. Any of those variables included in {it:modvarlist} would simply be skipped. {pstd}The comparison variable, {varname}, is also ignored in {it:modvarlist}, and so if appropriate {bf:vtypes} have been assigned, one can simply use {pstd}{cmd:. bivar} {it:varname} {cmd:*} {pstd}to get all and only the relevant bivariate statistics for the dataset. {title:Options} {dlgtab:Options} {phang}{cmdab:o:verall} adds a final column with the ovarall stats for each variable of {it:modvarlist}. {phang}{opt hi(pvalue)} will highlight p-values less than or equal to the value specified.{p_end} {phang}{cmdab:d:ecimal} will expand percentages to tenths of a percent. {phang}{cmdab:m:oren} (that's more N) will display the number of non-missing observations for every cell in the output table, rather than just for the rows and columns. {phang}{it:{help labelsopt:labels option}} specify variable and value labels {phang}{it:{help outopt:out option}} output style/destination {phang}{opt store} saves {bf:vtype}s with the dataset, for future use {title:Examples} {pstd}{cmd:.bivar gender age height weight1-weight5 bdate} {pstd}{cmd:.bivar gender age.cat weight*.cont, hi(.05)} {pstd}{cmd:.vtype admin fname lname ssn}{p_end} {pstd}{cmd:.bivar gender *}{p_end} {title:Also see} {p 4 13 2}Online: help for {help vtype} {pstd}Contact: {browse "mailto:elliott.lowy@va.gov":Elliott Lowy}