Download presentation
Presentation is loading. Please wait.
1
A statistical package for epidemiologists
Stata A statistical package for epidemiologists H.S.
2
Packages compared Bruker-terskel H.S.
3
Packages compared H.S.
4
Packages compared H.S.
5
Packages compared H.S.
6
Why Stata Pro Con Aimed at epidemiology Many methods, growing Graphics
Structured, Programable Comming soon to a course near you Con Memory>file size Used by leading univ, and at many summer schools H.S.
7
Syntax Full syntax Examples
[by varlist:] command [varlist] [if] [in] [, options] Examples mean age mean age if sex==1 by sex, sort: summarize age summarize age ,detail Same strukcture for all commands, easy to learn But many commands H.S.
8
Ways of working Testing Estimation p-values
Estimate with confidence interval H.S.
9
Bivariate H.S.
10
Mean with CI Advanced features Standarization Clustering Bootstrap
H.S.
11
Median and percentiles with CI
Cci=concervative confidence interval=binomial excact, may ask for normal H.S.
12
Compare means 22.09.2018 H.S. Compare means by T-test
Girls lighter than boys, approx same variance H.S.
13
Compare means, T-test ttest weight, by(sex) unequal uneq. var.
Show distribution plot first Lot of information, simple to understand Test for equal variance (enter) Paired test (enter) ttest weight, by(sex) unequal uneq. var. ttest var1=var2 paired test H.S.
14
Graphics H.S.
15
Plottypes Plot at start of analysis: scatter, density, box (raw data) Plot results: bar, dot (derived data) Pie: poor, parts of a whole H.S.
16
Legend with extra information
Compare distr, not possible with histogram Extra freq information in plot Placement of legend H.S.
17
Density with min, max and fractiles
Min, max, median, p25, p75, p5, p95 N= H.S.
18
Scatter with fitline + extra point
H.S.
19
Bar with labels inside 22.09.2018 H.S. Long names difficult on x-axis
Better on yaxis (horizontal plot) Even better inside bars H.S.
20
Regression results 22.09.2018 H.S. Program not automatic, not show
May use log axis H.S.
21
Regression H.S.
22
Purpose of regression Prediction Estimation
Use an estimated model to predict the outcome given covariates in a new dataset Estimation Estimate association between outcome and covariates adjusted for the other covariates Fit of the models matters in the first Counfounding matter in the last H.S.
23
Linear regression, exposure only
Gest2=0 for gest=243 days At 243 days the weight is 2978 H.S.
24
Add confounders and compare
If prediction: goodnes of fit If association: confounding H.S.
25
Assumtions and influence
Test of assumptions Independent errors Linear effects Constant error variance Influence, robustness Both ready plots and tests for assumtions Ready plot for influence H.S.
26
Influence Beta changes from 6 to 16 when removing influential outlier Back to interaction! H.S.
27
Binary regression Odds ratio, OR Risk ratio, RR Risk difference, RD
binreg y x1 x2, or Link: logit Risk ratio, RR binreg y x1 x2, rr Link: log (ln) Risk difference, RD binreg y x1 x2, rd Link: identity Binary outcome. H.S.
28
Odds ratio, Relative risk, Risk Diff
Problems: convergence H.S.
29
Help H.S.
30
Search for help General Examples My home page help command
findit keyword search the net Examples help table findit GAM My home page findit key=search key,all rc=return code H.S.
31
Books A visual guide to Stata graphics by M.N. Mitchell
Data Analysis Using Stata by Ulrich Kohler and Frauke Kreuter Statistics with Stata (Updated for Version 9) by Lawrence C. Hamilton Multilevel and longitudinal modeling using Stata by S. Rabe-Hesketh, A. Skrondal H.S.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.