Home > Output

Chapter 7: Comparing two groups using SAS

Figure 7.1 Histogram of two groups on one graph

Figure 7.1 Histogram of two groups on one graph

Figure 7.1 Code

Code for figure 7.1

Click here to show code as text

Figure 7.2 Two pannel or overlapping density plots for two groups

Figure 7.2 Density plot of two groups on one graph

Figure 7.2 Code

Code for figure 7.2

Click here to show code as text

Figure 7.3 Box and whisker plot for a continuous variable in two groups

Figure 7.3 Box and whisker plot for a continuous variable in two groups

Figure 7.3 Code

Code for figure 7.3

Click here to show code as text

Figure 7.4 Violin plot for a continuous variable comparing two groups

Figure 7.4 violin plot for a continuous variable in two groups

Figure 7.4 Code

Code for figure 7.4

Click here to show code as text

Figure 7.5 Dot plot for a continuous variable comparing two groups

Figure 7.5 Scatterplot for a continuous variable comparing two groups

Figure 7.5 Code

Code for figure 7.5

Click here to show code as text

Figure 7.6 Histogram of a variable to check for normality

Figure 7.6 Code

Code for figure 7.6

Click here to show code as text

Figure 7.7 Output for an unpaired t-test

Figure 7.7 Code

Code for figure 7.7

Click here to show code as text

Figure 7.8 Histograms of a skewed variable before and after log transformation

Figure 7.8 Code

Code for figure 7.8

Click here to show code as text

Figure 7.9 Output for back transforming t-test data

Box 7.4 Presenting the findings of a t-test on log-transformed data

Figure 7.9 Code and Box 7.4

Code for figure 7.9

Click here to show code as text

Figure 7.10 Table of data for and output from a Mann-Whitney U test

Figure 7.10 Code

Code for figure 7.10

Click here to show code as text

Figure 7.11 Output for chi-square test relative risk and risk difference

Figure 7.11 Code

Code for figure 7.11

Click here to show code as text

Figure 7.12 Output for odds ratio

Figure 7.12 Code

Code for figure 7.12

Click here to show code as text

Table 7.1 Presenting ordered proportions

Box 7.12 Code

Code for box 7.12

Click here to show code as text