1 / 29

Stata 2, Bivariate

Stata 2, Bivariate. Hein Stigum Presentation, data and programs at: http://folk.uio.no/heins/. Aug-14. H.S. 1. Datatypes. Categorical data Nominal: married/ single/ divorced Ordinal: small/ medium/ large Numerical data Discrete: number of children Continuous: weight. Aug-14.

louise
Download Presentation

Stata 2, Bivariate

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stata 2, Bivariate Hein Stigum Presentation, data and programs at: http://folk.uio.no/heins/ Aug-14 H.S. H.S. 1

  2. Datatypes • Categorical data • Nominal: married/ single/ divorced • Ordinal: small/ medium/ large • Numerical data • Discrete: number of children • Continuous: weight Aug-14 H.S. H.S. 2

  3. Data type dictates type of analysis Aug-14 H.S. H.S. 3

  4. Continuous symmetric outcome Example: Birth weight Aug-14 H.S. H.S. 4

  5. Distribution kdensity weight drop if weight<2000 kdensity weight Aug-14 H.S. H.S. 5

  6. Central tendency and dispersion Mean and standard deviation: Mean with confidence interval: Aug-14 H.S. H.S. 6

  7. Equal Not equal Compare groups, equal variance? Aug-14 H.S. H.S. 7

  8. 2 independent samples Are birth weights the same for boys and girls? Density plot Scatterplot Aug-14 H.S. H.S. 8

  9. 2 independent samples test Aug-14 H.S. H.S. 9

  10. K independent samples • Is birth weight the same over parity? Density plot Scatterplot Equal means? Linear effect? Outliers? Equal variances? Aug-14 H.S. H.S. 10

  11. equal means? Equal variances? K independent samples test Aug-14 H.S. H.S. 11

  12. Does birth weight depend on gestational age? Continuous by continuous Scatterplot Scatterplot, outlier dropped Aug-14 H.S. H.S. 12

  13. Continuous by continuous tests • Cut gestational age up in groups, then use T-test or ANOVA or • Use linear regression with 1 covariate Aug-14 H.S. H.S. 13

  14. Test situations • 2 independent samples • ttest weight, by(sex) • K independent samples • oneway weight parity • By continuous • regress weight gestAge • 2 dependent samples (Paired) • ttest weight_last_year = weight_today Aug-14 H.S. H.S. 14

  15. Continuous skewed outcome Example: Number of sexual partners Aug-14 H.S. H.S. 15

  16. Distribution kdensity partners if partners<=50 Aug-14 H.S. H.S. 16

  17. Central tendency and dispersion Median and percentiles: Aug-14 H.S. H.S. 17

  18. 2 independent samples Do males and females have the same number of partners? Scatterplot Density plot Aug-14 H.S. H.S. 18

  19. equal medians? 2 independent samples test Aug-14 H.S. H.S. 19

  20. K independent samples Do partners vary with age? Scatterplot Scatterplot (partners<20) Density plot (partners<20) Aug-14 H.S. H.S. 20

  21. equal medians? K independent samples test Aug-14 H.S. H.S. 21

  22. Table of tests Categorical ordered: use nonparametric tests Aug-14 H.S. H.S. 22

  23. Categorical data Example: Being bullied Aug-14 H.S. H.S. 23

  24. Frequency and proportion Frequency: Proportion with CI: Aug-14 H.S. H.S. 24

  25. Proportion, confidence interval proportion: standard error: confidence interval: x=”disease” n=total number Aug-14 H.S. H.S. 25

  26. equal proportions? Crosstables Are boys bullied as much as girls? Aug-14 H.S. H.S. 26

  27. Ordered categories, trend Does bullied vary with age? twoway (fpfitci bullied agegr) /// (lfit bullied agegr) H.S.

  28. Trend? equal proportions? Ordered categories, trend Aug-14 H.S. H.S. 28

  29. Table of tests Categorical ordered: use nonparametric tests Aug-14 H.S. H.S. 29

More Related