------------------------------------------------------------------------------- help forsvypxcon-------------------------------------------------------------------------------

Predicted means or proportions for a continuous X variable for survey data

svypxconyvar[ifexp] [inrange],xvar(xvar)from(#)to(#)inc(#)[adjust(covlist)poly(#)class(classvar)modelsubpop(subpop_spec)graphlevel(#)linearnolistsavepred(filename)graph_options]

Description

svypxconcalculates and prints predicted values and 95% confidence intervals for linear or logistic model estimates for a continuous X variable corrected for the survey sampling scheme (weights), adjusted for covariates. Default prints predicted values and confidence intervals; model estimates and graph can be shown. Optionally a quadradic or a quadratic and cubic term can be added to the model. An interaction between X and a nominal variable can be estimated and graphed. Dummy variables are created for the nominal variable with the lowest category defaulting to the reference group. (Updated for Version 9)

svypxconrequires that the survey design variables be identified using svyset

Variables and options required

yvaris the dependent variableIf

yvaris continuous, defaults to linear regressionIf

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

xvar(xvar)-- continuous independent variable (interval or ordinal)

from(#)-- bottom value forxvar

to(#)-- top value forxvar

inc(#)-- increment size between bottom and top values (defaults to 1)

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)

poly(2 or 3)-- polynomial terms added: 2=quadratic 3=quadradic and cubic

class(classvar)-- nominal variable for anxvarbyclassvarinteraction

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

graph-- displays graph of predicted values and 95% confidence intervals; ifclass()is requested, confidence intervals are not displayed

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

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

nolist-- does not print list of predicted values and 95% CIs

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

Examples

. svypxcon chol, xvar(age) from(20) to(80) inc(5) adjust(sys hra)Using linear regressin, calculates the predicted cholesterol values for 5-year increments of age from 20 years to 80 years (i.e., age=20,25,30,...,80) adjusted for systolic blood pressure and heart rate; displays predicted values, but does not display model or graph

. svypxcon chol, xvar(sys) f(60) t(280) i(20) adj(hra) graph class(race)Using linear regression, calculates the predicted cholesterol values for systolic blood pressure readings from 60 to 280 in 20mm/hg increments by categories of race, adjusted for heart rate; tests for an age by race interaction; displays graph and list of predicted values

. svypxcon htn, xvar(chol) f(100) t(300) i(20) class(race) graphUsing logistic regression, calculates the unadjusted probability of hypertension for cholesterol from 100 to 300 in 20-unit increments, by categories of race; displays test for interaction between cholesterol and race; graphs the results

. svypxcon htn, xvar(age) f(40) t(80) poly(3) adj(chol=250) graphUsing logistic regression, calculates the probabilitity of hypertension for 1-yr increments of age; terms for age-squared and age-cubed included in model using the poly(3) option; also adjusted to a cholesterol level of 250; displays graph

Author

J.M.Garrett, Professor, School of Medicine, University of North Carolina, Chapel Hill, NC. Email: joanne_garrett@med.unc.edu