12.01.2015 Views

Logistisk regression

Logistisk regression

Logistisk regression

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

u n i v e r s i t y o f c o p e n h a g e n<br />

Eksempel 1: køn og CHD<br />

d e p a r t m e n t o f b i o s t a t i s t i c s<br />

Er der forskel på hyppigheden af CHD blandt mænd og kvinder<br />

Køn vs CHD<br />

> framing$chdI0,1,0)<br />

> framing$mand framingCHD attach(framingCHD)<br />

> table(mand,chdI)<br />

chdI<br />

mand 0 1<br />

0 616 104<br />

1 479 164<br />

> chisq.test(mand,chdI)<br />

Pearson’s Chi-squared test with Yates’ continuity correction<br />

data: mand and chdI<br />

X-squared = 25.6119, df = 1, p-value = 4.175e-07<br />

> fisher.test(mand,chdI)<br />

Fisher’s Exact Test for Count Data<br />

data: mand and chdI<br />

p-value = 3.831e-07<br />

alternative hypothesis: true odds ratio is not equal to 1<br />

95 percent confidence interval:<br />

1.530131 2.693462<br />

sample estimates:<br />

odds ratio<br />

2.026904<br />

10 / 42

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!