
Figure 3.3b
Title:
Estimated prevalence of past-year hypertension and corresponding 95% confidence interval across age, separately by male (solid green line) and female (dashed purple line).
Syntax:
For generating a plot of the estimated odds of hypertension among male adults only:
Copy to Clipboard
1
%WeightedTVEM(
2
data = nesarc_chapter3a,
3
dist =binary,
4
cluster = caseid,
5
time = nage,
6
dv = highbp,
7
tvary_effect = int,
8
knots = 1,
9
weight=audweight,
10
domain = male,
11
which = 1);
For generating a plot of the estimated odds of hypertension among female adults only:
Copy to Clipboard
11
1
%WeightedTVEM(
2
data = nesarc_chapter3a,
3
dist =binary,
4
cluster = caseid,
5
time = nage,
6
dv = highbp,
7
tvary_effect = int,
8
knots = 1,
9
weight=audweight,
10
domain = male,
11
which = 0);
Equation:
Notes:
To export the male dataset into Excel for plotting purposes:
Copy to Clipboard
10
1
data highbp_male;
2
set tvem_1_plot_data_or;
3
mprop=exp_int/(1+exp_int);
4
mprop_l=exp_int_l/(1+exp_int_l);
5
mprop_u=exp_int_u/(1+exp_int_u);
6
run;
7
8
PROC EXPORT DATA=highbp_male DBMS=xlsx
9
OUTFILE="C:\FolderName\highbp_male.xlsx";
10
run;
To export the female dataset into Excel:
Copy to Clipboard
10
1
data highbp_female
2
set tvem_0_plot_data_or;
3
fprop=exp_int/(1+exp_int);
4
fprop_l=exp_int_l/(1+exp_int_l);
5
fprop_u=exp_int_u/(1+exp_int_u);
6
run;
7
8
PROC EXPORT DATA=highbp_female DBMS=xlsx
9
OUTFILE=”C:\FolderName\highbp_female.xlsx”
10
run;
Return to all Figures HERE.
Reprinted by permission from Springer Nature: Generalized Time-Varying Effect Models for Binary and Count Outcomes by Stephanie T. Lanza and Ashley N. Linden-Carmichael, 2021.