Download presentation
Presentation is loading. Please wait.
1
A radical view on plots in analysis
Hein Stigum Presentation, data and programs at:
2
Agenda Why use graphs Common use A graphic evolution Plots in analysis
Mar-18 H.S.
3
Why use graphs?
4
Problem example Lunch meals per week
Table of means (around 5 per week) Linear regression Mar-18 H.S.
5
Problem example 2 Iron level
Linear regression: Males 9.4 units higher iron level Logistic regression: Males 10.4 times more anemia In linear regression: constant variance is rejected (p<0.0001) , but that is another matter Low Iron: 1.1% Mar-18 H.S.
6
Problem example 3 Weight on blood pressure Missing sex Mar-18 H.S.
Crude (outlier removed): 23.1 Adjusted: 20.6 Positive bias as expected Missing sex Mar-18 H.S.
7
Common use
8
Pie and bar Mar-18 H.S.
9
Bar-Dot-Line evolution
Last plot: can compare both within and across groups Need 2 versions of bar plots to do that Mar-18 H.S.
10
The workhorses: Scatter and density
11
Scatterplot Main effect: line Non-linearity's: curve Outliers: Points
12
Density Density kdensity weight Boxplot graph hbox weight Mar-18 H.S.
13
Density with “boxplot” information
Mar-18 H.S.
14
Scatter and density plots for many types of data
x-normal use x-suggested use Mar-18 H.S.
15
Plots in analysis
16
Continuous outcome
17
Continuous by 1 category
Mar-18 H.S. 17
18
Continuous by 2 categories
Is birth weight the same for boys and girls? Scatterplot Density plot Sdtest for equal variance: p=0.13, equal variance Equal means? Linear effect? Outliers? Equal variances?
19
Continuous by 3 categories
Is birth weight the same over parity? Scatterplot Density plot Scatter to see linear/no-linear effect, look for outliers Density to see equal variance Equal means? Linear effect? Outliers? Equal variances? Mar-18 H.S.
20
Continuous by continuous
Does birth weight depend on gestational age? Scatterplot Density plot Fpfitci plus lfit gives a graphic test of linearity Equal means? Linear effect? Outliers? Mar-18 H.S.
21
Binary outcome
22
Binary by 2 categories Does the low birth weight depend on sex? Jitter
and line
23
Binary by 3 categories Does the low birth weight depend on parity?
Linear on a linear scale, but for small effect, also linear on a log scale (using a log scale does not work), fracpoly logit y x1 x2 x3 followed by fracplot will work
24
Binary by 3 categories, no scatter
Does the low birth weight depend on parity? Proportions: 7.2% 3.7% 3.2%, chisqr p-val=0.12, nptrend p-val 0.06
25
Scatter: binary by countinuous
Does the low birth weight depend on gest. age? For strong effects line and curve may go outside 0-1 Mar-18 H.S.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.