# Introduction to General and Generalized Linear Models

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Introduction to General and Generalized Linear Models General Linear Models - part I Henrik Madsen Poul Thyregod Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs. Lyngby October 2010 Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

2 Today The general linear model - intro The multivariate normal distribution Deviance Likelihood, score function and information matrix The general linear model - definition Estimation Fitted values Residuals Partitioning of variation Likelihood ratio tests The coefficient of determination Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

3 The general linear model - intro The general linear model - intro We will use the term classical GLM for the General linear model to distinguish it from GLM which is used for the Generalized linear model. The classical GLM leads to a unique way of describing the variations of experiments with a continuous variable. The classical GLM s include Regression analysis Analysis of variance - ANOVA Analysis of covariance - ANCOVA The residuals are assumed to follow a multivariate normal distribution in the classical GLM. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

4 The general linear model - intro The general linear model - intro Classical GLM s are naturally studied in the framework of the multivariate normal distribution. We will consider the set of n observations as a sample from a n-dimensional normal distribution. Under the normal distribution model, maximum-likelihood estimation of mean value parameters may be interpreted geometrically as projection on an appropriate subspace. The likelihood-ratio test statistics for model reduction may be expressed in terms of norms of these projections. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

5 The multivariate normal distribution The multivariate normal distribution Let Y = (Y 1, Y 2,..., Y n ) T be a random vector with Y 1, Y 2,..., Y n independent identically distributed (iid) N(0, 1) random variables. Note that E[Y ] = 0 and the variance-covariance matrix Var[Y ] = I. Definition (Multivariate normal distribution) Z has an k-dimensional multivariate normal distribution if Z has the same distribution as AY + b for some n, some k n matrix A, and some k vector b. We indicate the multivariate normal distribution by writing Z N(b, AA T ). Since A and b are fixed, we have E[Z] = b and Var[Z] = AA T. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

6 The multivariate normal distribution The multivariate normal distribution Let us assume that the variance-covariance matrix is known apart from a constant factor, σ 2, i.e. Var[Z] = σ 2 Σ. The density for the k-dimensional random vector Z with mean µ and covariance σ 2 Σ is: [ 1 f Z (z) = (2π) k/2 σ k det Σ exp 1 ] 2σ 2 (z µ)t Σ 1 (z µ) where Σ is seen to be (a) symmetric and (b) positive semi-definite. We write Z N k (µ, σ 2 Σ). Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

7 The multivariate normal distribution The normal density as a statistical model Consider now the n observations Y = (Y 1, Y 2,..., Y n ) T, and assume that a statistical model is Y N n (µ, σ 2 Σ) for y R n The variance-covariance matrix for the observations is called the dispersion matrix, denoted D[Y ], i.e. the dispersion matrix for Y is D[Y ] = σ 2 Σ Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

8 Inner product and norm Inner product and norm Definition (Inner product and norm) The bilinear form δ Σ (y 1, y 2 ) = y T 1 Σ 1 y 2 defines an inner product in R n. Corresponding to this inner product we can define orthogonality, which is obtained when the inner product is zero. A norm is defined by y Σ = δ Σ (y, y). Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

9 Deviance Deviance for normal distributed variables Definition (Deviance for normal distributed variables) Let us introduce the notation D(y; µ) = δ Σ (y µ, y µ) = (y µ) T Σ 1 (y µ) to denote the quadratic norm of the vector (y µ) corresponding to the inner product defined by Σ 1. For a normal distribution with Σ = I, the deviance is just the Residual Sum of Squares (RSS). Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

10 Deviance Deviance for normal distributed variables Using this notation the normal density is expressed as a density defined on any finite dimensional vector space equipped with the inner product, δ Σ : [ f(y; µ, σ 2 1 ) = ( 2π) n σ n det(σ) exp 1 ] D(y; µ). 2σ2 Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

11 Likelihood, score function and information matrix The likelihood and log-likelihood function The likelihood function is: L(µ, σ 2 ; y) = 1 ( 2π) n σ n det(σ) exp [ 1 ] D(y; µ) 2σ2 The log-likelihood function is (apart from an additive constant): l µ,σ 2(µ, σ 2 ; y) = (n/2) log(σ 2 ) 1 2σ 2 (y µ)t Σ 1 (y µ) = (n/2) log(σ 2 ) 1 D(y; µ). 2σ2 Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

12 Likelihood, score function and information matrix The score function, observed - and expected information for µ The score function wrt. µ is µ l µ,σ 2(µ, σ2 ; y) = 1 σ 2 [ Σ 1 y Σ 1 µ ] = 1 σ 2 Σ 1 (y µ) The observed information (wrt. µ) is j(µ; y) = 1 σ 2 Σ 1. It is seen that the observed information does not depend on the observations y. Hence the expected information is i(µ) = 1 σ 2 Σ 1. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

13 The general linear model The general linear model In the case of a normal density the observation Y i is most often written as Y i = µ i + ɛ i which for all n observations (Y 1, Y 2,..., Y n ) can be written on the matrix form Y = µ + ɛ where Y N n (µ, σ 2 Σ) for y R n Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

14 General Linear Models The general linear model In the linear model it is assumed that µ belongs to a linear (or affine) subspace Ω 0 of R n. The full model is a model with Ω full = R n and hence each observation fits the model perfectly, i.e. µ = y. The most restricted model is the null model with Ω null = R. It only describes the variations of the observations by a common mean value for all observations. In practice, one often starts with formulating a rather comprehensive model with Ω = R k, where k < n. We will call such a model a sufficient model. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

15 The general linear model The General Linear Model Definition (The general linear model) Assume that Y 1, Y 2,..., Y n is normally distributed as described before. A general linear model for Y 1, Y 2,..., Y n is a model where an affine hypothesis is formulated for µ. The hypothesis is of the form H 0 : µ µ 0 Ω 0, where Ω 0 is a linear subspace of R n of dimension k, and where µ 0 denotes a vector of known offset values. Definition (Dimension of general linear model) The dimension of the subspace Ω 0 for the linear model is the dimension of the model. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

16 The design matrix The general linear model Definition (Design matrix for classical GLM) Assume that the linear subspace Ω 0 = span{x 1,..., x k }, i.e. the subspace is spanned by k vectors (k < n). Consider a general linear model where the hypothesis can be written as H 0 : µ µ 0 = Xβ with β R k, where X has full rank. The n k matrix X of known deterministic coefficients is called the design matrix. The i th row of the design matrix is given by the model vector for the i th observation. x T i = Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37 x i1 x i2. x ik T,

17 Estimation Estimation of mean value parameters Under the hypothesis H 0 : µ Ω 0, the maximum likelihood estimate for the set µ is found as the orthogonal projection (with respect to δ Σ ), p 0 (y) of y onto the linear subspace Ω 0. Theorem (ML estimates of mean value parameters) For hypothesis of the form H 0 : µ(β) = Xβ the maximum likelihood estimated for β is found as a solution to the normal equation X T Σ 1 y = X T Σ 1 X β. If X has full rank, the solution is uniquely given by β = (X T Σ 1 X) 1 X T Σ 1 y Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

18 Estimation Properties of the ML estimator Theorem (Properties of the ML estimator) For the ML estimator we have β N k (β, σ 2 (X T Σ 1 X) 1 ) Unknown Σ Notice that it has been assumed that Σ is known. If Σ is unknown, one possibility is to use the relaxation algorithm described in Madsen (2008) a. a Madsen, H. (2008) Time Series Analysis. Chapman, Hall Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

19 Fitted values Fitted values Fitted or predicted values The fitted values µ = X β is found as the projection of y (denoted p 0 (y)) on to the subspace Ω 0 spanned by X, and β denotes the local coordinates for the projection. Definition (Projection matrix) A matrix H is a projection matrix if and only if (a) H T = H and (b) H 2 = H, i.e. the matrix is idempotent. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

20 The hat matrix Fitted values The matrix is a projection matrix. H = X[X T Σ 1 X] 1 X T Σ 1 The projection matrix provides the predicted values µ, since µ = p 0 (y) = X β = Hy It follows that the predicted values are normally distributed with D[X β] = σ 2 X[X T Σ 1 X] 1 X T = σ 2 HΣ The matrix H is often termed the hat matrix since it transforms the observations y to their predicted values symbolized by a hat on the µ s. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

21 Residuals Residuals The observed residuals are r = y X β = (I H)y Orthogonality The maximum likelihood estimate for β is found as the value of β which minimizes the distance y Xβ. The normal equations show that X T Σ 1 (y X β) = 0 i.e. the residuals are orthogonal (with respect to Σ 1 ) to the subspace Ω 0. The residuals are thus orthogonal to the fitted or predicted values. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

22 Residuals Residuals 3.5 Likelihood ratio tests 45 y y y p o (y) Ω 0 0 p 0 (y) p 0 (y) = X β Figure 3.1: Orthogonality between the residual (y X b β) and the vector X b β. Figure: Orthogonality between the residual (y X β) and the vector X β. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

23 Residuals Residuals The residuals r = (I H)Y are normally distributed with D[r] = σ 2 (I H) The individual residuals do not have the same variance. The residuals are thus belonging to a subspace of dimension n k, which is orthogonal to Ω 0. It may be shown that the distribution of the residuals r is independent of the fitted values X β. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

24 Cochran s theorem Residuals Theorem (Cochran s theorem) Suppose that Y N n (0, I n ) (i.e. standard multivariate Gaussian random variable) Y T Y = Y T H 1 Y + Y T H 2 Y + + Y T H k Y where H i is a symmetric n n matrix with rank n i, i = 1, 2,..., k. Then any one of the following conditions implies the other two: i The ranks of the H i adds to n, i.e. k i=1 n i = n ii Each quadratic form Y T H i Y χ 2 n i (thus the H i are positive semidefinite) iii All the quadratic forms Y T H i Y are independent (necessary and sufficient condition). Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

25 Partitioning of variation Partitioning of variation Partitioning of the variation D(y; Xβ) = D(y; X β) + D(X β; Xβ) = (y X β) T Σ 1 (y X β) + ( β β) T X T Σ 1 X( β β) (y X β) T Σ 1 (y X β) Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

26 Partitioning of variation Partitioning of variation χ 2 -distribution of individual contributions Under H 0 it follows from the normal distribution of Y that D(y; Xβ) = (y Xβ) T Σ 1 (y Xβ) σ 2 χ 2 n Furthermore, it follows from the normal distribution of r and of β that D(y; X β) = (y X β) T Σ 1 (y X β) σ 2 χ 2 n k D(X β; Xβ) = ( β β) T X T Σ 1 X( β β) σ 2 χ 2 k moreover, the independence of r and X β implies that D(y; X β) and D(X β; Xβ) are independent. Thus, the σ 2 χ 2 n-distribution on the left side is partitioned into two independent χ 2 distributed variables with n k and k degrees of freedom, respectively. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

27 Estimation of the residual variance σ 2 Estimation of the residual variance σ 2 Theorem (Estimation of the variance) Under the hypothesis H 0 : µ(β) = Xβ the maximum marginal likelihood estimator for the variance σ 2 is σ 2 = D(y; X β) n k = (y X β) T Σ 1 (y X β) n k Under the hypothesis, σ 2 σ 2 χ 2 f /f with f = n k. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

28 Likelihood ratio tests Likelihood ratio tests In the classical GLM case the exact distribution of the likelihood ratio test statistic may be derived. Consider the following model for the data Y N n (µ, σ 2 Σ). Let us assume that we have the sufficient model with dim(ω 1 ) = m 1. H 1 : µ Ω 1 R n Now we want to test whether the model may be reduced to a model where µ is restricted to some subspace of Ω 1, and hence we introduce Ω 0 Ω 1 as a linear (affine) subspace with dim(ω 0 ) = m 0. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

29 Residual under hypothesis Model reduction Likelihood ratio tests n m 0 y p 0 (y) 2 y y p 0 (y) y y p 1 (y) Ω 1 Ω 0 0 p 0 (y) p 1 (y) p 1 (y) p 0 (y) Figure 3.2: Model reduction. The partitioning of the deviance corresponding to a Figure: Model reduction. The partitioning of the deviance corresponding to a test test of the hypothesis H 0 : µ Ω 0 under the assumption of H 1 : 1. of the hypothesis H 0 : µ Ω 0 under the assumption of H 1 : µ Ω 1. Initial test for model sufficiency Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

30 Likelihood ratio tests Test for model reduction Theorem (A test for model reduction) The likelihood ratio test statistic for testing is a monotone function of H 0 : µ Ω 0 against the alternative H 1 : µ Ω 1 \ Ω 0 F (y) = D(p 1(y); p 0 (y))/(m 1 m 0 ) D(y; p 1 (y))/(n m 1 ) where p 1 (y) and p 0 (y) denote the projection of y on Ω 1 and Ω 0, respectively. Under H 0 we have F F (m 1 m 0, n m 1 ) i.e. large values of F reflects a conflict between the data and H 0, and hence lead to rejection of H 0. The p-value of the test is found as p = P [F (m 1 m 0, n m 1 ) F obs ], where F obs is the observed value of F given the data. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

31 Likelihood ratio tests Test for model reduction The partitioning of the variation is presented in a Deviance table (or an ANalysis Of VAriance table, ANOVA). The table reflects the partitioning in the test for model reduction. The deviance between the variation of the model from the hypothesis is measured using the deviance of the observations from the model as a reference. Under H 0 they are both χ 2 distributed, orthogonal and thus independent. This means that the ratio is F distributed. If the test quantity is large this shows evidence against the model reduction tested using H 0. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

32 Deviance table Likelihood ratio tests Source f Deviance Test statistic, F Model versus hypothesis m 1 m 0 p 1 (y) p 0 (y) 2 p 1 (y) p 0 (y) 2 /(m 1 m 0 ) y p 1 (y) 2 /(n m 1 ) Residual under model n m 1 y p 1 (y) 2 Residual under hypothesis n m 0 y p 0 (y) 2 Table: Deviance table corresponding to a test for model reduction as specified by H 0. For Σ = I this corresponds to an analysis of variance table, and then Deviance is equal to the Sum of Squared deviations (SS) Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

33 Likelihood ratio tests Test for model reduction The test is a conditional test It should be noted that the test has been derived as a conditional test. It is a test for the hypothesis H 0 : µ Ω 0 under the assumption that H 1 : µ Ω 1 is true. The test does in no way assess whether H 1 is in agreement with the data. On the contrary in the test the residual variation under H 1 is used to estimate σ 2, i.e. to assess D(y; p 1 (y)). The test does not depend on the particular parametrization of the hypotheses Note that the test does only depend on the two sub-spaces Ω 1 and Ω 0, but not on how the subspaces have been parametrized (the particular choice of basis, i.e. the design matrix). Therefore it is sometimes said that the test is coordinate free. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

34 Likelihood ratio tests Initial test for model sufficiency In practice, one often starts with formulating a rather comprehensive model, a sufficient model, and then tests whether the model may be reduced to the null model with Ω null = R, i.e. dim Ω null = 1. The hypotheses are where dim Ω 1 = k. H null : µ R H 1 : µ Ω 1 \ R. The hypothesis is a hypothesis of Total homogeneity, namely that all observations are satisfactorily represented by their common mean. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

35 Deviance table Likelihood ratio tests Source f Deviance Test statistic, F Model H null k 1 p 1 (y) p null (y) 2 p 1 (y) p null (y) 2 /(k 1) y p 1 (y) 2 /(n k) Residual under H 1 n k y p 1 (y) 2 Total n 1 y p null (y) 2 Table: Deviance table corresponding to the test for model reduction to the null model. Under H null, F F (k 1, n k), and hence large values of F would indicate rejection of the hypothesis H null. The p-value of the test is p = P [F (k 1, n k) F obs ]. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

36 Coefficient of determination, R 2 Coefficient of determination, R 2 The coefficient of determination, R 2, is defined as R 2 = D(p 1(y); p null (y)) D(y; p null (y)) = 1 D(y; p 1(y)) D(y; p null (y)), 0 R2 1. Suppose you want to predict Y. If you do not know the x s, then the best prediction is y. The variability corresponding to this prediction is expressed by the total variation. If the model is utilized for the prediction, then the prediction error is reduced to the residual variation. R 2 expresses the fraction of the total variation that is explained by the model. As more variables are added to the model, D(y; p 1 (y)) will decrease, and R 2 will increase. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

37 Coefficient of determination, R 2 Adjusted coefficient of determination, R 2 adj The adjusted coefficient of determination aims to correct that R 2 increases as more variables are added to the model. It is defined as: R 2 adj = 1 D(y; p 1(y))/(n k) D(y; p null (y))/(n 1). It charges a penalty for the number of variables in the model. As more variables are added to the model, D(y; p 1 (y)) decreases, but the corresponding degrees of freedom also decreases. The numerator in may increase if the reduction in the residual deviance caused by the additional variables does not compensate for the loss in the degrees of freedom. Henrik MadsenPoul Thyregod (IMM-DTU) Chapman & Hall October / 37

### Least Squares Estimation

Least Squares Estimation SARA A VAN DE GEER Volume 2, pp 1041 1045 in Encyclopedia of Statistics in Behavioral Science ISBN-13: 978-0-470-86080-9 ISBN-10: 0-470-86080-4 Editors Brian S Everitt & David

### Notes for STA 437/1005 Methods for Multivariate Data

Notes for STA 437/1005 Methods for Multivariate Data Radford M. Neal, 26 November 2010 Random Vectors Notation: Let X be a random vector with p elements, so that X = [X 1,..., X p ], where denotes transpose.

### Regression Analysis Prof. Soumen Maity Department of Mathematics Indian Institute of Technology, Kharagpur

Regression Analysis Prof. Soumen Maity Department of Mathematics Indian Institute of Technology, Kharagpur Lecture - 7 Multiple Linear Regression (Contd.) This is my second lecture on Multiple Linear Regression

### Hypothesis Testing in the Classical Regression Model

LECTURE 5 Hypothesis Testing in the Classical Regression Model The Normal Distribution and the Sampling Distributions It is often appropriate to assume that the elements of the disturbance vector ε within

### Multivariate normal distribution and testing for means (see MKB Ch 3)

Multivariate normal distribution and testing for means (see MKB Ch 3) Where are we going? 2 One-sample t-test (univariate).................................................. 3 Two-sample t-test (univariate).................................................

### Quadratic forms Cochran s theorem, degrees of freedom, and all that

Quadratic forms Cochran s theorem, degrees of freedom, and all that Dr. Frank Wood Frank Wood, fwood@stat.columbia.edu Linear Regression Models Lecture 1, Slide 1 Why We Care Cochran s theorem tells us

### Basics Inversion and related concepts Random vectors Matrix calculus. Matrix algebra. Patrick Breheny. January 20

Matrix algebra January 20 Introduction Basics The mathematics of multiple regression revolves around ordering and keeping track of large arrays of numbers and solving systems of equations The mathematical

### Simple Linear Regression Inference

Simple Linear Regression Inference 1 Inference requirements The Normality assumption of the stochastic term e is needed for inference even if it is not a OLS requirement. Therefore we have: Interpretation

### Lecture 3: Linear methods for classification

Lecture 3: Linear methods for classification Rafael A. Irizarry and Hector Corrada Bravo February, 2010 Today we describe four specific algorithms useful for classification problems: linear regression,

### Regression Analysis. Regression Analysis MIT 18.S096. Dr. Kempthorne. Fall 2013

Lecture 6: Regression Analysis MIT 18.S096 Dr. Kempthorne Fall 2013 MIT 18.S096 Regression Analysis 1 Outline Regression Analysis 1 Regression Analysis MIT 18.S096 Regression Analysis 2 Multiple Linear

### Recall that two vectors in are perpendicular or orthogonal provided that their dot

Orthogonal Complements and Projections Recall that two vectors in are perpendicular or orthogonal provided that their dot product vanishes That is, if and only if Example 1 The vectors in are orthogonal

: Table of Contents... 1 Overview of Model... 1 Dispersion... 2 Parameterization... 3 Sigma-Restricted Model... 3 Overparameterized Model... 4 Reference Coding... 4 Model Summary (Summary Tab)... 5 Summary

### Statistical Machine Learning

Statistical Machine Learning UoC Stats 37700, Winter quarter Lecture 4: classical linear and quadratic discriminants. 1 / 25 Linear separation For two classes in R d : simple idea: separate the classes

### Hypothesis Testing in Linear Regression Models

Chapter 4 Hypothesis Testing in Linear Regression Models 41 Introduction As we saw in Chapter 3, the vector of OLS parameter estimates ˆβ is a random vector Since it would be an astonishing coincidence

### 1 Introduction to Matrices

1 Introduction to Matrices In this section, important definitions and results from matrix algebra that are useful in regression analysis are introduced. While all statements below regarding the columns

### A SURVEY ON CONTINUOUS ELLIPTICAL VECTOR DISTRIBUTIONS

A SURVEY ON CONTINUOUS ELLIPTICAL VECTOR DISTRIBUTIONS Eusebio GÓMEZ, Miguel A. GÓMEZ-VILLEGAS and J. Miguel MARÍN Abstract In this paper it is taken up a revision and characterization of the class of

### ELEC-E8104 Stochastics models and estimation, Lecture 3b: Linear Estimation in Static Systems

Stochastics models and estimation, Lecture 3b: Linear Estimation in Static Systems Minimum Mean Square Error (MMSE) MMSE estimation of Gaussian random vectors Linear MMSE estimator for arbitrarily distributed

### Chapter 3: The Multiple Linear Regression Model

Chapter 3: The Multiple Linear Regression Model Advanced Econometrics - HEC Lausanne Christophe Hurlin University of Orléans November 23, 2013 Christophe Hurlin (University of Orléans) Advanced Econometrics

Lecture 5: Linear least-squares Regression III: Advanced Methods William G. Jacoby Department of Political Science Michigan State University http://polisci.msu.edu/jacoby/icpsr/regress3 Simple Linear Regression

### Random Vectors and the Variance Covariance Matrix

Random Vectors and the Variance Covariance Matrix Definition 1. A random vector X is a vector (X 1, X 2,..., X p ) of jointly distributed random variables. As is customary in linear algebra, we will write

### 3 Random vectors and multivariate normal distribution

3 Random vectors and multivariate normal distribution As we saw in Chapter 1, a natural way to think about repeated measurement data is as a series of random vectors, one vector corresponding to each unit.

### MATHEMATICAL METHODS OF STATISTICS

MATHEMATICAL METHODS OF STATISTICS By HARALD CRAMER TROFESSOK IN THE UNIVERSITY OF STOCKHOLM Princeton PRINCETON UNIVERSITY PRESS 1946 TABLE OF CONTENTS. First Part. MATHEMATICAL INTRODUCTION. CHAPTERS

### Chapter 6: Multivariate Cointegration Analysis

Chapter 6: Multivariate Cointegration Analysis 1 Contents: Lehrstuhl für Department Empirische of Wirtschaftsforschung Empirical Research and und Econometrics Ökonometrie VI. Multivariate Cointegration

### Some probability and statistics

Appendix A Some probability and statistics A Probabilities, random variables and their distribution We summarize a few of the basic concepts of random variables, usually denoted by capital letters, X,Y,

### Example: Credit card default, we may be more interested in predicting the probabilty of a default than classifying individuals as default or not.

Statistical Learning: Chapter 4 Classification 4.1 Introduction Supervised learning with a categorical (Qualitative) response Notation: - Feature vector X, - qualitative response Y, taking values in C

### Multivariate Normal Distribution

Multivariate Normal Distribution Lecture 4 July 21, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Lecture #4-7/21/2011 Slide 1 of 41 Last Time Matrices and vectors Eigenvalues

### 15.062 Data Mining: Algorithms and Applications Matrix Math Review

.6 Data Mining: Algorithms and Applications Matrix Math Review The purpose of this document is to give a brief review of selected linear algebra concepts that will be useful for the course and to develop

### 3.1 Least squares in matrix form

118 3 Multiple Regression 3.1 Least squares in matrix form E Uses Appendix A.2 A.4, A.6, A.7. 3.1.1 Introduction More than one explanatory variable In the foregoing chapter we considered the simple regression

### 1.5 Oneway Analysis of Variance

Statistics: Rosie Cornish. 200. 1.5 Oneway Analysis of Variance 1 Introduction Oneway analysis of variance (ANOVA) is used to compare several means. This method is often used in scientific or medical experiments

### Part 2: Analysis of Relationship Between Two Variables

Part 2: Analysis of Relationship Between Two Variables Linear Regression Linear correlation Significance Tests Multiple regression Linear Regression Y = a X + b Dependent Variable Independent Variable

### Statistics in Geophysics: Linear Regression II

Statistics in Geophysics: Linear Regression II Steffen Unkel Department of Statistics Ludwig-Maximilians-University Munich, Germany Winter Term 2013/14 1/28 Model definition Suppose we have the following

### A Primer on Mathematical Statistics and Univariate Distributions; The Normal Distribution; The GLM with the Normal Distribution

A Primer on Mathematical Statistics and Univariate Distributions; The Normal Distribution; The GLM with the Normal Distribution PSYC 943 (930): Fundamentals of Multivariate Modeling Lecture 4: September

### 4. Joint Distributions of Two Random Variables

4. Joint Distributions of Two Random Variables 4.1 Joint Distributions of Two Discrete Random Variables Suppose the discrete random variables X and Y have supports S X and S Y, respectively. The joint

### Regression Estimation - Least Squares and Maximum Likelihood. Dr. Frank Wood

Regression Estimation - Least Squares and Maximum Likelihood Dr. Frank Wood Least Squares Max(min)imization Function to minimize w.r.t. b 0, b 1 Q = n (Y i (b 0 + b 1 X i )) 2 i=1 Minimize this by maximizing

### Chapter 4: Statistical Hypothesis Testing

Chapter 4: Statistical Hypothesis Testing Christophe Hurlin November 20, 2015 Christophe Hurlin () Advanced Econometrics - Master ESA November 20, 2015 1 / 225 Section 1 Introduction Christophe Hurlin

### Least-Squares Intersection of Lines

Least-Squares Intersection of Lines Johannes Traa - UIUC 2013 This write-up derives the least-squares solution for the intersection of lines. In the general case, a set of lines will not intersect at a

### Summary of week 8 (Lectures 22, 23 and 24)

WEEK 8 Summary of week 8 (Lectures 22, 23 and 24) This week we completed our discussion of Chapter 5 of [VST] Recall that if V and W are inner product spaces then a linear map T : V W is called an isometry

### MAT 200, Midterm Exam Solution. a. (5 points) Compute the determinant of the matrix A =

MAT 200, Midterm Exam Solution. (0 points total) a. (5 points) Compute the determinant of the matrix 2 2 0 A = 0 3 0 3 0 Answer: det A = 3. The most efficient way is to develop the determinant along the

### Factor analysis. Angela Montanari

Factor analysis Angela Montanari 1 Introduction Factor analysis is a statistical model that allows to explain the correlations between a large number of observed correlated variables through a small number

### OLS in Matrix Form. Let y be an n 1 vector of observations on the dependent variable.

OLS in Matrix Form 1 The True Model Let X be an n k matrix where we have observations on k independent variables for n observations Since our model will usually contain a constant term, one of the columns

### Regression Analysis Prof. Soumen Maity Department of Mathematics Indian Institute of Technology, Kharagpur. Lecture - 2 Simple Linear Regression

Regression Analysis Prof. Soumen Maity Department of Mathematics Indian Institute of Technology, Kharagpur Lecture - 2 Simple Linear Regression Hi, this is my second lecture in module one and on simple

### Variance of OLS Estimators and Hypothesis Testing. Randomness in the model. GM assumptions. Notes. Notes. Notes. Charlie Gibbons ARE 212.

Variance of OLS Estimators and Hypothesis Testing Charlie Gibbons ARE 212 Spring 2011 Randomness in the model Considering the model what is random? Y = X β + ɛ, β is a parameter and not random, X may be

### Time Series Analysis

Time Series Analysis hm@imm.dtu.dk Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs. Lyngby 1 Outline of the lecture Identification of univariate time series models, cont.:

### Linear Models for Continuous Data

Chapter 2 Linear Models for Continuous Data The starting point in our exploration of statistical models in social research will be the classical linear model. Stops along the way include multiple linear

### Statistical Models in R

Statistical Models in R Some Examples Steven Buechler Department of Mathematics 276B Hurley Hall; 1-6233 Fall, 2007 Outline Statistical Models Structure of models in R Model Assessment (Part IA) Anova

### 9-3.4 Likelihood ratio test. Neyman-Pearson lemma

9-3.4 Likelihood ratio test Neyman-Pearson lemma 9-1 Hypothesis Testing 9-1.1 Statistical Hypotheses Statistical hypothesis testing and confidence interval estimation of parameters are the fundamental

### SAS Software to Fit the Generalized Linear Model

SAS Software to Fit the Generalized Linear Model Gordon Johnston, SAS Institute Inc., Cary, NC Abstract In recent years, the class of generalized linear models has gained popularity as a statistical modeling

### Regression Analysis: A Complete Example

Regression Analysis: A Complete Example This section works out an example that includes all the topics we have discussed so far in this chapter. A complete example of regression analysis. PhotoDisc, Inc./Getty

### SYSM 6304: Risk and Decision Analysis Lecture 3 Monte Carlo Simulation

SYSM 6304: Risk and Decision Analysis Lecture 3 Monte Carlo Simulation M. Vidyasagar Cecil & Ida Green Chair The University of Texas at Dallas Email: M.Vidyasagar@utdallas.edu September 19, 2015 Outline

### Simple Linear Regression Chapter 11

Simple Linear Regression Chapter 11 Rationale Frequently decision-making situations require modeling of relationships among business variables. For instance, the amount of sale of a product may be related

### Mehtap Ergüven Abstract of Ph.D. Dissertation for the degree of PhD of Engineering in Informatics

INTERNATIONAL BLACK SEA UNIVERSITY COMPUTER TECHNOLOGIES AND ENGINEERING FACULTY ELABORATION OF AN ALGORITHM OF DETECTING TESTS DIMENSIONALITY Mehtap Ergüven Abstract of Ph.D. Dissertation for the degree

### Notes on Applied Linear Regression

Notes on Applied Linear Regression Jamie DeCoster Department of Social Psychology Free University Amsterdam Van der Boechorststraat 1 1081 BT Amsterdam The Netherlands phone: +31 (0)20 444-8935 email:

### Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model 1 September 004 A. Introduction and assumptions The classical normal linear regression model can be written

### These axioms must hold for all vectors ū, v, and w in V and all scalars c and d.

DEFINITION: A vector space is a nonempty set V of objects, called vectors, on which are defined two operations, called addition and multiplication by scalars (real numbers), subject to the following axioms

### Perform hypothesis testing

Multivariate hypothesis tests for fixed effects Testing homogeneity of level-1 variances In the following sections, we use the model displayed in the figure below to illustrate the hypothesis tests. Partial

### Linear Regression. Guy Lebanon

Linear Regression Guy Lebanon Linear Regression Model and Least Squares Estimation Linear regression is probably the most popular model for predicting a RV Y R based on multiple RVs X 1,..., X d R. It

### NCSS Statistical Software Principal Components Regression. In ordinary least squares, the regression coefficients are estimated using the formula ( )

Chapter 340 Principal Components Regression Introduction is a technique for analyzing multiple regression data that suffer from multicollinearity. When multicollinearity occurs, least squares estimates

### Pearson s Goodness of Fit Statistic as a Score Test Statistic

Pearson s Goodness of Fit Statistic as a Score Test Statistic Gordon K. Smyth Abstract For any generalized linear model, the Pearson goodness of fit statistic is the score test statistic for testing the

### A LOGNORMAL MODEL FOR INSURANCE CLAIMS DATA

REVSTAT Statistical Journal Volume 4, Number 2, June 2006, 131 142 A LOGNORMAL MODEL FOR INSURANCE CLAIMS DATA Authors: Daiane Aparecida Zuanetti Departamento de Estatística, Universidade Federal de São

### Eigenvalues, Eigenvectors, Matrix Factoring, and Principal Components

Eigenvalues, Eigenvectors, Matrix Factoring, and Principal Components The eigenvalues and eigenvectors of a square matrix play a key role in some important operations in statistics. In particular, they

### Generalized Linear Models. Today: definition of GLM, maximum likelihood estimation. Involves choice of a link function (systematic component)

Generalized Linear Models Last time: definition of exponential family, derivation of mean and variance (memorize) Today: definition of GLM, maximum likelihood estimation Include predictors x i through

### Linear Threshold Units

Linear Threshold Units w x hx (... w n x n w We assume that each feature x j and each weight w j is a real number (we will relax this later) We will study three different algorithms for learning linear

### NOTES ON LINEAR TRANSFORMATIONS

NOTES ON LINEAR TRANSFORMATIONS Definition 1. Let V and W be vector spaces. A function T : V W is a linear transformation from V to W if the following two properties hold. i T v + v = T v + T v for all

### Inner Product Spaces

Math 571 Inner Product Spaces 1. Preliminaries An inner product space is a vector space V along with a function, called an inner product which associates each pair of vectors u, v with a scalar u, v, and

### Outline. Topic 4 - Analysis of Variance Approach to Regression. Partitioning Sums of Squares. Total Sum of Squares. Partitioning sums of squares

Topic 4 - Analysis of Variance Approach to Regression Outline Partitioning sums of squares Degrees of freedom Expected mean squares General linear test - Fall 2013 R 2 and the coefficient of correlation

### 1. χ 2 minimization 2. Fits in case of of systematic errors

Data fitting Volker Blobel University of Hamburg March 2005 1. χ 2 minimization 2. Fits in case of of systematic errors Keys during display: enter = next page; = next page; = previous page; home = first

### Poisson Models for Count Data

Chapter 4 Poisson Models for Count Data In this chapter we study log-linear models for count data under the assumption of a Poisson error structure. These models have many applications, not only to the

### e = random error, assumed to be normally distributed with mean 0 and standard deviation σ

1 Linear Regression 1.1 Simple Linear Regression Model The linear regression model is applied if we want to model a numeric response variable and its dependency on at least one numeric factor variable.

### Data Mining and Data Warehousing. Henryk Maciejewski. Data Mining Predictive modelling: regression

Data Mining and Data Warehousing Henryk Maciejewski Data Mining Predictive modelling: regression Algorithms for Predictive Modelling Contents Regression Classification Auxiliary topics: Estimation of prediction

### 1 Orthogonal projections and the approximation

Math 1512 Fall 2010 Notes on least squares approximation Given n data points (x 1, y 1 ),..., (x n, y n ), we would like to find the line L, with an equation of the form y = mx + b, which is the best fit

### A Semi-parametric Approach for Decomposition of Absorption Spectra in the Presence of Unknown Components

A Semi-parametric Approach for Decomposition of Absorption Spectra in the Presence of Unknown Components Payman Sadegh 1,2, Henrik Aalborg Nielsen 1, and Henrik Madsen 1 Abstract Decomposition of absorption

### Sampling and Hypothesis Testing

Population and sample Sampling and Hypothesis Testing Allin Cottrell Population : an entire set of objects or units of observation of one sort or another. Sample : subset of a population. Parameter versus

### MULTIVARIATE PROBABILITY DISTRIBUTIONS

MULTIVARIATE PROBABILITY DISTRIBUTIONS. PRELIMINARIES.. Example. Consider an experiment that consists of tossing a die and a coin at the same time. We can consider a number of random variables defined

### Similarity and Diagonalization. Similar Matrices

MATH022 Linear Algebra Brief lecture notes 48 Similarity and Diagonalization Similar Matrices Let A and B be n n matrices. We say that A is similar to B if there is an invertible n n matrix P such that

### Using pivots to construct confidence intervals. In Example 41 we used the fact that

Using pivots to construct confidence intervals In Example 41 we used the fact that Q( X, µ) = X µ σ/ n N(0, 1) for all µ. We then said Q( X, µ) z α/2 with probability 1 α, and converted this into a statement

### Inferential Statistics

Inferential Statistics Sampling and the normal distribution Z-scores Confidence levels and intervals Hypothesis testing Commonly used statistical methods Inferential Statistics Descriptive statistics are

### 2 Testing under Normality Assumption

1 Hypothesis testing A statistical test is a method of making a decision about one hypothesis (the null hypothesis in comparison with another one (the alternative using a sample of observations of known

### Orthogonal Projections

Orthogonal Projections and Reflections (with exercises) by D. Klain Version.. Corrections and comments are welcome! Orthogonal Projections Let X,..., X k be a family of linearly independent (column) vectors

### Sec 4.1 Vector Spaces and Subspaces

Sec 4. Vector Spaces and Subspaces Motivation Let S be the set of all solutions to the differential equation y + y =. Let T be the set of all 2 3 matrices with real entries. These two sets share many common

### 17. Inner product spaces Definition 17.1. Let V be a real vector space. An inner product on V is a function

17. Inner product spaces Definition 17.1. Let V be a real vector space. An inner product on V is a function, : V V R, which is symmetric, that is u, v = v, u. bilinear, that is linear (in both factors):

### How to Conduct a Hypothesis Test

How to Conduct a Hypothesis Test The idea of hypothesis testing is relatively straightforward. In various studies we observe certain events. We must ask, is the event due to chance alone, or is there some

### 1. What is the critical value for this 95% confidence interval? CV = z.025 = invnorm(0.025) = 1.96

1 Final Review 2 Review 2.1 CI 1-propZint Scenario 1 A TV manufacturer claims in its warranty brochure that in the past not more than 10 percent of its TV sets needed any repair during the first two years

### 12-1 Multiple Linear Regression Models

12-1.1 Introduction Many applications of regression analysis involve situations in which there are more than one regressor variable. A regression model that contains more than one regressor variable is

### 2. Simple Linear Regression

Research methods - II 3 2. Simple Linear Regression Simple linear regression is a technique in parametric statistics that is commonly used for analyzing mean response of a variable Y which changes according

### Name: Section Registered In:

Name: Section Registered In: Math 125 Exam 3 Version 1 April 24, 2006 60 total points possible 1. (5pts) Use Cramer s Rule to solve 3x + 4y = 30 x 2y = 8. Be sure to show enough detail that shows you are

### Use of deviance statistics for comparing models

A likelihood-ratio test can be used under full ML. The use of such a test is a quite general principle for statistical testing. In hierarchical linear models, the deviance test is mostly used for multiparameter

### 7 Hypothesis testing - one sample tests

7 Hypothesis testing - one sample tests 7.1 Introduction Definition 7.1 A hypothesis is a statement about a population parameter. Example A hypothesis might be that the mean age of students taking MAS113X

### Models for Count Data With Overdispersion

Models for Count Data With Overdispersion Germán Rodríguez November 6, 2013 Abstract This addendum to the WWS 509 notes covers extra-poisson variation and the negative binomial model, with brief appearances

### Joint models for classification and comparison of mortality in different countries.

Joint models for classification and comparison of mortality in different countries. Viani D. Biatat 1 and Iain D. Currie 1 1 Department of Actuarial Mathematics and Statistics, and the Maxwell Institute

### Regression in SPSS. Workshop offered by the Mississippi Center for Supercomputing Research and the UM Office of Information Technology

Regression in SPSS Workshop offered by the Mississippi Center for Supercomputing Research and the UM Office of Information Technology John P. Bentley Department of Pharmacy Administration University of

### Linear and Piecewise Linear Regressions

Tarigan Statistical Consulting & Coaching statistical-coaching.ch Doctoral Program in Computer Science of the Universities of Fribourg, Geneva, Lausanne, Neuchâtel, Bern and the EPFL Hands-on Data Analysis

### Introduction to Hypothesis Testing. Point estimation and confidence intervals are useful statistical inference procedures.

Introduction to Hypothesis Testing Point estimation and confidence intervals are useful statistical inference procedures. Another type of inference is used frequently used concerns tests of hypotheses.

### The Loss in Efficiency from Using Grouped Data to Estimate Coefficients of Group Level Variables. Kathleen M. Lang* Boston College.

The Loss in Efficiency from Using Grouped Data to Estimate Coefficients of Group Level Variables Kathleen M. Lang* Boston College and Peter Gottschalk Boston College Abstract We derive the efficiency loss

### POLYNOMIAL AND MULTIPLE REGRESSION. Polynomial regression used to fit nonlinear (e.g. curvilinear) data into a least squares linear regression model.

Polynomial Regression POLYNOMIAL AND MULTIPLE REGRESSION Polynomial regression used to fit nonlinear (e.g. curvilinear) data into a least squares linear regression model. It is a form of linear regression

### Detection of changes in variance using binary segmentation and optimal partitioning

Detection of changes in variance using binary segmentation and optimal partitioning Christian Rohrbeck Abstract This work explores the performance of binary segmentation and optimal partitioning in the

### CITY UNIVERSITY LONDON. BEng Degree in Computer Systems Engineering Part II BSc Degree in Computer Systems Engineering Part III PART 2 EXAMINATION

No: CITY UNIVERSITY LONDON BEng Degree in Computer Systems Engineering Part II BSc Degree in Computer Systems Engineering Part III PART 2 EXAMINATION ENGINEERING MATHEMATICS 2 (resit) EX2005 Date: August

### Inference in Regression Analysis. Dr. Frank Wood

Inference in Regression Analysis Dr. Frank Wood Inference in the Normal Error Regression Model Y i = β 0 + β 1 X i + ɛ i Y i value of the response variable in the i th trial β 0 and β 1 are parameters