Stata 2, Bivariate - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Stata 2, Bivariate

Description:

Stata 2, Bivariate. Hein Stigum. Presentation, data and programs at: http://folk.uio.no/heins ... Does birth weight depend on gestational age? Scatterplot ... – PowerPoint PPT presentation

Number of Views:48
Avg rating:3.0/5.0
Slides: 30
Provided by: hest
Category:
Tags: bivariate | stata

less

Transcript and Presenter's Notes

Title: Stata 2, Bivariate


1
Stata 2, Bivariate
  • Hein Stigum
  • Presentation, data and programs at
  • http//folk.uio.no/heins/

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

Nov-09
H.S.
2
3
Data type dictates type of analysis
Nov-09
H.S.
3
4
Continuous symmetric outcome
  • Example
  • Birth weight

Nov-09
H.S.
4
5
Distribution
kdensity weight
drop if weightlt2000 kdensity weight
Nov-09
H.S.
5
6
Central tendency and dispersion
Mean and standard deviation
Mean with confidence interval
Nov-09
H.S.
6
7
Compare groups, equal variance?
  • Equal
  • Not equal

Nov-09
H.S.
7
8
2 independent samples
  • Are birth weights the same for boys and girls?

Density plot
Scatterplot
Nov-09
H.S.
8
9
2 independent samples test
Nov-09
H.S.
9
10
K independent samples
  • Is birth weight the same over parity?

Density plot
Scatterplot
Equal means? Linear effect? Outliers?
Equal variances?
Nov-09
H.S.
10
11
K independent samples test
Nov-09
H.S.
11
12
Continuous by continuous
  • Does birth weight depend on gestational age?

Scatterplot
Scatterplot, outlier dropped
Nov-09
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

Nov-09
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

Nov-09
H.S.
14
15
Continuous skewed outcome
  • Example
  • Number of sexual partners

Nov-09
H.S.
15
16
Distribution
kdensity partners if partnerslt50
Nov-09
H.S.
16
17
Central tendency and dispersion
Median and percentiles
Nov-09
H.S.
17
18
2 independent samples
  • Do males and females have the same number of
    partners?

Scatterplot
Density plot
Nov-09
H.S.
18
19
2 independent samples test
Nov-09
H.S.
19
20
K independent samples
  • Do partners vary with age?

Scatterplot (partnerslt20)
Density plot (partnerslt20)
Scatterplot
Nov-09
H.S.
20
21
K independent samples test
Nov-09
H.S.
21
22
Table of tests
Categorical ordered use nonparametric tests
Nov-09
H.S.
22
23
Categorical data
  • Example
  • Being bullied

Nov-09
H.S.
23
24
Frequency and proportion
Frequency
Proportion with CI
Nov-09
H.S.
24
25
Proportion, confidence interval
xdisease ntotal number
  • proportion
  • standard error
  • confidence interval

Nov-09
H.S.
25
26
Crosstables
Are boys bullied as much as girls?
Nov-09
H.S.
26
27
Ordered categories, trend
Does bullied vary with age?
twoway (fpfitci bullied agegr) /// (lfit
bullied agegr)
28
Ordered categories, trend
Nov-09
H.S.
28
29
Table of tests
Categorical ordered use nonparametric tests
Nov-09
H.S.
29
Write a Comment
User Comments (0)
About PowerShow.com