------------------------------------------------------------------------------- help forsvypxcat-------------------------------------------------------------------------------

Predicted means or proportions for nominal X's for survey data

svypxcatyvar[ifexp] [inrange],xvar(xvar1[xvar2])[adjust(covlist)modelsubpop(subpop_spec)level(#)lineargraphbarsavepred(filename)graph_options]

Description

svypxcatrequires that the survey design variables be identified using svyset

svypxcatcalculates and optionally graphs means from linear regression models or proportions from logistic regression models corrected for the survey sampling scheme (weights) for one or two nominal X variables, adjusted for covariates. If a second X is specified, means or proportions are calculated for all possible combinations of X categories, and an interaction effect is tested. Optionally, model estimates and/or a graph may be displayed. Dummy variables are created forxvar1. The lowest dummy variable defaults to the reference group. Ifxvar2is specified, dummy variables are created for it, as well as interaction terms. (Updated for Version 9)

Variables and options required

yvaris the dependent variableIf

yvaris continuous, defaults to linear regressionIf

yvaris binary (0,1), defaults to logistic regression

xvar(xvar1)is the nominal variable for categories of estimated means or proportions

xvar(xvar1 xvar2)gives categories of all combinations ofxvar1andxvar2; interaction betweenxvar1andxvar2is tested (Partial F for linear regression or Wald test for logistic regression)

Options

adjust(covlist)lists any covariates. If none are specified, unadjusted means or proportions are 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). (Note: if anadjustvariable is nominal with more than 2 categories, it must be defined with dummy variables in theadjustlist, whereas dummy variables are created automatically in thexvaroption)

model-- for display purposes only, this option prints the regression table

subpop(subpop_spec)-- specifies that estimates be computed for the single subpopulation identified insubpop_spec

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

graph-- if one X (xvar1), graphs means or proportions and confidence intervals; if bothxvar1andxvar2are specified, points are graphed for each mean or proportion, but confidence intervals are not graphed;xvar1is used for the x-axis with separate points for categories ofxvar2

bar-- can be used with thegraphoption to display a bar graph instead of points

linear-- requests linear regression whenyvaris binary (0,1); if not specified, logistic regression is assumed

savepred(filename)-- saves adjusted values and CI's to a Stata file

Examples

. svypxcat chol, xvar(race) adjust(sbp age=50) modelUses linear regression to calculate mean cholesterol level by race category, adjusted for mean sbp and age=50

. svypxcat chol, xvar(ses) adjust(sbp age) graphUses linear regression to calculate mean cholesterol by levels of socio-economic status, adjusted for sbp and age; displays graph

. svypxcat htn, xvar(gender race) adjust(age smoke etoh)Uses logistic regression to calculate proportion of hypertensives for all combinations of gender (2 categories) and race (4 categories) for a total of 8 proportions, adjusted for age, smoking status, and alcohol consumption; tests for interaction between gender and race

. svypxcat htn, xvar(race gender) adjust(age smoke etoh) graph barUses logistic regression to calculate the adjusted proportion of hypertensives for all combinations of gender and race; bar graph of proportions, race on the x-axis

Also seeManual:

[U] 30 Overview of survey estimation,[SVY] intro,[SVY] svyOnline: help for predxcat (if loaded), svy

Author

J.M.Garrett, Professor, School of Medicine, University of North Carolina,