MSH3 Generalized linear model Ch. 6 Count data models
|
|
- Herbert Toby Lane
- 6 years ago
- Views:
Transcription
1 Contents MSH3 Generalized linear model Ch. 6 Count data models 6 Count data model Introduction: The Children Ever Born Data The Poisson Distribution Log-Linear Models ML estimation Goodness of fit and hypothesis test Children ever born example Grouped Data and the Offset The Deviance Table The Additive Model Negative binomial distribution Model for excess zero Zero-inflated Poisson model Hurdle model Model selection example SydU MSH3 GLM (2015) First semester Dr. J. Chan 207
2 6 Count data model MSH3 Generalized linear model Ch. 6 Count data models In this chapter we study log-linear models for count data with a Poisson error structure and a log link function. 6.1 Introduction: The Children Ever Born Data The following table, adapted from Little (1979), comes from the Fiji Fertility Survey, typical in the reports of the World Fertility Survey. Each cell in the table shows the mean, the variance and the number of observations. The unit of analysis is the individual woman, the response is the number of children she has borne, and the 3 discrete predictors are the duration since her first marriage, the type of place of residence (Suva the capital, other urban and rural), and her educational level (none, lower primary, upper primary, and secondary or higher). Data such as these have traditionally been analyzed using ordinary linear models with normal errors. The key concern, however, is not the normality of the errors but rather the assumption of constant variance. log(var) log(mean) Figure 6.1: The Mean-variance Relationship for the CEB Data SydU MSH3 GLM (2015) First semester Dr. J. Chan 208
3 The plot of variance against mean in log scale for all cells with at least 20 observation shows clearly that, the assumption of constant variance is not suitable and the relationship is close to proportional. Thus, a Poisson regression models is more suitable than a ordinary linear models. Table 6.1: Number of Children Ever Born to Women of Indian Race By Marital Duration, Type of Place of Residence and Educational Level (Each cell shows the mean, variance and sample size) Marr. Suva Urban Rural Dur. N LP UP S+ N LP UP S+ N LP UP S SydU MSH3 GLM (2015) First semester Dr. J. Chan 209
4 6.2 The Poisson Distribution A random variable Y is said to have a Poisson distribution with parameter µ if it takes integer values y = 0, 1, 2,... with probability Pr(Y = y) = e µ µ y for µ > 0. The mean and variance are y! E(Y ) = Var(Y ) = µ. Since the mean is equal to the variance, any factor that affects one will also affect the other and hence homoscedasticity fails for Poisson data. Poisson model captures the usual fact with count data that the variance tends to increase with the mean. The Poisson distribution can be derived as a limiting form of the binomial distribution. Specifically, if Y B(n, π), Y approx P (µ) with fixed µ = nπ as n and π 0. Thus, the Poisson distribution provides an approximation to the binomial for the analysis of rare events, where µ is small and n is large. Alternatively, the Poisson distribution is defined in terms of a stochastic process described as follows. Suppose events occur randomly in time with the following conditions: The probability of at least one occurrence of the event in a given time interval is proportional to the length of the interval. The probability of two or more occurrences of the event in a very small time interval is negligible. The numbers of occurrences of the event in disjoint time intervals are mutually independent. SydU MSH3 GLM (2015) First semester Dr. J. Chan 210
5 Then the probability distribution of the number of occurrences of the event in a fixed time interval is Poisson with mean µ = λt, where λ is the rate of occurrence of the event per unit time and t is the length of the time interval. The proof will be given in the Appendix. A process satisfying the three assumptions is called a Poisson process. A useful property of the Poisson distribution is that the sum of independent Poisson random variables is also Poisson. Specifically, if Y 1 and Y 2 are independent with Y i P (µ i ) for i = 1, 2 then Y 1 + Y 2 P (µ 1 + µ 2 ). This result generalizes in an obvious way to the sum of more than two Poisson observations. For a group of n i individuals with identical covariate values, let Y ij denote the number of events experienced by the j-th unit in the i-th group, and let Y i denote the total number of events in group i. Then, under the usual assumption of independence, if Y ij P (µ i ) for j = 1, 2,... n i, then Y i P (n i µ i ). In terms of estimation, we obtain exactly the same likelihood function if we work with the individual counts Y ij or the group counts Y i. 6.3 Log-Linear Models Let Y i P (µ i ) independently and y 1, y 2,... y n are n observed values. Let the mean µ i (variance as well) depend on a vector of explanatory variables x i in a simple linear model: µ i = x iβ. However, while x i β can assume any real value, the Poisson mean µ i has to be non-negative. One solution is to model the logarithm of the µ i, a canonical link for Poisson distribution, using a linear model: log(µ i ) = x iβ SydU MSH3 GLM (2015) First semester Dr. J. Chan 211
6 where β j in β represents the expected change in the log of the mean per unit change in the predictor x ij. Exponentiating the equation, we obtain a multiplicative model for the mean: µ i = exp(x iβ) = exp( p p p x ij β j ) = exp(x ij β j ) = [exp(β j )] x ij j=1 which agrees with what we observe that the size of effects is proportional to the count itself. Increasing x ij by one unit, the mean µ i is multiplied by exp(β j ). 6.4 ML estimation The log-likelihood function for n independent Poisson observations is n l(β) = {y i log(µ i ) µ i log(y i!)}. i=1 Taking derivatives of l(β) with respect to the elements of β, and setting them zero l n y i n = µ i x ij µ i x ij = x ij (y i µ i ), β j µ i i=1 the maximum likelihood estimates in log-linear Poisson models satisfy the estimating equations X y = X µ where X is the design matrix, with row x i for each observation and one column for each predictor, including the constant (if any). This estimating equation arises in any generalized linear model with canonical link. Thus, in models with a constant, one of the estimating equations matches the sum of observed and fitted values. In models with a discrete factor, SydU MSH3 GLM (2015) First semester Dr. J. Chan 212 j=1 i=1 j=1
7 such as the Children Ever Born example, the observed and fitted total number of children ever born will be matched in each category of marital duration since first marriage. This result generalizes to higher order terms. The interaction model A+B+AB would match the totals in each combination of categories of A and B, or the AB margin. To estimate the parameters, we will use the iteratively-reweighted least squares (IRLS) algorithm the working dependent variable z z i = η i + y i ˆµ i ˆµ i since η i µ i = ln µ i µ i = 1 µ i and the diagonal matrix W of iterative weights has elements w ii = [V ar(z i )] 1 = [V ar(y i ) ( η i µ i ) 2 ] 1 = [ˆµ i ( 1ˆµ i ) 2 ] 1 = ˆµi where ˆµ i is the fitted values based on the current parameter estimates. Initial values can be obtained by applying the link to the data, that is taking the log of the response, and regressing it on the predictors using OLS. The procedure usually converges in a few iterations. 6.5 Goodness of fit and hypothesis test 1. Deviance: It measures the discrepancy between observed and fitted values for Poisson responses: n [ ( ) ] yi n D = 2 y i log (y i ˆµ i ) χ 2 ˆµ n p i i=1 where p the number of parameters. The first term is identical to the binomial deviance and the second term, a sum of differences between observed and fitted values, is usually zero for MLE which march marginal totals. SydU MSH3 GLM (2015) First semester Dr. J. Chan 213
8 2. Pearson s chi-squared statistic: It is the squared difference between observed and fitted values to the variance of the observed value: n X 2 (y i µ i ) 2 n = χ 2 ˆµ n p i i=1 which the same for Poisson and binomial data. 3. Likelihood ratio test: It can be constructed in terms the difference in deviances between two nested model: 2 ln λ = D(ω 1) D(ω 2 ) φ n χ 2 p2 p 1 under the assumption that the smaller model ω 1 is correct in H Wald test: To test H 0 : β = β 0, the test statistics is W 0 = ( β β 0 ) [var( β)] 1 ( β β 0 ) n based on the fact that the MLE β N p (β, X W X) where W is the diagonal matrix of estimation weights w ii. 6.6 Children ever born example Grouped Data and the Offset Let Y ijkl denote the number of children from the l-th woman in the (i, j, k)-th group, where i denotes marital duration, j residence and k education and with mean µ ijk. Let Y ijk = l Y ijkl denote the group total. The group total is a realization of a Poisson variate with mean n ijk µ ijk, where n ijk is the number of observations in the (i, j, k)-th cell. Suppose that a log-linear model is postulated for the individual means: log E(Y ijkl ) = log(µ ijk ) = x ijkβ SydU MSH3 GLM (2015) First semester Dr. J. Chan 214 χ 2 p
9 where x ijk is a vector of covariates. Then the log of the expected value of the group total is log E(Y ijk ) = log(n ijk µ ijk ) = log(n ijk ) + x ijkβ. Thus the group totals have the same coefficients β as the individual means, except that the linear predictor includes the term log(n ijk ) called an offset which is the log of exposure measures, the number of women here. Thus, we can fit log-linear models to the individual counts or group totals with the log of the number of women in each cell as an offset. The deviances is different because they measure goodness of fit to different sets of counts but differences of deviances between nested models are exactly the same The Deviance Table Table 7.2 reports the results of fitting a variety of Poisson models. The null model assuming the same number of children for all the groups is rejected based (D = 3732 on 69 df). Introducing marital duration reduces the deviance to on 64 df. The drop of 3566 on 5 df shows that the number of CEB depends on the duration since the first marriage. To test the effect of education controlling for duration, the additive model D + E relative to the one-factor D model gives a chi-squared statistic of 65.8 ( ) on 3 (64-61) df and is highly significant. We can also test the net effect of education controlling for residence & duration, by comparing the 3-factor additive model D + R + E with the 2-factor model D + R. The difference in deviances of 50.1 ( ) on 3 (62-59) df is highly significant. This smaller Chi-square statistic indicates that part of the education effect may due to the fact that more educated women live in Suva or in other urban areas. SydU MSH3 GLM (2015) First semester Dr. J. Chan 215
10 Table 6.2: Deviances for Poisson log-linear models fitted to CEB data Type Model Deviance d.f. Null factor Models Duration Residence Education factor Models D + R D + E DR DE factor Models D + R + E D + RE E + DR R + DE DR + RE DE + RE DR + DE DR + DE + RE Does education make more of a difference in rural areas than in urban areas? To answer this question we compare models D+RE to D+R+E. The reduction in deviance is 10.8 ( ) on 6 (59-53) df and is not significant, with a P-value of Does the effect of education increase with marital duration? Adding DE (model R+DE) to model D+R+E reduces the deviance by 15.7 ( ) at the cost of 15 df (59-44), hardly a bargain. Thus, we conclude that the additive model which has a deviance of on 59 d.f. (an average of 1.2 per d.f.) is adequate for these data. SydU MSH3 GLM (2015) First semester Dr. J. Chan 216
11 6.6.3 The Additive Model The associated P-value of the D+R+E model is 0.14 (Pr(χ 2 59 > 70.65) = 0.14), so the model passes the goodness-of-fit test. Table 6.3 shows its parameter estimates and standard errors. Duration. The constant represents the log of the mean number of CEB for the reference cell, which is Suvanese women with no education and 0-4 years marriage duration. Since exp(0.1173) = 0.89, these women have 0.89 children on average at this time in their lives. The duration parameters trace the increase in CEB with duration for any residence and education group. The model is multiplicative in the original scale. From duration 0-4 to 5-9 years, the number of CEB gets multiplied by exp(0.9977) = By duration years, the number of CEB is exp(1.977) = 7.22 times those at duration 0-4 for any residence type and education level. Residence. The effects of residence show that Suvanese women have the lowest fertility. At any given marriage duration, women living in other urban areas have 12% larger families (exp(0.1123) = 1.12) than Suvanese women with the same level of education. Similarly, at any fixed duration, women who live in rural areas have 16% more children (exp(0.1512) = 1.16), than Suvanese women with the same level of education. Education. Higher education is associated with smaller family sizes net of duration and residence. At any given marriage duration, women with upper primary education have 10% fewer kids, and women with secondary or higher education have 27% (1 exp( ) = 0.27) fewer kids, than women with no education in the same type of residence. SydU MSH3 GLM (2015) First semester Dr. J. Chan 217
12 Table 6.3: Estimates for additive log-linear model of CEB data Parameter Estimate Std. Error z-ratio Constant Duration Residence Suva - Urban Rural Education None - Lower Upper Sec The educational differential of 27% between these two groups translates into a quarter of a child at durations 0-4, increases to about one child around duration 15, and reaches almost one and three quarter children by duration 25+. Thus, the effect of education increases with marital duration. (5-9, Sec+: exp( ) = 1.77) Table 6.4: Fitted values for Suvanese women with no education and with secondary or higher Education Marital Duration No Education Secondary Difference SydU MSH3 GLM (2015) First semester Dr. J. Chan 218
13 > rm(list=ls()) > data=read.table("ceb.txt",skip=1) > mu=data[,1] > ni=data[,3] > ln=log(ni) > dur=as.factor(data[,4]) > resid=as.factor(data[,5]) > edu=as.factor(data[,6]) > y=round(mu*ni,0) > d0=glm(y~offset(ln),family=poisson)$dev > d1=glm(y~offset(ln)+dur,family=poisson)$dev > d2=glm(y~offset(ln)+resid,family=poisson)$dev > d3=glm(y~offset(ln)+edu,family=poisson)$dev > d4=glm(y~offset(ln)+dur+resid,family=poisson)$dev > d5=glm(y~offset(ln)+dur+edu,family=poisson)$dev > d6=glm(y~offset(ln)+dur*resid,family=poisson)$dev > d7=glm(y~offset(ln)+dur*edu,family=poisson)$dev > d8=glm(y~offset(ln)+dur+edu+resid,family=poisson)$dev > d9=glm(y~offset(ln)+dur+edu*resid,family=poisson)$dev > d10=glm(y~offset(ln)+dur*resid+edu,family=poisson)$dev > d11=glm(y~offset(ln)+dur*edu+resid,family=poisson)$dev > d12=glm(y~offset(ln)+dur*resid+edu*resid,family=poisson)$dev > d13=glm(y~offset(ln)+dur*edu+resid*edu,family=poisson)$dev > d14=glm(y~offset(ln)+dur*resid+dur*edu,family=poisson)$dev > d15=glm(y~offset(ln)+dur*resid+dur*edu+resid*edu,family=poisson)$dev > c(d0,d1,d2,d3,d4,d5,d6) [1] > c(d7,d8,d9,d10,d11,d12,d13) [1] > summary(glm(y~offset(ln)+dur+resid+edu,family=poisson)) Call: glm(formula = y ~ offset(ln) + dur + resid + edu, family = poisson) Deviance Residuals: Min 1Q Median 3Q Max SydU MSH3 GLM (2015) First semester Dr. J. Chan 219
14 Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) * dur < 2e-16 *** dur < 2e-16 *** dur < 2e-16 *** dur < 2e-16 *** dur < 2e-16 *** resid *** resid e-08 *** edu edu ** edu e-08 *** --- Signif. codes: 0 *** ** 0.01 * (Dispersion parameter for poisson family taken to be 1) Null deviance: on 69 degrees of freedom Residual deviance: on 59 degrees of freedom AIC: Number of Fisher Scoring iterations: Negative binomial distribution Negative binomial (NB) distribution is a discrete probability distribution for the number of successes in a sequence of iid Bernoulli trials before a specified number of failures, r, occurs. It s pmf, mean and variance are ( ) y + r 1 f(y) = (1 p) r p y, x E(Y ) = pr 1 p, and V ar(y ) = pr (1 p) 2. SydU MSH3 GLM (2015) First semester Dr. J. Chan 220
15 As V ar(y ) > E(Y ), it is overdispersed. Being a Poisson-Gamma mixture, p Y NB(r, p) Y P (λ), λ G(r, 1 p ) it has higher variability than Poisson. The proof is: f(y; r, p) = 0 λ y e λ y! = (1 p)r p r y!γ(r) = (1 p)r p r = λ r 1 e λ(1 p)/p dλ ( p 1 p )r Γ(r) y!γ(r) Γ(r + y) y!γ(r) py (1 p) r = 0 λ r+y 1 e λ/p dλ p r+y Γ(r + y) ( y + r 1 Poisson and NB distributions are related as: ( r, P (λ) = lim r NB y λ λ + r since taking expectation on both sides, λ = rp 1 p p = E(Y ) = V ar(y ) = lim r lim r pr 1 p = lim r pr (1 p) 2 = lim r λ λ+r r 1 λ λ+r = λ λ λ+r r (1 λ λ+r ) ) (1 p) r p y. = lim λλ + r )2 r r In fitting a negative binomial distribution to the CEB data, > library(mass) > glm.nb(y ~ offset(ln)+dur+resid+edu) λ λ+r. Note that = λ. Call: glm.nb(formula = y ~ offset(ln) + dur + resid + edu, init.theta = , link = log) SydU MSH3 GLM (2015) First semester Dr. J. Chan 221
16 Coefficients: (Intercept) dur2 dur3 dur4 dur5 dur resid2 resid3 edu2 edu3 edu Degrees of Freedom: 69 Total (i.e. Null); 59 Residual Null Deviance: 3730 Residual Deviance: AIC: There were 27 warnings (use warnings() to see them) > data=read.table("cebmeanvar.txt") > mug=data[,1] #mean by group > var=data[,2] #var by group > mean(mug) [1] > mean(var) [1] There is no improvement in model fit (Residual Deviance & AIC) as the data is equi-dispersed across groups. 6.8 Model for excess zero The model concerns a random event containing excess zero counts Zero-inflated Poisson model Proposed by Lambert (1992), the model contains two components for two zero generating processes: a binary distribution that generates structural zeros and a Poisson or Negative Binomial distributions that generates counts, some of which may be zero. Essentially, it is a mixture model is SydU MSH3 GLM (2015) First semester Dr. J. Chan 222
17 given by: MSH3 Generalized linear model Ch. 6 Count data models Pr(Y = 0) = π + (1 π)e λ Pr(Y = y) = (1 π) λy e λ, y 1 y! where λ is the expected Poisson count here and π is the probability of extra zeros. An example is the number of certain insurance claims within a population that is zero-inflated by those people who have not taken out insurance against the risk and thus are unable to claim. The mean and variance are since E(Y ) = (1 π)λ and V ar(y ) = λ(1 π)(1 + λπ) V ar(y ) = E(Y 2 ) [E(Y )] 2 = (1 π)(λ 2 + λ) (1 π) 2 λ 2 = (1 π)[λ 2 + λ (1 π)λ 2 ] = λ(1 π)(1 + λπ). The method of moments estimators are given by λ = s2 + ȳ 2 ȳ ȳ and π = s2 ȳ s 2 + ȳ 2 ȳ where ȳ is the sample mean and s 2 is the sample variance. The maximum likelihood estimator can be found by solving the following equation ( ȳ(1 e λ ) = λ 1 n ) 0 (1) n for ˆλ where n 0 n is the observed proportion of zeros. This can be solved by iterations or the R module uniroot, and the maximum likelihood estimator for π is given below (proofs in assignment): ˆπ = 1 ȳ ˆλ. SydU MSH3 GLM (2015) First semester Dr. J. Chan 223
18 6.8.2 Hurdle model MSH3 Generalized linear model Ch. 6 Count data models Proposed by Mullahy (1986), the model contains two components: a binary model for measuring whether the outcome overcomes the hurdle (say zero for zero-inflated data) and a truncated model like Poisson or negative binomial (NB) distributions explaining those outcomes that pass the hurdle. The model is given by: Pr(Y = 0) = π λ y e λ Pr(Y = y) = (1 π) y!(1 e λ ), y 1 The loglikelihood function is l(π, λ) = n 0 ln π+n 1 ln(1 π)+ln λ n 1 i=1 n 1 y i n 1 λ y i! n 1 ln(1 e λ ) where n 0 is the count of 0 and n 1 is the count of y i > 0. Hence the MLE are ˆπ = n 0 n and ˆλ is the solution to (1). 6.9 Model selection example Maxell (1961) discusses a 5 4 table giving the number of boys with 4 different ratings for disturbed dreams in 5 different age groups. The higher the rating the more the boys suffer from disturbed dreams. Rating Age i=1 SydU MSH3 GLM (2015) First semester Dr. J. Chan 224
19 One way of modeling the data is to let the number in the (i, j)-th cell be Y ij and assume that Y ij Poisson(µ ij ). Given 5 i=1 4 j=1 Y ij = 223, the joint conditional distribution of the Y ij s is multinomial. We look for a pattern in the µ ij relating to the factors age and rating. We use log link. The saturated model Ω : ln µ ij = µ 0 + α i + β j + (αβ) ij where α i is the age group effect, α 1 = β 1 = 0, β j is the dream rating effect, (αβ) ij is the interaction effects and (αβ) 1j = 0 = (αβ) i1. The null model φ : ln µ ij = µ 0 where ˆµ ij = ȳ = = 11.15, µ 0 = ln µ ij = ln(11.15) = > y=c(7,3,4,7,13,11,15,10,7,11,9,23,10,12,9,28,3,4,5,32) > age=factor(c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5)) > rate=factor(c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4)) > glm1=glm(y~age+rate,family=poisson) > summary(glm1) Call: glm(formula = y ~ age + rate, family = poisson) Deviance Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) e-07 *** age ** age *** age e-05 *** SydU MSH3 GLM (2015) First semester Dr. J. Chan 225
20 age ** rate rate rate e-07 *** --- Signif. codes: 0 *** ** 0.01 * (Dispersion parameter for poisson family taken to be 1) Null deviance: on 19 degrees of freedom #n-p=20-1 Residual deviance: on 12 degrees of freedom #n-p= AIC: Number of Fisher Scoring iterations: 5 > ey=glm1$fitted.values > ey > n=length(y) > mu=mean(y) > mu [1] > D.null=2*sum(y*log(y/mu)-(y-mu)) > D.null [1] > D.add=2*sum(y*log(y/ey)-(y-ey)) #additive age_rate model > D.add [1] > AIC.add=-2*sum(y*log(ey)-ey-log(factorial(y)))+2*(1+3+4) > AIC.add [1] To test if β 1 = β 2 = β 3, i.e., rating can be collapsed to 2-levels, the SydU MSH3 GLM (2015) First semester Dr. J. Chan 226
21 change in deviance, as compared to the saturated model with 0 deviance and 0 d.f., is which distributed as χ Since the p-value > 0.05, accept H 0. > r1=factor(c(1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2)) > glm3=glm(y~age*r1,family=poisson) > summary(glm3) Call: glm(formula = y ~ age * r1, family = poisson) Deviance Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) e-09 *** age ** age * age * age r age2:r age3:r age4:r age5:r ** --- Signif. codes: 0 *** ** 0.01 * (Dispersion parameter for poisson family taken to be 1) Null deviance: on 19 degrees of freedom Residual deviance: on 10 degrees of freedom #n-p= AIC: SydU MSH3 GLM (2015) First semester Dr. J. Chan 227
22 Number of Fisher Scoring iterations: 4 For residual checks in GLM, the mean and variance are functionally related in interpreting the residuals plot. To help in this problem, we generally use the scaled residuals of some form: 1. Ordinary residuals: R i = Y i ˆµ i but it is useful only in normal case. 2. Pearson (or standardized) residuals: R pi = Y i µ i a(φ)b (ˆθ i ) where Var(Y i ) = a(φ)b (θ i ). For the Poisson case, as Var(Y i ) = E(Y i ). R pi = Y i ˆµ i ˆµi > r=residuals.glm(glm3,type="pearson") > r e e e e e e e e e e e e e e e e e e e e-15 > par=glm3$coeff > r1=(y[1]-exp(par[1]))/sqrt(exp(par[1])) > r1 #agree with the first pearson residual (Intercept) Results of the four models are summarized below: SydU MSH3 GLM (2015) First semester Dr. J. Chan 228
23 Model Dev df Diff dev Diff df p-value Conclusion 1. Saturated age*rate Reduced sat. age*rate Accept M2 3. Additive age+rate Reject M3, favor M1 4. Null Reject M4, favor M3 Note that M2 and M3 are not nested. Reference: 1. Little, J.A. (1979) The General Linear Model and Direct Standardization A Comparison. Sociological methods and research, 7, Lambert, D. (1992) Zero-Inflated Poisson Regression, with an Application to Defects in Manufacturing. Technometrics, 34: Mullahy, J. (1986) Specification and testing of some modified count data models. Journal of Econometrics, 33, SydU MSH3 GLM (2015) First semester Dr. J. Chan 229
24 Appendix MSH3 Generalized linear model Ch. 6 Count data models Definition: A stochastic process {N(t), t 0} is a counting process if N(t) represents the total number of events that have occured by time t. Note: N(t) 0. If s < t, N(s) N(t). Definition: A stochastic process is independent increment the number of events in disjoint intervals are independent. Definition: A stochastic process is stationary increment if the distributions of N(t 1 + s) N(t 2 + s) and N(t 1 ) N(t 2 ) are equal. Lemma: The counting process {N(t), t 0} is a Poisson process with rate λ if 1. N(0) = 0 2. The process has stationary and independent increment. 3. Pr(N(h) = 1) = λh + o(h) 4. Pr(N(h) 2) = o(h) where f(x) = o(x) if f(x) x Proof: Let p n (t) = Pr(N(t) = n). We have 0 as x 0 and o(h) ± o(h) = o(h). p 0 (t + h) = Pr(N(t) = 0, N(t + h) N(t) = 0) Hence = Pr(N(t) = 0) Pr(N(h) = 0) = p 0 (t)(1 λh + o(h)) by (2-4) p p 0 (t + h) p 0 (t) 0(t) = lim = lim λp 0 (t) + o(h) h 0 h h 0 h p 0(t) = λp 0 (t) p 0(t) p 0 (t) = λ ln p 0(t) = λt + c p 0 (t) = ke λt SydU MSH3 GLM (2015) First semester Dr. J. Chan 230
25 Since p 0 (0) = Pr(N(0) = 0) = 1 k = 1, we have p 0 (t) = e λt. Then assuming p n 1 (t) = (λt)n 1 e λt using mathematical induction, we have (n 1)! p n (t + h) = Pr(N(t) = n, N(t + h) N(t) = 0) + Pr(N(t) = n 1, N(t + h) N(t) = 1) n + Pr(N(t) = n k, N(t + h) N(t) = k) k=2 = Pr(N(t) = n) Pr(N(h) = 0) + Pr(N(t) = n 1) Pr(N(h) = 1) + o(h) = p n (t)(1 λh + o(h)) + p n 1 (t)(λh + o(h)) + o(h) p n (t + h) p n (t) = p n (t)λ + p n (t) o(h) h h p n(t) = λp n (t) + λp n 1 (t) + p n 1(t)λ + p n 1 (t) o(h) h + o(h) h Implies p n(t) + λp n (t) = λ (λt)n 1 e λt (n 1)! = λn t n 1 e λt (n 1)! The solution to the differential equation is dy + h(t)y = g(t) dt e h(t)dt g(t)dt + c y =. e h(t)dt Now h(t) = λ and g(t) = λn t n 1 e λt. We have (n 1)! (e λdt )[ λn t n 1 e λt (n 1)! ]dt + c (e λt )[ λn t n 1 e λt (n 1)! ]dt + c p n (t) = = e λdt tn 1 λn (n 1)! = dt + c = ( e λt ) (λt) = e λt n + c. n! λn tn n(n 1)! + c e λt SydU MSH3 GLM (2015) First semester Dr. J. Chan 231 e λt
26 Since p n (0) = Pr(N(0) = n) = 0 c = 0, n 1, we have p n (t) = e λt (λt) n n! which is the pmf of Poisson distribution. SydU MSH3 GLM (2015) First semester Dr. J. Chan 232
Poisson Regression. James H. Steiger. Department of Psychology and Human Development Vanderbilt University
Poisson Regression James H. Steiger Department of Psychology and Human Development Vanderbilt University James H. Steiger (Vanderbilt University) Poisson Regression 1 / 49 Poisson Regression 1 Introduction
More informationGeneralized linear models
Generalized linear models Douglas Bates November 01, 2010 Contents 1 Definition 1 2 Links 2 3 Estimating parameters 5 4 Example 6 5 Model building 8 6 Conclusions 8 7 Summary 9 1 Generalized Linear Models
More informationMSH3 Generalized linear model
Contents MSH3 Generalized linear model 5 Logit Models for Binary Data 173 5.1 The Bernoulli and binomial distributions......... 173 5.1.1 Mean, variance and higher order moments.... 173 5.1.2 Normal limit....................
More informationMSH3 Generalized linear model
Contents MSH3 Generalized linear model 7 Log-Linear Model 231 7.1 Equivalence between GOF measures........... 231 7.2 Sampling distribution................... 234 7.3 Interpreting Log-Linear models..............
More informationLinear Regression Models P8111
Linear Regression Models P8111 Lecture 25 Jeff Goldsmith April 26, 2016 1 of 37 Today s Lecture Logistic regression / GLMs Model framework Interpretation Estimation 2 of 37 Linear regression Course started
More informationParametric Modelling of Over-dispersed Count Data. Part III / MMath (Applied Statistics) 1
Parametric Modelling of Over-dispersed Count Data Part III / MMath (Applied Statistics) 1 Introduction Poisson regression is the de facto approach for handling count data What happens then when Poisson
More information12 Modelling Binomial Response Data
c 2005, Anthony C. Brooms Statistical Modelling and Data Analysis 12 Modelling Binomial Response Data 12.1 Examples of Binary Response Data Binary response data arise when an observation on an individual
More informationSCHOOL OF MATHEMATICS AND STATISTICS. Linear and Generalised Linear Models
SCHOOL OF MATHEMATICS AND STATISTICS Linear and Generalised Linear Models Autumn Semester 2017 18 2 hours Attempt all the questions. The allocation of marks is shown in brackets. RESTRICTED OPEN BOOK EXAMINATION
More informationUNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator
UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS Duration - 3 hours Aids Allowed: Calculator LAST NAME: FIRST NAME: STUDENT NUMBER: There are 27 pages
More informationST3241 Categorical Data Analysis I Generalized Linear Models. Introduction and Some Examples
ST3241 Categorical Data Analysis I Generalized Linear Models Introduction and Some Examples 1 Introduction We have discussed methods for analyzing associations in two-way and three-way tables. Now we will
More informationA Generalized Linear Model for Binomial Response Data. Copyright c 2017 Dan Nettleton (Iowa State University) Statistics / 46
A Generalized Linear Model for Binomial Response Data Copyright c 2017 Dan Nettleton (Iowa State University) Statistics 510 1 / 46 Now suppose that instead of a Bernoulli response, we have a binomial response
More informationGeneralized Linear Models 1
Generalized Linear Models 1 STA 2101/442: Fall 2012 1 See last slide for copyright information. 1 / 24 Suggested Reading: Davison s Statistical models Exponential families of distributions Sec. 5.2 Chapter
More informationSTA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).
STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) T In 2 2 tables, statistical independence is equivalent to a population
More informationModeling Overdispersion
James H. Steiger Department of Psychology and Human Development Vanderbilt University Regression Modeling, 2009 1 Introduction 2 Introduction In this lecture we discuss the problem of overdispersion in
More information9 Generalized Linear Models
9 Generalized Linear Models The Generalized Linear Model (GLM) is a model which has been built to include a wide range of different models you already know, e.g. ANOVA and multiple linear regression models
More informationLecture 8. Poisson models for counts
Lecture 8. Poisson models for counts Jesper Rydén Department of Mathematics, Uppsala University jesper.ryden@math.uu.se Statistical Risk Analysis Spring 2014 Absolute risks The failure intensity λ(t) describes
More informationMixed models in R using the lme4 package Part 5: Generalized linear mixed models
Mixed models in R using the lme4 package Part 5: Generalized linear mixed models Douglas Bates Madison January 11, 2011 Contents 1 Definition 1 2 Links 2 3 Example 7 4 Model building 9 5 Conclusions 14
More informationLog-linear Models for Contingency Tables
Log-linear Models for Contingency Tables Statistics 149 Spring 2006 Copyright 2006 by Mark E. Irwin Log-linear Models for Two-way Contingency Tables Example: Business Administration Majors and Gender A
More informationMixed models in R using the lme4 package Part 7: Generalized linear mixed models
Mixed models in R using the lme4 package Part 7: Generalized linear mixed models Douglas Bates University of Wisconsin - Madison and R Development Core Team University of
More informationSTA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).
STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) (b) (c) (d) (e) In 2 2 tables, statistical independence is equivalent
More informationPoisson Regression. Gelman & Hill Chapter 6. February 6, 2017
Poisson Regression Gelman & Hill Chapter 6 February 6, 2017 Military Coups Background: Sub-Sahara Africa has experienced a high proportion of regime changes due to military takeover of governments for
More informationRegression models. Generalized linear models in R. Normal regression models are not always appropriate. Generalized linear models. Examples.
Regression models Generalized linear models in R Dr Peter K Dunn http://www.usq.edu.au Department of Mathematics and Computing University of Southern Queensland ASC, July 00 The usual linear regression
More informationMixed models in R using the lme4 package Part 5: Generalized linear mixed models
Mixed models in R using the lme4 package Part 5: Generalized linear mixed models Douglas Bates 2011-03-16 Contents 1 Generalized Linear Mixed Models Generalized Linear Mixed Models When using linear mixed
More informationPoisson Regression. Ryan Godwin. ECON University of Manitoba
Poisson Regression Ryan Godwin ECON 7010 - University of Manitoba Abstract. These lecture notes introduce Maximum Likelihood Estimation (MLE) of a Poisson regression model. 1 Motivating the Poisson Regression
More informationSurvival Analysis I (CHL5209H)
Survival Analysis Dalla Lana School of Public Health University of Toronto olli.saarela@utoronto.ca January 7, 2015 31-1 Literature Clayton D & Hills M (1993): Statistical Models in Epidemiology. Not really
More informationChapter 22: Log-linear regression for Poisson counts
Chapter 22: Log-linear regression for Poisson counts Exposure to ionizing radiation is recognized as a cancer risk. In the United States, EPA sets guidelines specifying upper limits on the amount of exposure
More informationSTA 450/4000 S: January
STA 450/4000 S: January 6 005 Notes Friday tutorial on R programming reminder office hours on - F; -4 R The book Modern Applied Statistics with S by Venables and Ripley is very useful. Make sure you have
More informationMohammed. Research in Pharmacoepidemiology National School of Pharmacy, University of Otago
Mohammed Research in Pharmacoepidemiology (RIPE) @ National School of Pharmacy, University of Otago What is zero inflation? Suppose you want to study hippos and the effect of habitat variables on their
More informationLogistic Regression. James H. Steiger. Department of Psychology and Human Development Vanderbilt University
Logistic Regression James H. Steiger Department of Psychology and Human Development Vanderbilt University James H. Steiger (Vanderbilt University) Logistic Regression 1 / 38 Logistic Regression 1 Introduction
More informationModel Estimation Example
Ronald H. Heck 1 EDEP 606: Multivariate Methods (S2013) April 7, 2013 Model Estimation Example As we have moved through the course this semester, we have encountered the concept of model estimation. Discussions
More informationSTAT 526 Spring Midterm 1. Wednesday February 2, 2011
STAT 526 Spring 2011 Midterm 1 Wednesday February 2, 2011 Time: 2 hours Name (please print): Show all your work and calculations. Partial credit will be given for work that is partially correct. Points
More informationOutline. Mixed models in R using the lme4 package Part 5: Generalized linear mixed models. Parts of LMMs carried over to GLMMs
Outline Mixed models in R using the lme4 package Part 5: Generalized linear mixed models Douglas Bates University of Wisconsin - Madison and R Development Core Team UseR!2009,
More informationProbability Distributions Columns (a) through (d)
Discrete Probability Distributions Columns (a) through (d) Probability Mass Distribution Description Notes Notation or Density Function --------------------(PMF or PDF)-------------------- (a) (b) (c)
More informationGeneralized Linear Models. Last time: Background & motivation for moving beyond linear
Generalized Linear Models Last time: Background & motivation for moving beyond linear regression - non-normal/non-linear cases, binary, categorical data Today s class: 1. Examples of count and ordered
More informationStat 579: Generalized Linear Models and Extensions
Stat 579: Generalized Linear Models and Extensions Yan Lu Jan, 2018, week 3 1 / 67 Hypothesis tests Likelihood ratio tests Wald tests Score tests 2 / 67 Generalized Likelihood ratio tests Let Y = (Y 1,
More informationTwo Hours. Mathematical formula books and statistical tables are to be provided THE UNIVERSITY OF MANCHESTER. 26 May :00 16:00
Two Hours MATH38052 Mathematical formula books and statistical tables are to be provided THE UNIVERSITY OF MANCHESTER GENERALISED LINEAR MODELS 26 May 2016 14:00 16:00 Answer ALL TWO questions in Section
More informationChapter 4: Generalized Linear Models-II
: Generalized Linear Models-II Dipankar Bandyopadhyay Department of Biostatistics, Virginia Commonwealth University BIOS 625: Categorical Data & GLM [Acknowledgements to Tim Hanson and Haitao Chu] D. Bandyopadhyay
More informationStatistical Methods III Statistics 212. Problem Set 2 - Answer Key
Statistical Methods III Statistics 212 Problem Set 2 - Answer Key 1. (Analysis to be turned in and discussed on Tuesday, April 24th) The data for this problem are taken from long-term followup of 1423
More informationOutline of GLMs. Definitions
Outline of GLMs Definitions This is a short outline of GLM details, adapted from the book Nonparametric Regression and Generalized Linear Models, by Green and Silverman. The responses Y i have density
More informationGeneralized linear models
Generalized linear models Outline for today What is a generalized linear model Linear predictors and link functions Example: estimate a proportion Analysis of deviance Example: fit dose- response data
More informationPoisson Regression. The Training Data
The Training Data Poisson Regression Office workers at a large insurance company are randomly assigned to one of 3 computer use training programmes, and their number of calls to IT support during the following
More informationNATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) ST3241 Categorical Data Analysis. (Semester II: )
NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) Categorical Data Analysis (Semester II: 2010 2011) April/May, 2011 Time Allowed : 2 Hours Matriculation No: Seat No: Grade Table Question 1 2 3
More informationGeneralized Linear Models. Kurt Hornik
Generalized Linear Models Kurt Hornik Motivation Assuming normality, the linear model y = Xβ + e has y = β + ε, ε N(0, σ 2 ) such that y N(μ, σ 2 ), E(y ) = μ = β. Various generalizations, including general
More information22s:152 Applied Linear Regression. Example: Study on lead levels in children. Ch. 14 (sec. 1) and Ch. 15 (sec. 1 & 4): Logistic Regression
22s:52 Applied Linear Regression Ch. 4 (sec. and Ch. 5 (sec. & 4: Logistic Regression Logistic Regression When the response variable is a binary variable, such as 0 or live or die fail or succeed then
More informationTento projekt je spolufinancován Evropským sociálním fondem a Státním rozpočtem ČR InoBio CZ.1.07/2.2.00/
Tento projekt je spolufinancován Evropským sociálním fondem a Státním rozpočtem ČR InoBio CZ.1.07/2.2.00/28.0018 Statistical Analysis in Ecology using R Linear Models/GLM Ing. Daniel Volařík, Ph.D. 13.
More informationAdministration. Homework 1 on web page, due Feb 11 NSERC summer undergraduate award applications due Feb 5 Some helpful books
STA 44/04 Jan 6, 00 / 5 Administration Homework on web page, due Feb NSERC summer undergraduate award applications due Feb 5 Some helpful books STA 44/04 Jan 6, 00... administration / 5 STA 44/04 Jan 6,
More informationIntroduction to the Generalized Linear Model: Logistic regression and Poisson regression
Introduction to the Generalized Linear Model: Logistic regression and Poisson regression Statistical modelling: Theory and practice Gilles Guillot gigu@dtu.dk November 4, 2013 Gilles Guillot (gigu@dtu.dk)
More informationLikelihoods for Generalized Linear Models
1 Likelihoods for Generalized Linear Models 1.1 Some General Theory We assume that Y i has the p.d.f. that is a member of the exponential family. That is, f(y i ; θ i, φ) = exp{(y i θ i b(θ i ))/a i (φ)
More informationUNIVERSITY OF TORONTO Faculty of Arts and Science
UNIVERSITY OF TORONTO Faculty of Arts and Science December 2013 Final Examination STA442H1F/2101HF Methods of Applied Statistics Jerry Brunner Duration - 3 hours Aids: Calculator Model(s): Any calculator
More informationLecture 01: Introduction
Lecture 01: Introduction Dipankar Bandyopadhyay, Ph.D. BMTRY 711: Analysis of Categorical Data Spring 2011 Division of Biostatistics and Epidemiology Medical University of South Carolina Lecture 01: Introduction
More informationGeneralized Estimating Equations
Outline Review of Generalized Linear Models (GLM) Generalized Linear Model Exponential Family Components of GLM MLE for GLM, Iterative Weighted Least Squares Measuring Goodness of Fit - Deviance and Pearson
More informationIntroduction to General and Generalized Linear Models
Introduction to General and Generalized Linear Models Generalized Linear Models - part II Henrik Madsen Poul Thyregod Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs.
More informationClassification. Chapter Introduction. 6.2 The Bayes classifier
Chapter 6 Classification 6.1 Introduction Often encountered in applications is the situation where the response variable Y takes values in a finite set of labels. For example, the response Y could encode
More informationReview: what is a linear model. Y = β 0 + β 1 X 1 + β 2 X 2 + A model of the following form:
Outline for today What is a generalized linear model Linear predictors and link functions Example: fit a constant (the proportion) Analysis of deviance table Example: fit dose-response data using logistic
More informationHigh-Throughput Sequencing Course
High-Throughput Sequencing Course DESeq Model for RNA-Seq Biostatistics and Bioinformatics Summer 2017 Outline Review: Standard linear regression model (e.g., to model gene expression as function of an
More informationUNIVERSIDAD CARLOS III DE MADRID ECONOMETRICS FINAL EXAM (Type B) 2. This document is self contained. Your are not allowed to use any other material.
DURATION: 125 MINUTES Directions: UNIVERSIDAD CARLOS III DE MADRID ECONOMETRICS FINAL EXAM (Type B) 1. This is an example of a exam that you can use to self-evaluate about the contents of the course Econometrics
More informationThe Multinomial Model
The Multinomial Model STA 312: Fall 2012 Contents 1 Multinomial Coefficients 1 2 Multinomial Distribution 2 3 Estimation 4 4 Hypothesis tests 8 5 Power 17 1 Multinomial Coefficients Multinomial coefficient
More informationLogistic regression. 11 Nov Logistic regression (EPFL) Applied Statistics 11 Nov / 20
Logistic regression 11 Nov 2010 Logistic regression (EPFL) Applied Statistics 11 Nov 2010 1 / 20 Modeling overview Want to capture important features of the relationship between a (set of) variable(s)
More informationLecture 14: Introduction to Poisson Regression
Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu 8 May 2007 1 / 52 Overview Modelling counts Contingency tables Poisson regression models 2 / 52 Modelling counts I Why
More informationModelling counts. Lecture 14: Introduction to Poisson Regression. Overview
Modelling counts I Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu Why count data? Number of traffic accidents per day Mortality counts in a given neighborhood, per week
More informationEDRP lecture 7. Poisson process. Pawe J. Szab owski
EDRP lecture 7. Poisson process. Pawe J. Szab owski 2007 Counting process Random process fn t ; t 0g is called a counting process, if N t is equal total number of events that have happened up to moment
More information1. Hypothesis testing through analysis of deviance. 3. Model & variable selection - stepwise aproaches
Sta 216, Lecture 4 Last Time: Logistic regression example, existence/uniqueness of MLEs Today s Class: 1. Hypothesis testing through analysis of deviance 2. Standard errors & confidence intervals 3. Model
More informationUNIVERSIDAD CARLOS III DE MADRID ECONOMETRICS Academic year 2009/10 FINAL EXAM (2nd Call) June, 25, 2010
UNIVERSIDAD CARLOS III DE MADRID ECONOMETRICS Academic year 2009/10 FINAL EXAM (2nd Call) June, 25, 2010 Very important: Take into account that: 1. Each question, unless otherwise stated, requires a complete
More informationEconometrics II. Seppo Pynnönen. Spring Department of Mathematics and Statistics, University of Vaasa, Finland
Department of Mathematics and Statistics, University of Vaasa, Finland Spring 2018 Part III Limited Dependent Variable Models As of Jan 30, 2017 1 Background 2 Binary Dependent Variable The Linear Probability
More informationNormal distribution We have a random sample from N(m, υ). The sample mean is Ȳ and the corrected sum of squares is S yy. After some simplification,
Likelihood Let P (D H) be the probability an experiment produces data D, given hypothesis H. Usually H is regarded as fixed and D variable. Before the experiment, the data D are unknown, and the probability
More informationOne-Way Tables and Goodness of Fit
Stat 504, Lecture 5 1 One-Way Tables and Goodness of Fit Key concepts: One-way Frequency Table Pearson goodness-of-fit statistic Deviance statistic Pearson residuals Objectives: Learn how to compute the
More informationGeneralized Linear Models
York SPIDA John Fox Notes Generalized Linear Models Copyright 2010 by John Fox Generalized Linear Models 1 1. Topics I The structure of generalized linear models I Poisson and other generalized linear
More informationSTAT 526 Spring Final Exam. Thursday May 5, 2011
STAT 526 Spring 2011 Final Exam Thursday May 5, 2011 Time: 2 hours Name (please print): Show all your work and calculations. Partial credit will be given for work that is partially correct. Points will
More informationVarious Issues in Fitting Contingency Tables
Various Issues in Fitting Contingency Tables Statistics 149 Spring 2006 Copyright 2006 by Mark E. Irwin Complete Tables with Zero Entries In contingency tables, it is possible to have zero entries in a
More informationLogistic Regressions. Stat 430
Logistic Regressions Stat 430 Final Project Final Project is, again, team based You will decide on a project - only constraint is: you are supposed to use techniques for a solution that are related to
More informationFigure 36: Respiratory infection versus time for the first 49 children.
y BINARY DATA MODELS We devote an entire chapter to binary data since such data are challenging, both in terms of modeling the dependence, and parameter interpretation. We again consider mixed effects
More informationStatistics 203: Introduction to Regression and Analysis of Variance Course review
Statistics 203: Introduction to Regression and Analysis of Variance Course review Jonathan Taylor - p. 1/?? Today Review / overview of what we learned. - p. 2/?? General themes in regression models Specifying
More informationLoglinear models. STAT 526 Professor Olga Vitek
Loglinear models STAT 526 Professor Olga Vitek April 19, 2011 8 Can Use Poisson Likelihood To Model Both Poisson and Multinomial Counts 8-1 Recall: Poisson Distribution Probability distribution: Y - number
More informationChapter 14 Logistic Regression, Poisson Regression, and Generalized Linear Models
Chapter 14 Logistic Regression, Poisson Regression, and Generalized Linear Models 許湘伶 Applied Linear Regression Models (Kutner, Nachtsheim, Neter, Li) hsuhl (NUK) LR Chap 10 1 / 29 14.1 Regression Models
More informationCategorical Variables and Contingency Tables: Description and Inference
Categorical Variables and Contingency Tables: Description and Inference STAT 526 Professor Olga Vitek March 3, 2011 Reading: Agresti Ch. 1, 2 and 3 Faraway Ch. 4 3 Univariate Binomial and Multinomial Measurements
More informationCategorical Data Analysis Chapter 3
Categorical Data Analysis Chapter 3 The actual coverage probability is usually a bit higher than the nominal level. Confidence intervals for association parameteres Consider the odds ratio in the 2x2 table,
More informationR Hints for Chapter 10
R Hints for Chapter 10 The multiple logistic regression model assumes that the success probability p for a binomial random variable depends on independent variables or design variables x 1, x 2,, x k.
More information8 Nominal and Ordinal Logistic Regression
8 Nominal and Ordinal Logistic Regression 8.1 Introduction If the response variable is categorical, with more then two categories, then there are two options for generalized linear models. One relies on
More informationLOGISTIC REGRESSION Joseph M. Hilbe
LOGISTIC REGRESSION Joseph M. Hilbe Arizona State University Logistic regression is the most common method used to model binary response data. When the response is binary, it typically takes the form of
More information3. Poisson Processes (12/09/12, see Adult and Baby Ross)
3. Poisson Processes (12/09/12, see Adult and Baby Ross) Exponential Distribution Poisson Processes Poisson and Exponential Relationship Generalizations 1 Exponential Distribution Definition: The continuous
More informationLinear Regression With Special Variables
Linear Regression With Special Variables Junhui Qian December 21, 2014 Outline Standardized Scores Quadratic Terms Interaction Terms Binary Explanatory Variables Binary Choice Models Standardized Scores:
More informationMODELING COUNT DATA Joseph M. Hilbe
MODELING COUNT DATA Joseph M. Hilbe Arizona State University Count models are a subset of discrete response regression models. Count data are distributed as non-negative integers, are intrinsically heteroskedastic,
More informationStat 5102 Final Exam May 14, 2015
Stat 5102 Final Exam May 14, 2015 Name Student ID The exam is closed book and closed notes. You may use three 8 1 11 2 sheets of paper with formulas, etc. You may also use the handouts on brand name distributions
More informationHomework 1 Solutions
36-720 Homework 1 Solutions Problem 3.4 (a) X 2 79.43 and G 2 90.33. We should compare each to a χ 2 distribution with (2 1)(3 1) 2 degrees of freedom. For each, the p-value is so small that S-plus reports
More information" M A #M B. Standard deviation of the population (Greek lowercase letter sigma) σ 2
Notation and Equations for Final Exam Symbol Definition X The variable we measure in a scientific study n The size of the sample N The size of the population M The mean of the sample µ The mean of the
More informationToday. HW 1: due February 4, pm. Aspects of Design CD Chapter 2. Continue with Chapter 2 of ELM. In the News:
Today HW 1: due February 4, 11.59 pm. Aspects of Design CD Chapter 2 Continue with Chapter 2 of ELM In the News: STA 2201: Applied Statistics II January 14, 2015 1/35 Recap: data on proportions data: y
More informationGeneralized Linear Models (1/29/13)
STA613/CBB540: Statistical methods in computational biology Generalized Linear Models (1/29/13) Lecturer: Barbara Engelhardt Scribe: Yangxiaolu Cao When processing discrete data, two commonly used probability
More informationEconometrics Lecture 5: Limited Dependent Variable Models: Logit and Probit
Econometrics Lecture 5: Limited Dependent Variable Models: Logit and Probit R. G. Pierse 1 Introduction In lecture 5 of last semester s course, we looked at the reasons for including dichotomous variables
More informationGeneralized Linear Models
Generalized Linear Models 1/37 The Kelp Data FRONDS 0 20 40 60 20 40 60 80 100 HLD_DIAM FRONDS are a count variable, cannot be < 0 2/37 Nonlinear Fits! FRONDS 0 20 40 60 log NLS 20 40 60 80 100 HLD_DIAM
More informationChecking the Poisson assumption in the Poisson generalized linear model
Checking the Poisson assumption in the Poisson generalized linear model The Poisson regression model is a generalized linear model (glm) satisfying the following assumptions: The responses y i are independent
More informationSTA216: Generalized Linear Models. Lecture 1. Review and Introduction
STA216: Generalized Linear Models Lecture 1. Review and Introduction Let y 1,..., y n denote n independent observations on a response Treat y i as a realization of a random variable Y i In the general
More informationSTA 303 H1S / 1002 HS Winter 2011 Test March 7, ab 1cde 2abcde 2fghij 3
STA 303 H1S / 1002 HS Winter 2011 Test March 7, 2011 LAST NAME: FIRST NAME: STUDENT NUMBER: ENROLLED IN: (circle one) STA 303 STA 1002 INSTRUCTIONS: Time: 90 minutes Aids allowed: calculator. Some formulae
More informationStatistical analysis of trends in climate indicators by means of counts
U.U.D.M. Project Report 2016:43 Statistical analysis of trends in climate indicators by means of counts Erik Jansson Examensarbete i matematik, 15 hp Handledare: Jesper Rydén Examinator: Jörgen Östensson
More informationSTAT 7030: Categorical Data Analysis
STAT 7030: Categorical Data Analysis 5. Logistic Regression Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2012 Peng Zeng (Auburn University) STAT 7030 Lecture Notes Fall 2012
More informationExercise 5.4 Solution
Exercise 5.4 Solution Niels Richard Hansen University of Copenhagen May 7, 2010 1 5.4(a) > leukemia
More informationMatched Pair Data. Stat 557 Heike Hofmann
Matched Pair Data Stat 557 Heike Hofmann Outline Marginal Homogeneity - review Binary Response with covariates Ordinal response Symmetric Models Subject-specific vs Marginal Model conditional logistic
More informationPoisson regression 1/15
Poisson regression 1/15 2/15 Counts data Examples of counts data: Number of hospitalizations over a period of time Number of passengers in a bus station Blood cells number in a blood sample Number of typos
More informationBiostatistics for physicists fall Correlation Linear regression Analysis of variance
Biostatistics for physicists fall 2015 Correlation Linear regression Analysis of variance Correlation Example: Antibody level on 38 newborns and their mothers There is a positive correlation in antibody
More informationClinical Trials. Olli Saarela. September 18, Dalla Lana School of Public Health University of Toronto.
Introduction to Dalla Lana School of Public Health University of Toronto olli.saarela@utoronto.ca September 18, 2014 38-1 : a review 38-2 Evidence Ideal: to advance the knowledge-base of clinical medicine,
More informationCategorical data analysis Chapter 5
Categorical data analysis Chapter 5 Interpreting parameters in logistic regression The sign of β determines whether π(x) is increasing or decreasing as x increases. The rate of climb or descent increases
More information