






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: App Linear Stat Meth II; Subject: MATH Mathematics; University: Tennessee Tech University; Term: Unknown 1989;
Typology: Study notes
1 / 12
This page cannot be seen from the preview
Don't miss anything!







Example 1. The mortality of the moth tobacco budworm “Heliothis virescens” was analyzed in an experiment, where groups of 20 individuals were exposed to the pyrethroid trans-cypermethrin and the number of deaths recorded after 72 hours. Six different doses were analyzed for each group of 20 male and female moths. The data are summarized as follows:
Mortality of moths exposed to cypermethrin.
Dose [μg] of cypermethrin Dead Males Dead Females 1 1 0 2 4 2 4 9 6 8 13 10 16 18 12 32 20 16
Note:
Example 2. A total of n = 5 female moths were exposed to a pesticide and it was recorded that y = 2 of these died.
Note:
Calculating probabilities using the binomial distribution.
Question: What is the probability of observing 2 dead moths (written P (y = 2))?
Let zi, for i = 1, 2 , 3 , 4 , 5, represent each of the five moths, respectively. The two dead moths out of the 5 could have occurred in the following 10 ways.
z 1 1 1 1 1 0 0 0 0 0 0 z 2 1 0 0 0 1 1 1 0 0 0 z 3 0 1 0 0 1 0 0 1 1 0 z 4 0 0 1 0 0 1 0 1 0 1 z 5 0 0 0 1 0 0 1 0 1 1 y =
∑ zi 2 2 2 2 2 2 2 2 2 2
Letting n = 5, y = 2, these 10 possibilities can be computed using combinations as follows: ( n y
n! y!(n − y)!
( 5 2
Note:
P (z 1 = 1, z 2 = 0, z 3 = 1, z 4 = 0, z 5 = 0) = π(1 − π)π(1 − π)(1 − π) = π^2 (1 − π)^3.
P (y = 2) =
( 5 2
) π^2 (1 − π)^3.
πˆ =
y n
) (.4)^2 (1 − .4)^3 =. 35.
π =
exp η 1 + exp η
(See GLM Overview notes for details on η = x′β. )
Example - In the experiment with n = 5 moths and y = 2 deaths, we have three different descriptions related to the mortality probability π given by:
Probability, odds, and logit of π.
ˆπ oddŝ ηˆ = logit ˆπ .4 .67 = (^5) −^22 -.
Example - Recall in the tobacco budworm experiment that moths were exposed to different doses of a poison by gender. If we consider just the male budworms which received doses 1 and 2 at which y 1 = 1 and y 2 = 4, respectively, out of n = 20 died, there are several options to compare the lethality of the doses.
Absolute Risk Reduction - this is calculated by taking the difference in the probabilities. The reduction in risk when changing from dose 2 to dose 1 can be estimated by
πˆ 1 − πˆ 2 =. 05 − .2 = −. 15.
The downside is that this difference is difficult to interpret in terms of probability. Note: the difficulty has nothing to do with the negative probability. The ARR will change as we go from dose to dose. This change may or may not be linear - which could make it difficult to describe in terms of covariates. That is, “How is the probability changing from dose to dose as a function (linear or nonlinear) of covariates?”
Relative Risk - this is calculated as a ratio of probabilities. The relative risk of death from dose 1 compared to dose 2 is estimated as
ˆπ 1 /πˆ 2 =. 05 /.2 =. 25.
This is a little more easier to interpret in terms of probabilities. The risk of dying from dose 1 is only 1/4 of the risk of dying from dose 2. Relative risk of less than 1 implies that dose 1 is less poisonous than dose 2. On the downside, a RR of .25 does not say anything about the risk of dying from dose 2. For example, if the probability of dying from dose 1 is .0005 and from dose 2 is .002 then there would be virtually no difference between the doses in practice
Odds Ratio -This measure is calculated as the ratio of odds. An estimate of the ratio of odds is calculated as follows odds(ˆπ 1 ) odds(ˆπ 2 )
The odds of dying from dose 1 is 1/5 versus dose 2, alternatively, dose 2 is 5 times more lethal than dose 1. The downside is the same as for relative risk. An odds ratio of 1 indicates no difference in effects.
Log Odds - This is calculated as the logarithm of the odds ratio. For the budworm example we have as an estimate
log
( odds(ˆπ 1 ) odds(ˆπ 2 )
) = log(.21) = − 1. 56
Note that the log odds varies between −∞ and ∞. A log odds of 0 (i.e. odds ratio of 1) indicates that there are no differences in effect.
Note: The Log Odds measure can also be viewed as the difference of the logits as follows:
log
( odds(π 1 ) odds(π 2 )
) = log
( π 1 /(1 − π 1 ) π 2 /(1 − π 2 )
)
= log
( π 1 1 − π 1
) − log
( π 2 1 − π 2
)
= logit(π 1 ) − logit(π 2 ).
In logistic regression, the difference in logits will correspond to parameters in the logistic regression model.
The Plots (by Gender)
Note:
Model 1 - Simple Linear Regression Approach
Model 2 - Logistic Regression Approach
The logistic regression model is specified in two steps:
y ∼ Bin(n, π)
Note:
Method of Estimation:
There are no closed form solutions to the parameter estimates. The estimates of the parame- ters in logistic regression are obtained by maximizing the likelihood - an iterative procedure. The standard errors, confidence intervals, and hypothesis tests are based on asymptotics (large sample theory). Thus, statistical inference in logistic regression is based on approx- imations. More data is better than less. Technical note: this binomial likelihood has the form of an exponential family which links a function of the mean - nπ using logit as a linear function of regressors.
SAS Implementation Notes: see moths logistic part1.sas
odds(πd+1) = odds(π)eβ^1.
Interpretation of a qualitative predictor.
In the moth data model given by
logit(π) = β 0 + β 1 ln(dose) + β 2 gender,
an estimate for β 2 is given by βˆ 2 ≈ 1 .1.
This parameter can be interpreted in terms of the difference in the logits for males and females. That is,
logit(πF ) − logit(πM ) = β 2 (M ale) − β 2 (F emale) = β 2.
An estimate of β 2 is given by βˆ 2 ≈ 1 .1.
Accordingly, the odds-ratio of dying as a male moth relative to a female moth is given as
e^1.^1 ≈ 3.
This means that the odds of dying for males is 3 times that of females.
Note:
Interpretation in the presence of interaction.
Simple interpretations do not hold when the model contains interaction terms of predictors.
Consider adding an interaction term to the moth data. The model can be written as
logit(π) = β 0 + β 1 ln(dose) + β 2 gender + β 3 ln(dose) ∗ gender.
Fitting this model yielded the following estimates.
Analysis of Maximum Likelihood Estimates
Parameter DF Estimate StdError WaldChi-Square Pr > ChiSq Intercept 1 -2.9935 0.5527 29.3353 <. logdose 1 1.3071 0.2411 29.3987 <. gender2 1 0.1752 0.7783 0.0507 0. logdose*gender2 1 0.509 0.3895 1.7078 0.
Analysis of ln(dose) for Females
Analysis of ln(dose) for Males