1 / 24

Panel Data Models

This is a note on panel data modelling

TAsena
Download Presentation

Panel Data Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter Six 6. Panel Data Models Tilahun Ferede , PhD Department of Statistics Arba Minch Uiniversity 1

  2. 6. Introduction General linear models: Anova, Regression ANCOVA, etc Developed into... Developed into... Mixed models: Repeated measures Change-over trials Subsampling Clustered data ... Generalized linear models: Logit/probit models Poisson models Gamma models ... Merged into... Generalized linear mixed models: Mixed models for non- normal data. 2

  3. 6.1. Basic Linear Models Data: Response variable y for n ”individuals” Some type of design (+ possibly covariates) Linear model: y = f(design, covariates) + e y = XB+e 3

  4. 6.1. Basic Linear Models (cont.) Examples of LM: (Multiple) linear regression Analysis of Variance (ANOVA, including t test) Analysis of covariance (ANCOVA) 4

  5. 6.1. Basic Linear Models (cont.) • Parameters are estimated using either the Least squares, or Maximum Likelihood methods • Possible to test statistical hypotheses, for example to test if different treatments give the same mean values • Assumption: The residuals ei are independent, normally distributed and have constant variance. 5

  6. 6.1. Basic Linear Models: some definitions • Factor: e.g. treatments, or properties such as sex – Levels Example : Facor: type of fertilizer Levels: Low Medium High level of N • Experimental unit: The smallest unit that is given an individual treatment • Replication: To repeat the same treatments on new experimental units 6

  7. 6.2. “Mixed Models”: Fixed and random factors Fixed factor: those who planned the experiment decided which levels to use Random factor: The levels are (or may be regarded as) a sample from a population of levels 7

  8. 6.2. Fixed and random factors (Cont.) Example: 40 forest stands. In each stand, one plot fertilized with A and one with B. Response variable: e.g. diameter of 5 trees on each plot Fixed factor: fertilizer, 2 levels (A and B) Experimental unit: the plot (NOT the tree!) Replication on 40 stands ”Stand” may be regarded as a random factor 8

  9. 6.2. Fixed and random factors (Cont.) Examples of random factors • ”Block” in some designs • ”Individual”(when several measurements are made on each individual) • ”School class” (in experiments with teaching methods: then exp. unit is the class) • …i.e. in situations when many measurements are made on the same experimental unit. 9

  10. 6.4. General Mixed Models: formally y = XB + Zu + e y is a vector of responses XB is the fixed part of the model X: design matrix B: parameter matrix Zu is the random part of the model e is a vector of residuals y = f(fixed part) + g(random part) + e 10

  11. 6.4. Mixed Models Parameters to estimate • Fixed effects: the parameters in B • Ramdom effects: • the variances and covariances of the random effects in u: Var(u)=G ”G-side random effects” • The variances and covariances of the residual effects: Var(e)=R 11 ”R-side random effects”

  12. 6.4. Mixed Models (Cont.) To formulate a mixed model you might Decide the design matrix X for fixed effects Decide the design matrix Z for random effefcts In some types of models: Decide the structure of the covariance matrices G or, more commonly, R. 12

  13. 6.5. Applications:Example 1 Two-factor model with one random factor Treatments: two mosquito repellants A1 and A2 (Schwartz, 2005) 24 volonteeers divided into three groups 4 in each group apply A1, 4 apply A2 Each group visits one of three different areas y=number of bites after 2 hours 13

  14. 6.5. Applications: Ex 1: Model (Cont.) yijk=+i+bj+abij+eijk Where  is a general mean value, i is the effect of brand i bj is the random effect of site j abij is the interaction between factors a and b eijk is a random residual bj~ N(o, 2b) eijk~ N(o, 2e) 14

  15. Example 2: Subsampling Two treatments Three experimental units per treatment Two measurements on each experimental unit A1 A2 Behandling B11 B12 B13 B21 B22 B23 Fält y111 y112 y121 y122 y131 y132 y211 y212 y221 y222 y231 y232 Bestämning 15

  16. 6.5. Applications: Example 2 An example of this type: 3 different fertilizers 4 plots with each fertilizer 2 mangold plants harvested from each plot y = iron content 16

  17. 6.5. Applications: Example 2: Model (Cont.) yij=+i + bij + eijk i Fixed effect of treatment i bij Random effect of plot j within treatment i eijk Random residual Note: Fixed effects – Greek letters Random effecvts – Latin letters 17

  18. Example 3: ”Split-plot models” Models with several error terms y=The dry weight yield of grass Cultivar, levels A and B. Bacterial inoculation, levels, C, L, D Four replications in blocks. 18

  19. Ex 3: design Repl. 1 Repl. 2 D Repl. 3 D Repl. 4 C C 29.4 28.7 29.7 26.7 L L C L 34.4 33.4 28.6 31.8 D C L D 32.5 28.9 32.9 28.9 C L C D 27.4 36.4 27.2 28.6 L D L L 34.5 32.4 32.6 30.7 D C D C 29.7 28.7 29.1 26.8 Legend: C=Control Cultivar A L=Live Cultivar B D=Dead 19

  20. 6.6. Summaries of Linear Mixed Models LMMs are: Also known as multilevel models, hierarchical models, random effects models, mixed models • For a continuous outcome variable, Y • Linear in the parameters (β’s) • For multilevel data, where outcomes measured for the same cluster/subject are assumed to be • correlated and/or the error variance is not constant. In other words, for situations where the GLM assumption (below) is violated. 2    iid ( , 0 ~ ) N i Composed of both fixed and random effects, hence, “mixed” • Not the only modeling option for multilevel data with a continuous outcome. Another option is a • marginal model, which we will discuss later in the course.

  21. 6.6. Summaries (Cont.)..Fixed Effects in a LMM • Are usually the focus of the analysis • Can be thought of as similar to parameters in an ordinary regression model (the Betas) • Can be taken from any level of the data • Help us to explain the variance in Y at each level of the data • Examples of fixed effects: – Age, sex, treatment, brain region, marital status, teaching experience 21

  22. 6.6. Summaries (Cont.).. Random Effects in a LMM • Are usually not the primary focus of the analysis, but… • Allow us to account for correlation among observations within the same level-2 or higher units (e.g. correlations among observations within the same school) • Allow us to partition the total variance of Y into levels that correspond with the multilevel structure of the data – How much of the variation in student math achievement scores can be attributed to student-level variability (level 1) versus school-level variability (level 2)? • Are summarized by their variance and covariance, if there is more than one random effect in the LMM 22

  23. 6.6. Summaries (Cont.).. Random Effects in a LMM • Come in two flavors: – Random intercepts – Random slopes • Are explicitly specified in the model. This is in contrast to the random errors, which are never explicitly specified when a model is fit, but always exist and their variance is always estimated. • We will introduce the LMM notation and assumptions in the next module. 23

  24. In Conclusion • Dependent data structures go by many names – longitudinal, clustered, repeated measures, multilevel. • Understanding the multilevel nature of a dataset is critical to any analysis. • OLS regression is not an appropriate technique for modeling multilevel data. • A Linear Mixed Model is one approach that can be used for dependent data. 24

More Related