我有这个数据集:
data flu;
input FluShotStatus age HealthAwareIndex gender;
datalines;
0 59 52 0
0 61 55 1
1 82 51 0
0 51 70 0
0 53 70 0
0 62 49 1
1 51 69 1
0 70 54 1
0 71 65 1
0 55 58 1
1 58 48 0
0 53 58 1
0 72 65 0
1 56 68 0
0 56 83 0
0 81 68 0
1 62 44 0
;
run;
我正在尝试从此数据集中生成多个不同的图。
首先,我想使用 ODS 为变量 Health Awareness Index 生成一个 QQ 图。我已经使用了这段代码,它可以满足我的需求,但我觉得它可能会更好:
ods graphics on;
proc univariate data=Measures;
var Length Width;
qqplot;
title ‘QQ Plot for Health Awareness Index’;
ods graphics off;
run;
接下来,我想使用 ODS 生成散点图,仅用于男性受试者的健康意识指数和年龄。我试过使用:
ods graphics on;
proc sgscatter data=flu;
plot HealthAwareIndex*weight
run;
ods graphics off;
我想知道该怎么做,但我不知道你将如何在一页上生成单独的直方图?非常适合 50 至 70 岁的男性。任何提示或帮助将不胜感激。