help for lintrend

Assessing linear trends

lintrend yvar xvar
[if exp] [in range],
[groups(#)
round(#)
int]
[graph
proportion
noline
graph_options]

Description

lintrend examines the "linearity" assumption for an ordinal or interval X
variable against category means of a continuous outcome or the logodds of a
binary outcome; default prints means or logodds, and a test for linear trend
(based on linear or logistic regression); optionally a graph is printed of the
means (for a continuous Y) or logodds for a binary Y

Variables and options required

yvar is the dependent variable

xvar is the independent variable

Options required

groups(#) -- divides xvar into # categories of similar
sample size

round(#) -- rounds xvar to nearest #

interger -- xvar is ordinal or nominal; categories original
integer values

Options

graph -- Graphs result

Means of Y for continuous yvar

Logodds of Y for binary yvar

proportion -- Graphs proportions in addition to logodds

noline -- doesn't print regression line for mean or logodds plot

Examples

. lintrend died age, groups(8) graph

Calculates the proportions and logodds of dying by age in 8 categories
of similar sample size; graphs logodds of deaths by age category

. lintrend sbp age, groups(10) graph

Calculates mean systolic blood pressure for age in 10 categories of
similar sample size; graphs mean systolic blood pressure by age category

. lintrend chd chl, round(20) graph prop

Calculates the proportions and logodds of developing coronary heart
disease by cholesterol level in categories rounded to 20 unit increments
of cholesterol; two graphs: 1) proportions and 2) logodds

. lintrend chd ses3cat, integer

Calculates the proportion and logodds of developing coronary heart disease
by each of 3 integer categories (1,2,3) of socioeconomic status; no graph