Presentation is loading. Please wait.

Presentation is loading. Please wait.

Exercise 1 (a): producing individual tables, using the cross-tabs menu

Similar presentations


Presentation on theme: "Exercise 1 (a): producing individual tables, using the cross-tabs menu"— Presentation transcript:

1 Exercise 1 (a): producing individual tables, using the cross-tabs menu
Choosing the right test solutions Exercise 1 (a): producing individual tables, using the cross-tabs menu

2 Exercise 1 (a): using Custom Tables
Analyse  Tables  Custom tables Drag Biopsy to the columns field Drag Smoking, HPV16 and HPV18 to the rows. Note that you need to add HPV16 and HPV18 underneath smoking, otherwise subsets them

3 Exercise 1 (a): using Custom Tables
To compare between the different outcome groups it is useful to display the percentages in the different levels of the potential explanatory groups (Smoking, HPV16 & HPV18): Click on BIOPSY to highlight this variable In the bottom left of the dialogue box click on Summary Statistics As you are interested in comparing between Biopsy groups, click on the box to the left of Column Percent to see the options, then select Column N % and move it to the Display field on the right Click on Apply to Selection and Close Back in the Custom Tables main dialogue box, click on OK to obtain the table

4 Exercise 1 (a): using Custom Tables

5 Exercise 1 (a): Graphs Graphs  Legacy Dialogue  Stacked Barchart…
Note: Once you obtain your graph, you can edit it by double clicking on it to open the Chart Editor dialogue box. To get the stacks to represent %’s summed to 100%, click on the image on the top right: Can also change the colours of the bars and font size etc

6 Exercise 1 (a): Graphs

7 Exercise 1 (a): Summary Overall the percentages in each smoking category are broadly similar between the two biopsy groups. This pattern is also reflected in the percentages in the HPV18 groups with almost all patients being negative for HPV18 infection in both biopsy groups. However, marked differences are noticeable for HPV16 infection with 11% in the abnormal biopsy group testing positive for HPV16 infection, compared to less than 1% in the normal biopsy group. Note that there is a great deal of missing data on smoking status, with 65% of individuals having missing data (432/664)

8 Exercise 1 (b): Chi-squared test
Both the outcome (Biopsy status) and infection types (HPV16 & HPV18) are categorical. To see if HPV infection and Biopsy status are related we use a Chi-squared test (provided the assumptions are met). If it is not met, use Fisher’s exact test HPV16 results: A chi-squared test was carried out to examine whether there was a relationship between HPV16 infection and biopsy result. The result was statistically significant at the 5% level (p< 0.001) indicating that there was strong evidence of a relationship: Less than 1% on individuals in the normal biopsy group had a HPV16 infection compared to over 11% in the abnormal biopsy group

9 Exercise 1 (b): Chi-squared test
HPV18 results: As more than 25% of cell counts were less than 5, the assumptions underlying the chi-squared test were not valid. Thus Fishers exact test was carried out to examine the relationship between HPV18 infection and biopsy result. The result was not statistically significant at the 5% level (p=0.183) indicating a lack of evidence of a relationship between HPV18 infection and biopsy result. For both groups the HPV18 infection rate was low (0.5% in the normal group and 2% in the abnormal biopsy group).

10 Exercise 2: Machines As measured here, the time to error is continuous and the standard method for comparing outcomes between two groups for a continuous outcome is the t-test. Examining the histograms of the time to error for the two machines we can see that the data are highly skewed. Thus one of the key assumptions underlying the t-test is violated and to compare differences between the groups we should use the Mann-Whitney U test

11 Exercise 2: Machines A Mann-Whitney U test was conducted to examine whether there was a difference in the distribution of the time to error between two machines. The p-value was indicating that there was a statistically significant difference in the distribution of the time to error between the two machines. Machine one had a median time to error of 2.34 days and machine 2 had a median time of 4.58 days

12 Exercise 3: Is there a relationship between age and bone density?
Categorised age and categorised bone density Both variables are categorical and to investigate a relationship between the two, we can use a chi-squared test (Note: if the assumptions don’t hold then we use Fisher’s exact test). The results of the chi-squared test are statistically significant (p=0.002) and indicate that there is a strong association between age and bone density. As age increases there is a tendency for bone density to decrease. The percentage of individuals in the older age group in the higher bone density group was 15.4% (2/13), compared to 67.9% in the younger age group (19/28)

13 Exercise 3: Is there a relationship between age and bone density?
Categorised age and continuous bone density Consider carefully what the outcome variable is. As bone density is likely to be related to age in that as a person ages, they lose bone density, thus bone density is the outcome and age is the explanatory variable. Here we have two groups (young & old) and we are comparing them with respect to a continuous outcome variable (bone density). Hence we would use a t- test to compare the groups. The numbers in each group are small so it is difficult to say whether they are normally distributed but the t-test is reasonably robust to this assumption, so we can use a t-test

14 Exercise 3: Is there a relationship between age and bone density?
Categorised age and continuous bone density The result of the t-test is statistically significant at the 5% level (p<0.001) and we conclude that the mean bone density is different for people aged less than 50 years compared to those who are 50 years or more. On average bone density is 0.16 g/cm2 lower for the older age group compared to the younger age group (95% confidence interval: 0.09 to 0.24 gm/cm2)

15 Exercise 3: Is there a relationship between age and bone density?
Continuous age and continuous bone density Start by producing a scatter plot. As age is the predictor (explantory variable) and bone density is the outcome variable, plot age on the horizontal axis and bone density on the vertical axis. Always plot the explanatory variable on the horizontal axis and the outcome on the vertical axis There is a negative linear relationship between age and bone density. As age increases bone density decreases

16 Exercise 3: Which approach is most appropriate
In general the third approach with continuous age and bone density works best as not only does it tell you that there is a relationship between age and bone density (both variables categorised), or what the average difference is between young and old (categorised age and continuous bone density), it also allows you to quantify what the average loss is for each year of aging

17 Exercise 4: Cholesterol
We are comparing a continuous measure between three groups (South, Midlands and North) so the most appropriate analysis to use is an analysis of variance. The numbers in each region are quite small so it is difficult to say whether cholesterol is normally distributed but ANOVA is quite robust to this assumption.

18 The results of the ANOVA suggest that cholesterol levels differ significantly by region (p-value for the overall regression < 0.001). The average cholesterol in the South is 192.5, in the Midlands it is and in the North it is Post hoc comparisons between the groups demonstrated that the South and Midlands were not statistically different from each other but both were different from the North


Download ppt "Exercise 1 (a): producing individual tables, using the cross-tabs menu"

Similar presentations


Ads by Google