.-
help for ^regpred^
.-

Linear regression predictions (Joanne M. Garrett 05/08/98) -----------------------------

^regpred^ yvar xvar [^if^ exp]^,^ [^f^rom^(^#^) t^o^(^#^) i^nc^(^#^) cl^ass^ > (^classvar^)^ ^p^oly^(^#^) adj^ust^(^covlist^) m^odel ^gr^aph ^nol^ist ^l^evel^(^#^)^ graph_options]

^regpred^ calculates and prints predicted values and 95% confidence intervals from linear regression estimates for a continuous X variable, adjusted for covariates. Default prints predicted values and confidence intervals; model estimates and graph can be shown. Optionally a quadratic 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.

Variables and options required ------------------------------

yvar -- dependent variable (continuous) xvar -- continuous independent variable (interval or ordinal) ^f^rom^(^#^)^ -- bottom value for xvar ^t^o^(^#^)^ -- top value for xvar ^i^nc^(^#^)^ -- increment size between bottom and top values (defaults to 1 > )

Options allowed ---------------

^cl^ass^(^classvar^)^ -- nominal variable for a xvar by classvar interactio > n ^p^oly^(^2 or 3^)^ -- polynomial terms added: 2=quadratic 3=quadratic and c > ubic (will not work with the class option) ^adj^ust^(^covlist^)^ -- any covariates (if none specified, unadjusted estimates reported); Covariates 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) ^m^odel -- displays the regression table ^gr^aph -- displays graph of predicted values and 95% confidence intervals; if class is requested, confidence intervals are not displayed ^nol^ist -- does not print list of predicted values and 95% CIs ^l^evel^(^#^)^ -- specifies the confidence level, in percent, for calculati > on of confidence intervals (default=95%)

Examples --------

. ^regpred chol age, from(20) to(80) inc(5) adj(sys hra) model^

Calculates the predicted cholestorol 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 model and predicted values, but does not display graph

. ^regpred chol sys, f(60) t(300) i(20) adj(age hra) graph ylab xlab^

Calculates the predicted cholestorol values for systolic blood pressure readings from 60 to 300 in 20 mm/hg increments, adjusted for age and heart rate; displays graph and list of predicted values

. ^regpred chol sys, f(60) t(300) i(20) adj(age hra) class(race) graph^

Calculates the predicted cholestorol values for systolic blood pressure readings from 60 to 300 in 20 mm/hg increments, adjusted for age and heart rate, by categories of race; displays an F test for interaction; graphs the results

. ^regpred chol age, f(40) t(80) poly(3) adj(sys=180) graph xlab ylab nolist^

Calculates the predicted cholestorol values for 1 year increments of age; terms for age-squared and age-cubed included in model using the poly(3) option; also adjusted for systolic blood pressure of 180; displays graph; does not list predicted values and CIs

Note ---- Covariates are set to their mean based on observations used in the analysis