Linear Regression Analysis: Calculating Linear Predictors and Fitted Values - Prof. Willia, Assignments of Epidemiology

The concept of linear predictors and fitted values in the context of logistic regression analysis. It provides the formulas for calculating both values and an exercise using stata software to estimate the probability of being a case (cc) based on alcohol use (alc) and tobacco use (tob).

Typology: Assignments

Pre 2010

Uploaded on 03/10/2009

koofers-user-6yd-2
koofers-user-6yd-2 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
LINEAR PREDICTORS AND FITTED VALUES
Biostat/Epi 536 Discussion Session 2 – October 9, 2007
TERMINOLOGY
Fitted value: i
p
ˆ
Linear predictor: KiKio xx
βββ
ˆ
...
ˆ
ˆ
11 +++
FITTED VALUE
LINEAR PREDICTOR
Given the value of i
p
ˆ, we can calculate KiKio xx
βββ
ˆ
...
ˆ
ˆ
11 +++ using:
i
i
iKiKi p
p
pxx ˆ
1
ˆ
log
ˆ
logit
ˆ
...
ˆˆ 110
==+++
βββ
LINEAR PREDICTOR
FITTED VALUE
Given the value of KiKio xx
βββ
ˆ
...
ˆ
ˆ
11 +++ , we can calculate i
p
ˆ using:
)
ˆ
...
ˆˆ
exp(1
)
ˆ
...
ˆˆ
exp(
ˆ
110
110
KiKi
KiKi
ixx
xx
p
βββ
βββ
++++
+++
=
EXERCISE
Using the dataset http://students.washington.edu/gardc/ille975.dta, we wish to
model the probability of being a case (cc=1), adjusting for alcohol use (alc) and
tobacco use (tob), which are defined as follows:
alc = 1 0-39 grams/day
2 40-79
3 80-119
4 120+
tob = 1 0-9 grams/day
2 10-19
3 20-29
4 30+
pf3

Partial preview of the text

Download Linear Regression Analysis: Calculating Linear Predictors and Fitted Values - Prof. Willia and more Assignments Epidemiology in PDF only on Docsity!

LINEAR PREDICTORS AND FITTED VALUES

Biostat/Epi 536 Discussion Session 2 – October 9, 2007

TERMINOLOGY

Fitted value: p ˆ i

Linear predictor: βˆ o^ +βˆ 1 x 1 i +...+ βˆ KxKi

FITTED VALUE  LINEAR PREDICTOR

Given the value of p ˆ i , we can calculate βˆ o + βˆ 1 x 1 i +...+ βˆ KxKi using:

i

i i K Ki i p

p x x p 1 ˆ

ˆ 0 ˆ 11 ... ˆ logit ˆ log −

LINEAR PREDICTOR  FITTED VALUE

Given the value of βˆ o + βˆ 1 x 1 i +...+ βˆ KxKi , we can calculate p ˆ i using:

1 exp(ˆ ˆ ... ˆ )

exp(ˆ ˆ ... ˆ ) ˆ 0 11

0 11 i K Ki

i K Ki i x x

x x p

EXERCISE

Using the dataset http://students.washington.edu/gardc/ille975.dta, we wish to model the probability of being a case (cc=1), adjusting for alcohol use (alc) and tobacco use (tob), which are defined as follows:

alc = 1 0-39 grams/day 2 40- 3 80- 4 120+

tob = 1 0-9 grams/day 2 10- 3 20- 4 30+

STATA

. xi: logit cc i.alc i.tob i.alc _Ialc_1-4 (naturally coded; _Ialc_1 omitted) i.tob _Itob_1-4 (naturally coded; _Itob_1 omitted)

Iteration 0: log likelihood = -494. Iteration 1: log likelihood = -422. Iteration 2: log likelihood = -415. Iteration 3: log likelihood = -415. Iteration 4: log likelihood = -415.

Logistic regression Number of obs = 975 LR chi2(6) = 159. Prob > chi2 = 0. Log likelihood = -415.18 Pseudo R2 = 0.


cc | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _Ialc_2 | 1.224567 .2344119 5.22 0.000 .7651279 1. _Ialc_3 | 1.99794 .264346 7.56 0.000 1.479832 2. _Ialc_4 | 3.179962 .3273925 9.71 0.000 2.538285 3. _Itob_2 | .3861617 .2116419 1.82 0.068 -.0286488. _Itob_3 | .4251191 .2562347 1.66 0.097 -.0770916. _Itob_4 | .9877336 .2893924 3.41 0.001 .420535 1. _cons | -2.813544 .2111281 -13.33 0.000 -3.227347 -2.


What is the equation of the linear predictor?

2 3 4 2 3 4

0 2 2 3 3 4 4 2 2 3 3 4 4

logitˆ log

logitˆ log

a a a t t t i

i i

a a a a a a t t t t t t i

i i

x x x x x x p

p p

x x x x x x p

p p

What is the value of the linear predictor for a person who smokes 25 grams/day and drinks 50 grams/day?

What is the fitted value for a person who smokes 25 grams/day and drinks 50 grams/day?