Presentation is loading. Please wait.

Presentation is loading. Please wait.

Basics of Biostatistics for Health Research Session 4 – February 28, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health Sciences.

Similar presentations


Presentation on theme: "Basics of Biostatistics for Health Research Session 4 – February 28, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health Sciences."— Presentation transcript:

1 Basics of Biostatistics for Health Research Session 4 – February 28, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health Sciences & Department of Psychiatry patten@ucalgary.ca

2 Generate Commands Using Logic generate obese2 =. recode obese2.=0 if bmi <= 30 recode obese2.=1 if bmi > 30 tab obese obese2 prtest obese2, by(sex) Missing as obese, which is strange.

3 Missing Values and Logical Operators http://www.stata.com/support/faqs/data- management/logical-expressions-and- missing-values/http://www.stata.com/support/faqs/data- management/logical-expressions-and- missing-values/

4 Generate Commands Using Logic generate obese2 =. recode obese2.=0 if bmi <= 30 recode obese2.=1 if bmi > 30 & bmi !=. tab obese obese2, missing prtest obese2, by(sex) This code works.

5 Statistical Errors

6

7 Sample Size Simulation

8 Sample Size Calculation in STATA 3 2 1

9 Sample Size Dialogue Boxes

10 Let’s do a calculation! You are planning a parallel group RCT – with treatment and control groups. Normally, 20% of people die with disease X, but you expect to cut this in half with a new treatment. How many do you need in each group to achieve 95% power at alpha = 5%?

11 Output (sampsi)

12 Another Calculation A QoL scale in a particular disease has a mean score of 20 and a standard deviation of 5. You are conducting a placebo controlled trial to evaluate a treatment that is expected to improve the QoL by 2 points on this scale. You recruit n=50 into each group – what power will you achieve?

13 Output (sampsi)

14 Go to “www.ucalgary.ca/~patten” www.ucalgary.ca/~patten www.ucalgary.ca/~patten Scroll to the bottom. Right click to download the files described as being “for PGME Students” –One is a dataset –One is a data dictionary Save them on your desktop

15 Review: Comparing Proportions We’ve looked at several procedures for comparing proportions (e.g. for obesity in men vs. women): generate obese =. recode obese.=0 if bmi <= 30 recode obese.=1 if bmi > 30 & bmi !=. tab obese obese, missing prtest obese, by(sex)

16 Epitab Commands 1 3 2

17 Review: Comparing Proportions We’ve looked at several procedures for comparing proportions (e.g. for obesity in men vs. women): recode sex 2=1 1=0 cs obese sex

18 The output…

19 A “non-significant” association generate highgluc =. recode highgluc.=0 if glucose <= 140 recode highgluc.=1 if glucose > 140 & glucose !=. generate female=sex recode female (1=0) (2=1) tab highgluc female, exact

20 How does this look with cs?

21 Review: Try the cci command to obtain the OR Check your work with the cc command.

22 Comparing Proportions? Yes No Fisher’s Exact TestParametric Assumptions? Yes No Multiple Groups? Yes No YesNo ANOVA t-test Kruskall-Wallis Wilcoxon’s-Rank Sum

23 Two situations we haven’t covered… Severely skewed distributions Two continuous variables

24 Severely Skewed Variables

25 Solution: Make Some Categories For example: –Non-smokers –Light smokers (<20) –Moderate 20-40 –Heavy > 40 Your task: Make a variable with these categories and do a statistical test to compare men to women.

26 E.g. for the recoding… generate smoke =. recode smoke.=1 if cigpday==0 recode smoke.=2 if cigpday > 0 & cigpday < 20 recode smoke.=3 if cigpday >=20 & cigpday <= 40 recode smoke.=4 if cigpday > 40 & cigpday !=. tab smoke, missing

27 Some output…

28 Two continuous variables E.g. diastolic blood pressure and BMI The place to start is always a scatter plot STATA calls this a “two way” graph

29 Start with Create

30 Select the two variables Submit

31

32 The command produced… Produced by our dialogue box… twoway (scatter diabp sysbp) The same dialogue box can fit a line… twoway (lfit diabp sysbp) This time select “line”

33 You can combine the two.. Try it! twoway (scatter diabp sysbp) (lfit diabp sysbp) To assess significance, use the regress command (can you find the menu option?) regress diabp sysbp

34 Note: the linear output Line: y = mx + b diabp = 33.42 + 0.364(sysbp)

35 (In Class) Assignment for Today Assess whether there is an association between systolic blood pressure and death (you need to decide how) We’ll define elevated systolic blood pressure as being > 140 mm of Hg. –What is the risk ratio for death for people with elevated systolic blood pressure? –Is the risk ratio statistically significant?


Download ppt "Basics of Biostatistics for Health Research Session 4 – February 28, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health Sciences."

Similar presentations


Ads by Google