Outline. Linear OLS Models vs: Linear Marginal Models Linear Conditional Models. Random Intercepts Random Intercepts & Slopes
|
|
- Prosper Burns
- 5 years ago
- Views:
Transcription
1 Lecture 2.1 Basic Linear LDA 1 Outline Linear OLS Models vs: Linear Marginal Models Linear Conditional Models Random Intercepts Random Intercepts & Slopes Cond l & Marginal Connections Empirical Bayes 2 1
2 Example: Weights of Guinea Pigs Body weights of 48 pigs in 9 successive weeks of follow-up (Table 3.1 DHLZ 2002) The response is measured at n i different times, or under n i different conditions. In the pigs example the time of measurement is referred to as a "withinunits" factor. For the pigs n i (weeks) = 9 Although the pigs example considers a single treatment factor, it is straightforward to extend the situation to one where the groups are formed as the results of a factorial design (for example, if the Pigs were separated into males and female and then allocated to the diet groups) 3 Pigs Data: Spaghetti (Profile) Plot Weight (Kg) sort id time. twoway line weight time, connect(ascending) Questions: Average weight increase per week? Variability in weights between Pigs? Variation in growth patterns? 48 pigs Week 4 2
3 Some Modelling Options 1. Ignore associations (OLS) 1. Y ij = week + ij 2. ij ~ N(0, 2 ) 2. Use a Marginal Model to estimate effects (PA - GEE) 1. Y ij = week + ij 2. ~ N(0, ) 3. = R 2 ; R is a working corr structure (ind,exch,ar,...) 3. Use a Conditional Model to estimate effects (RE) 1. Y ij u i = week + u i + ij 2. ij ~ N(0, 2 ) 3. u i ~ N(0, 2 ) 5. regress weight time Pigs model 1: OLS fit Source SS df MS Number of obs = F( 1, 430) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = weight Coef. Std. Err. t P> t [95% Conf. Interval] time _cons OLS results Assumptions? L - Linear I - Independent N - Normal errors E - Equal Variance 6 3
4 Some Modelling Options 1. Ignore associations (OLS) 1. Y ij = week + ij 2. ij ~ N(0, 2 ) 2. Use a Marginal Model to estimate effects (PA - GEE) 1. Y ij = week + ij 2. ~ N(0, ) 3. = R 2 ; R is a working corr structure (ind,exch,ar,...) 3. Use a Conditional Model to estimate effects (RE) 1. Y ij u i = week + u i + ij 2. ij ~ N(0, 2 ) 3. u i ~ N(0, 2 ) 7 Pigs Data: Spaghetti (Profile) Plot Weight (Kg) Recall Corr EDA yesterday: Suppose: 1. Y ij = week + ij 2. ~ N(0, ) 3. = R 2 48 pigs Week 8 4
5 1 Standardized Pigs Data: Scatterplot Matrix 2. graph matrix sweight1-sweight9, half 3 4 A Scatterplot Matrix helps to visualize multiple 2-way relationships 5 6 Note the decreasing corr as distance between weeks (lag) increases acf ACF Pigs Weights: ACF acf Lag lag 5
6 Some Modelling Options 1. Ignore associations (OLS) 1. Y ij = week + ij 2. ij ~ N(0, 2 ) 2. Use a Marginal Model to estimate effects (PA - GEE) 1. Y ij = week + ij 2. ~ N(0, ) 3. = R 2 ; R is a working corr structure (ind,exch,ar,...) 3. Use a Conditional Model to estimate effects (RE) 1. Y ij u i = week + u i + ij 2. ij ~ N(0, 2 ) 3. u i ~ N(0, 2 ) 11 Pigs model 1: PA-IND fit. xtreg weight time, pa i(id) corr(ind) GEE population-averaged model Number of obs = 432 Group variable: Id Number of groups = 48 Link: identity Obs per group: min = 9 Family: Gaussian avg = 9.0 Correlation: independent max = 9 Wald chi2(1) = Scale parameter: Prob > chi2 = Pearson chi2(432): Deviance = Dispersion (Pearson): Dispersion = time _cons Independence correlation model results 12 6
7 . regress weight time Pigs model 1: OLS fit Source SS df MS Number of obs = F( 1, 430) = Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = weight Coef. Std. Err. t P> t [95% Conf. Interval] time _cons OLS results E[ Y i ] = β 0 + β 1 time Corr = ind Marginal Model twoway (line weight time, connect(ascending)) /// (lfit weight time, clwidth(thick)) time weight Fitted values 14 7
8 Marginal Model with a Uniform correlation structure E[Y ij ] 0 1 t j Model for the mean cov(y ij ) ( 2 2 )[ 11' (1 )I] Same as Before where: R = Model for the covariance matrix 15 Pigs Marginal Model Exch. xtreg weight time, pa i(id) corr(exch) Iteration 1: tolerance = 5.585e-15 GEE population-averaged model Number of obs = 432 Group variable: Id Number of groups = 48 Link: identity Obs per group: min = 9 Family: Gaussian avg = 9.0 Correlation: exchangeable max = 9 Wald chi2(1) = Scale parameter: Prob > chi2 = time _cons Population Average, Marginal Model with Exchangeable Correlation structure results 16 8
9 Pigs Marginal Model Exch, GEE. xtgee weight time, i(id) corr(exch) Iteration 1: tolerance = 5.585e-15 GEE population-averaged model Number of obs = 432 Group variable: Id Number of groups = 48 Link: identity Obs per group: min = 9 Family: Gaussian avg = 9.0 Correlation: exchangeable max = 9 Wald chi2(1) = Scale parameter: Prob > chi2 = time _cons GEE fit Marginal Model with Exchangeable Correlation structure results 17 Pigs data model 1 GEE fit. xtgee weight time, i(id) corr(exch). xtcorr Estimated within-id correlation matrix R: c1 c2 c3 c4 c5 c6 c7 c8 c9 r r r r r r r r r GEE fit Marginal Model with Exchangeable Correlation structure results 18 9
10 Pigs Marginal Model AR1, GEE. xtgee weight time, i(id) corr(ar1) t(time) Iteration 1: tolerance = Iteration 2: tolerance = Iteration 3: tolerance = 4.366e-07 GEE population-averaged model Number of obs = 432 Group and time vars: Id time Number of groups = 48 Link: identity Obs per group: min = 9 Family: Gaussian avg = 9.0 Correlation: AR(1) max = 9 Wald chi2(1) = Scale parameter: Prob > chi2 = time _cons GEE fit Marginal Model with Auto Regressive(1) Correlation structure results 19 Pigs Marginal Model AR1, GEE. xtgee weight time, i(id) corr(ar1) t(time). xtcorr Estimated within-id correlation matrix R: c1 c2 c3 c4 c5 c6 c7 c8 c9 r r r r r r r r r GEE fit Marginal Model with AR1 Correlation structure results 20 10
11 Pigs Weights: ACF acf ACF Estimates from: Exch & AR Lag Common types of Corr models. help xtgee correlation description exchangeable exchangeable independent independent unstructured unstructured fixed matname user-specified ar # autoregressive of order # stationary # stationary of order # nonstationary # nonstationary of order # 22 11
12 Pigs Marginal Model Toeplitz, GEE. xtgee weight time, i(id) corr(stationary8) t(time) Iteration 4: tolerance = Iteration 5: tolerance = 3.968e-06 Iteration 6: tolerance = 7.862e-07 GEE population-averaged model Number of obs = 432 Group and time vars: Id time Number of groups = 48 Link: identity Obs per group: min = 9 Family: Gaussian avg = 9.0 Correlation: stationary(8) max = 9 Wald chi2(1) = Scale parameter: Prob > chi2 = time _cons GEE fit Marginal Model with Toeplitz Correlation structure results 23 Pigs Marginal Model Toeplitz, GEE. xtgee weight time, i(id) corr(stationary8) t(time). xtcorr Estimated within-id correlation matrix R: c1 c2 c3 c4 c5 c6 c7 c8 c9 r r r r r r r r r GEE fit Marginal Model with Toeplitz (stationary) Correlation structure results 24 12
13 Robust Standard Errors. xtgee weight time, i(id) corr(exch) robust Semi-robust time _cons xtgee weight time, i(id) corr(ar1) t(time) robust Semi-robust time _cons xtgee weight time, i(id) corr(stationary8) t(time) robust Semi-robust time _cons QIC in model selection. ssc install qic. help qic Description qic calculates the QIC and QIC_u criteria for model selection in GEE, which is an extension of the widely used AIC criterion in ordinary regression (Pan 2001). It allows for specification of all 7 distributions - gaussian, inverse Gaussian, Bernoulli/binomial, Poisson, negative binomial and gamma, all link functions and working correlation structures and all se/robust options, except for the vce option, avaiable in Stata 9.0. It also calculates the trace of the matrix O^{-1}V, where O is the variance estimate under the independent correlation structure and V is the variance estimate under the specified working correlation structure in GEE. When trace is close to the number of parametr p, the QIC_u is a good approximation to QIC
14 QIC in model selection 27 QIC in model selection QIC(R) a function of the assumed working correlation matrix R, so QIC(R) can be potentially useful in examining which correlation structures are better than others QIC u a measure that can be potentially useful in examining which subsets of covariates are better than others when Trace p. Common recommendation is to use QIC u (Independence) These are based on measures of deviance (distance from the data to the model based on the likelihood) so smaller is better Sometimes useful but rely on your EDA skills also 28 14
15 QIC in model selection qic weight time, i(id) corr(exch) robust qic weight time, i(id) corr(ar1) t(time) robust qic weight time, i(id) corr(stationary8) t(time) robust QIC and QIC_u Corr = exch Family = gau Link = iden p = 2 Trace = QIC = QIC_u = QIC and QIC_u Corr = ar1 Family = gau Link = iden p = 2 Trace = QIC = QIC_u = QIC and QIC_u Corr = stationary8 Family = gau Link = iden p = 2 Trace = QIC = QIC_u = Exch corr favored by QIC criterion? Some Modelling Options 1. Ignore associations (OLS) 1. Y ij = week + ij 2. ij ~ N(0, 2 ) 2. Use a Marginal Model to estimate effects (PA - GEE) 1. Y ij = week + ij 2. ~ N(0, ) 3. = R 2 ; R is a working corr structure (ind,exch,ar,...) 3. Use a Conditional Model to estimate effects (RE) 1. Y ij u i = week + u i + ij 2. ij ~ N(0, 2 ) 3. u i ~ N(0, 2 ) 30 15
16 Linear model with random intercept Note Shorthand, Y ij = Y ij u i Y ij U i 0 1 t j ij U i ~ N(0, 2 ) ij ~ N(0, 2 ) Cluster specific intercept U i Variance between Variance within Intraclass correlation coefficient 31 Pigs Conditional Model Ran Int.. xtreg weight time, re i(id) mle var Random-effects ML regression Number of obs = 432 Group variable (i): Id Number of groups = 48 Random effects u_i ~ Gaussian Obs per group: min = 9 avg = 9.0 max = 9 LR chi2(1) = Log likelihood = Prob > chi2 = time _cons /sigma_u /sigma_e rho Linear model with a random intercept - conditional model 32 16
17 Pigs Conditional Model Ran Int.. xtmixed weight time id:, mle Mixed-effects ML regression Number of obs = 432 Group variable: id Number of groups = 48 Obs per group: min = 9 avg = 9.0 max = 9 Wald chi2(1) = Log likelihood = Prob > chi2 = time _cons Random-effects Parameters Estimate Std. Err. [95% Conf. Interval] id: Identity sd(_cons) sd(residual) LR test vs. linear regression: chibar2(01) = Prob >= chibar2 = Same random intercept model - xtmixed 33 Pigs Conditional Model Ran Int.. xtmixed weight time id:, mle var Mixed-effects ML regression Number of obs = 432 Group variable: id Number of groups = 48 Obs per group: min = 9 avg = 9.0 max = 9 Wald chi2(1) = Log likelihood = Prob > chi2 = time _cons Random-effects Parameters Estimate Std. Err. [95% Conf. Interval] id: Identity var(_cons) var(residual) LR test vs. linear regression: chibar2(01) = Prob >= chibar2 = Same random intercept model - xtmixed, var option 34 17
18 Pigs Conditional Model Ran Int.. gllamm weight time, i(id) nip(12) adapt gllamm model log likelihood = time _cons Variance at level ( ) Variances and covariances of random effects ***level 2 (id) var(1): ( ) Linear model with a random intercept - conditional model Random Effects Model E[ Y i U i ] = β 0 + β 1 time + U i E[ Y i ] = β 0 + β 1 time 48 Pigs time weight Linear prediction Xb + u[id] 36 18
19 Random Effects Model E[ Y i U i ] = β 0 + β 1 time + U i E[ Y i ] = β 0 + β 1 time Goat #48: Data, Pred48 Goat #3: Data, Pred3 Marginal Predictor 2 Pigs time weight Linear prediction Xb + u[id] 37 Equivalence of RE & Marginal in the Linear, Exch Corr case (with no missing data) 38 19
20 Pigs Conditional Model Ran Int.. xtreg weight time, re i(id) mle var Random-effects ML regression Number of obs = 432 Group variable (i): Id Number of groups = 48 Random effects u_i ~ Gaussian Obs per group: min = 9 avg = 9.0 max = 9 LR chi2(1) = Log likelihood = Prob > chi2 = time _cons /sigma_u /sigma_e rho Linear model with a random intercept - conditional model 39 Pigs Marginal Model Exch, GEE. xtgee weight time, i(id) corr(exch) Iteration 1: tolerance = 5.585e-15 GEE population-averaged model Number of obs = 432 Group variable: Id Number of groups = 48 Link: identity Obs per group: min = 9 Family: Gaussian avg = 9.0 Correlation: exchangeable max = 9 Wald chi2(1) = Scale parameter: Prob > chi2 = time _cons GEE fit Marginal Model with Exchangeable Correlation structure results 40 20
21 Pigs Marginal Model Exch, GEE. xtgee weight time, i(id) corr(exch). xtcorr Estimated within-id correlation matrix R: c1 c2 c3 c4 c5 c6 c7 c8 c9 r r r r r r r r r GEE fit Marginal Model with Exchangeable Correlation structure results Linear Regression : Random Effects Model Mean Structure = Marginal Model Mean Structure? E[ Y i ] =? E[ Y i ] = E{ E[ Y i U i ] } = How About Correlation Structure? (For Exchangeable) 21
22 Other mean, E(Y ij ), models 43 Pigs Ran Int, linear trend. xtreg weight time, re i(id) mle var Random-effects ML regression Number of obs = 432 Group variable (i): Id Number of groups = 48 Random effects u_i ~ Gaussian Obs per group: min = 9 avg = 9.0 max = 9 LR chi2(1) = Log likelihood = Prob > chi2 = time _cons /sigma_u /sigma_e rho Linear model with a random intercept - conditional model 44 22
23 Pigs Ran Int, quadratic trend. gen timesq = time*time. xtreg weight time timesq, re i(id) mle Random-effects ML regression Number of obs = 432 Group variable (i): Id Number of groups = 48 Random effects u_i ~ Gaussian Obs per group: min = 9 avg = 9.0 max = 9 LR chi2(2) = Log likelihood = Prob > chi2 = time timesq _cons /sigma_u /sigma_e rho Random Intercept results Pigs Marg, quadratic trend. xtgee weight time timesq, i(id) corr(exch) GEE population-averaged model Number of obs = 432 Group variable: Id Number of groups = 48 Link: identity Obs per group: min = 9 Family: Gaussian avg = 9.0 Correlation: exchangeable max = 9 Wald chi2(2) = Scale parameter: Prob > chi2 = time timesq _cons Exchangeable Correlation structure results. xtcorr yields Corr estimate =
24 Equivalent Models E[ Y i U i ] = β 0 + β 1 time + β 2 time 2 + U i E[ Y i ] = Note, these are still called linear models: know why? time weight Xb + u[id] Linear prediction 47 Other Variance models 48 24
25 Pigs Data: Spaghetti (Profile) Plot Weight (Kg) sort id time. twoway line weight time, connect(ascending) Questions: Average weight increase per week? Variability in weights between Pigs? Variation in growth patterns? 48 Pigs Week 49 Pigs Conditional Model Ran Slopes.. xtmixed weight time id: time, mle cov(unstruct) Log likelihood = time _cons Random-effects Parameters Estimate Std. Err. [95% Conf. Interval] Id: Unstructured sd(time) sd(_cons) corr(time,_cons) sd(residual) LR test vs. linear regression: chi2(3) = Prob > chi2 = Note: LR test is conservative and provided only for reference
26 Random Slopes E[ Y i U i ] = β 0 + β 1 time + U 0i + U 1i time = (β 0 + U 0i ) + (β 1 +U 1i )time = β 0i + β 1i time E[ Y i ] = time weight Linear predictor, fixed portion Fitted values: xb + Zu 51 Written Results : RE Linear Regression - Pigs Use a Conditional Model to estimate effects 1. Y ij u i = week + u 0i + u 1i week + ij 2. ij ~ N(0, 2 ) 3. u i =) ij & u i independent 1. Y ij u i = (week) + u 0i + u 1i week + ij 2. ij ~ N(0, ) 3. u 0i ~ N(0, ), u 1i ~ N(0, ), corr(u 0i,u 1i )= ij & u i independent 52 26
27 Extensions : Linear Regression - Pigs Usual Linear Regression (OLS) 1. Y ij = week + 2 week 2 + ij 2. ij ~ N(0, 2 ) Use a Marginal Model to estimate effects 1. Y ij = week + 2 week 2 + ij 2. i ~ N(0, ) 3. = R 2 ; R is a working corr structure (ind,exch,ar,...) Use a Conditional Model to estimate effects 1. Y ij u i = week + 2 week 2 + u i + ij 2. ij ~ N(0, 2 ) 3. u i ~ N(0, 2 ) ij & u i independent 53 Extensions: Linear Regression - general Usual Linear Regression (OLS) 1. Y i = X + i 2. i ~ N(0,I 2 ) Use a Marginal Model to estimate effects 1. Y i = X + i 2. i ~ N(0, ) 3. = R 2 ; R is a working corr structure (ind,exch,ar,...) Use a Conditional Model to estimate effects 1. Y i u i = X + Zu i + i 2. i ~ N(0, ) 3. u i ~ N(0,G) i & u i independent 54 27
Lecture 3 Linear random intercept models
Lecture 3 Linear random intercept models Example: Weight of Guinea Pigs Body weights of 48 pigs in 9 successive weeks of follow-up (Table 3.1 DLZ) The response is measures at n different times, or under
More informationMonday 7 th Febraury 2005
Monday 7 th Febraury 2 Analysis of Pigs data Data: Body weights of 48 pigs at 9 successive follow-up visits. This is an equally spaced data. It is always a good habit to reshape the data, so we can easily
More informationLecture 3.1 Basic Logistic LDA
y Lecture.1 Basic Logistic LDA 0.2.4.6.8 1 Outline Quick Refresher on Ordinary Logistic Regression and Stata Women s employment example Cross-Over Trial LDA Example -100-50 0 50 100 -- Longitudinal Data
More information****Lab 4, Feb 4: EDA and OLS and WLS
****Lab 4, Feb 4: EDA and OLS and WLS ------- log: C:\Documents and Settings\Default\Desktop\LDA\Data\cows_Lab4.log log type: text opened on: 4 Feb 2004, 09:26:19. use use "Z:\LDA\DataLDA\cowsP.dta", clear.
More informationModel and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data
The 3rd Australian and New Zealand Stata Users Group Meeting, Sydney, 5 November 2009 1 Model and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data Dr Jisheng Cui Public Health
More informationLab 3: Two levels Poisson models (taken from Multilevel and Longitudinal Modeling Using Stata, p )
Lab 3: Two levels Poisson models (taken from Multilevel and Longitudinal Modeling Using Stata, p. 376-390) BIO656 2009 Goal: To see if a major health-care reform which took place in 1997 in Germany was
More informationLongitudinal Data Analysis Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: May 18-19, 2017, Chicago, Illinois
Longitudinal Data Analysis Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: May 18-19, 217, Chicago, Illinois Outline 1. Opportunities and challenges of panel data. a. Data requirements b. Control
More informationPlease discuss each of the 3 problems on a separate sheet of paper, not just on a separate page!
Econometrics - Exam May 11, 2011 1 Exam Please discuss each of the 3 problems on a separate sheet of paper, not just on a separate page! Problem 1: (15 points) A researcher has data for the year 2000 from
More informationProblem Set 10: Panel Data
Problem Set 10: Panel Data 1. Read in the data set, e11panel1.dta from the course website. This contains data on a sample or 1252 men and women who were asked about their hourly wage in two years, 2005
More informationExercices for Applied Econometrics A
QEM F. Gardes-C. Starzec-M.A. Diaye Exercices for Applied Econometrics A I. Exercice: The panel of households expenditures in Poland, for years 1997 to 2000, gives the following statistics for the whole
More informationmultilevel modeling: concepts, applications and interpretations
multilevel modeling: concepts, applications and interpretations lynne c. messer 27 october 2010 warning social and reproductive / perinatal epidemiologist concepts why context matters multilevel models
More informationGeneral Linear Model (Chapter 4)
General Linear Model (Chapter 4) Outcome variable is considered continuous Simple linear regression Scatterplots OLS is BLUE under basic assumptions MSE estimates residual variance testing regression coefficients
More informationMultilevel Modeling (MLM) part 1. Robert Yu
Multilevel Modeling (MLM) part 1 Robert Yu a few words before the talk This is a report from attending a 2 day training course of Multilevel Modeling by Dr. Raykov Tenko, held on March 22 23, 2012, in
More informationCRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M.
CRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M. Wooldridge Michigan State University 1. Introduction 2. Linear
More informationQIC program and model selection in GEE analyses
The Stata Journal (2007) 7, Number 2, pp. 209 220 QIC program and model selection in GEE analyses James Cui Department of Epidemiology and Preventive Medicine Monash University Melbourne, Australia james.cui@med.monash.edu.au
More informationSoc 63993, Homework #7 Answer Key: Nonlinear effects/ Intro to path analysis
Soc 63993, Homework #7 Answer Key: Nonlinear effects/ Intro to path analysis Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised February 20, 2015 Problem 1. The files
More informationJeffrey M. Wooldridge Michigan State University
Fractional Response Models with Endogenous Explanatory Variables and Heterogeneity Jeffrey M. Wooldridge Michigan State University 1. Introduction 2. Fractional Probit with Heteroskedasticity 3. Fractional
More informationFixed and Random Effects Models: Vartanian, SW 683
: Vartanian, SW 683 Fixed and random effects models See: http://teaching.sociology.ul.ie/dcw/confront/node45.html When you have repeated observations per individual this is a problem and an advantage:
More informationQuantitative Methods Final Exam (2017/1)
Quantitative Methods Final Exam (2017/1) 1. Please write down your name and student ID number. 2. Calculator is allowed during the exam, but DO NOT use a smartphone. 3. List your answers (together with
More informationSimultaneous Equations with Error Components. Mike Bronner Marko Ledic Anja Breitwieser
Simultaneous Equations with Error Components Mike Bronner Marko Ledic Anja Breitwieser PRESENTATION OUTLINE Part I: - Simultaneous equation models: overview - Empirical example Part II: - Hausman and Taylor
More informationUniversity of California at Berkeley Fall Introductory Applied Econometrics Final examination. Scores add up to 125 points
EEP 118 / IAS 118 Elisabeth Sadoulet and Kelly Jones University of California at Berkeley Fall 2008 Introductory Applied Econometrics Final examination Scores add up to 125 points Your name: SID: 1 1.
More informationLDA Midterm Due: 02/21/2005
LDA.665 Midterm Due: //5 Question : The randomized intervention trial is designed to answer the scientific questions: whether social network method is effective in retaining drug users in treatment programs,
More informationMultilevel Modeling Day 2 Intermediate and Advanced Issues: Multilevel Models as Mixed Models. Jian Wang September 18, 2012
Multilevel Modeling Day 2 Intermediate and Advanced Issues: Multilevel Models as Mixed Models Jian Wang September 18, 2012 What are mixed models The simplest multilevel models are in fact mixed models:
More informationMicroeconometrics (PhD) Problem set 2: Dynamic Panel Data Solutions
Microeconometrics (PhD) Problem set 2: Dynamic Panel Data Solutions QUESTION 1 Data for this exercise can be prepared by running the do-file called preparedo posted on my webpage This do-file collects
More informationLecture 4: Generalized Linear Mixed Models
Dankmar Böhning Southampton Statistical Sciences Research Institute University of Southampton, UK S 3 RI, 11-12 December 2014 An example with one random effect An example with two nested random effects
More informationMixed Models for Longitudinal Binary Outcomes. Don Hedeker Department of Public Health Sciences University of Chicago.
Mixed Models for Longitudinal Binary Outcomes Don Hedeker Department of Public Health Sciences University of Chicago hedeker@uchicago.edu https://hedeker-sites.uchicago.edu/ Hedeker, D. (2005). Generalized
More informationContrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models:
Contrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models: Marginal models: based on the consequences of dependence on estimating model parameters.
More informationEmpirical Application of Panel Data Regression
Empirical Application of Panel Data Regression 1. We use Fatality data, and we are interested in whether rising beer tax rate can help lower traffic death. So the dependent variable is traffic death, while
More informationAppendix A. Numeric example of Dimick Staiger Estimator and comparison between Dimick-Staiger Estimator and Hierarchical Poisson Estimator
Appendix A. Numeric example of Dimick Staiger Estimator and comparison between Dimick-Staiger Estimator and Hierarchical Poisson Estimator As described in the manuscript, the Dimick-Staiger (DS) estimator
More informationLecture#12. Instrumental variables regression Causal parameters III
Lecture#12 Instrumental variables regression Causal parameters III 1 Demand experiment, market data analysis & simultaneous causality 2 Simultaneous causality Your task is to estimate the demand function
More informationBinary Dependent Variables
Binary Dependent Variables In some cases the outcome of interest rather than one of the right hand side variables - is discrete rather than continuous Binary Dependent Variables In some cases the outcome
More informationModule 6 Case Studies in Longitudinal Data Analysis
Module 6 Case Studies in Longitudinal Data Analysis Benjamin French, PhD Radiation Effects Research Foundation SISCR 2018 July 24, 2018 Learning objectives This module will focus on the design of longitudinal
More informationIntroductory Econometrics. Lecture 13: Hypothesis testing in the multiple regression model, Part 1
Introductory Econometrics Lecture 13: Hypothesis testing in the multiple regression model, Part 1 Jun Ma School of Economics Renmin University of China October 19, 2016 The model I We consider the classical
More informationRecent Developments in Multilevel Modeling
Recent Developments in Multilevel Modeling Roberto G. Gutierrez Director of Statistics StataCorp LP 2007 North American Stata Users Group Meeting, Boston R. Gutierrez (StataCorp) Multilevel Modeling August
More informationMultilevel/Mixed Models and Longitudinal Analysis Using Stata
Multilevel/Mixed Models and Longitudinal Analysis Using Stata Isaac J. Washburn PhD Research Associate Oregon Social Learning Center Summer Workshop Series July 2010 Longitudinal Analysis 1 Longitudinal
More informationLONGITUDINAL DATA ANALYSIS Homework I, 2005 SOLUTION. A = ( 2) = 36; B = ( 4) = 94. Therefore A B = 36 ( 94) = 3384.
LONGITUDINAL DATA ANALYSIS Homework I, 2005 SOLUTION 1. Suppose A and B are both 2 2 matrices with A = ( 6 3 2 5 ) ( 4 10, B = 7 6 (a) Verify that A B = AB. ) A = 6 5 3 ( 2) = 36; B = ( 4) 6 10 7 = 94.
More information8. Nonstandard standard error issues 8.1. The bias of robust standard errors
8.1. The bias of robust standard errors Bias Robust standard errors are now easily obtained using e.g. Stata option robust Robust standard errors are preferable to normal standard errors when residuals
More informationLab 10 - Binary Variables
Lab 10 - Binary Variables Spring 2017 Contents 1 Introduction 1 2 SLR on a Dummy 2 3 MLR with binary independent variables 3 3.1 MLR with a Dummy: different intercepts, same slope................. 4 3.2
More informationECON Introductory Econometrics. Lecture 5: OLS with One Regressor: Hypothesis Tests
ECON4150 - Introductory Econometrics Lecture 5: OLS with One Regressor: Hypothesis Tests Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 5 Lecture outline 2 Testing Hypotheses about one
More informationExam ECON3150/4150: Introductory Econometrics. 18 May 2016; 09:00h-12.00h.
Exam ECON3150/4150: Introductory Econometrics. 18 May 2016; 09:00h-12.00h. This is an open book examination where all printed and written resources, in addition to a calculator, are allowed. If you are
More informationProblem Set 5 ANSWERS
Economics 20 Problem Set 5 ANSWERS Prof. Patricia M. Anderson 1, 2 and 3 Suppose that Vermont has passed a law requiring employers to provide 6 months of paid maternity leave. You are concerned that women
More information1 The basics of panel data
Introductory Applied Econometrics EEP/IAS 118 Spring 2015 Related materials: Steven Buck Notes to accompany fixed effects material 4-16-14 ˆ Wooldridge 5e, Ch. 1.3: The Structure of Economic Data ˆ Wooldridge
More informationGeneralized linear models
Generalized linear models Christopher F Baum ECON 8823: Applied Econometrics Boston College, Spring 2016 Christopher F Baum (BC / DIW) Generalized linear models Boston College, Spring 2016 1 / 1 Introduction
More informationEssential of Simple regression
Essential of Simple regression We use simple regression when we are interested in the relationship between two variables (e.g., x is class size, and y is student s GPA). For simplicity we assume the relationship
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 informationSTATISTICS 110/201 PRACTICE FINAL EXAM
STATISTICS 110/201 PRACTICE FINAL EXAM Questions 1 to 5: There is a downloadable Stata package that produces sequential sums of squares for regression. In other words, the SS is built up as each variable
More informationEconometrics Homework 4 Solutions
Econometrics Homework 4 Solutions Computer Question (Optional, no need to hand in) (a) c i may capture some state-specific factor that contributes to higher or low rate of accident or fatality. For example,
More informationpoint estimates, standard errors, testing, and inference for nonlinear combinations
Title xtreg postestimation Postestimation tools for xtreg Description The following postestimation commands are of special interest after xtreg: command description xttest0 Breusch and Pagan LM test for
More informationEmpirical Application of Simple Regression (Chapter 2)
Empirical Application of Simple Regression (Chapter 2) 1. The data file is House Data, which can be downloaded from my webpage. 2. Use stata menu File Import Excel Spreadsheet to read the data. Don t forget
More informationLongitudinal Data Analysis
Longitudinal Data Analysis Mike Allerhand This document has been produced for the CCACE short course: Longitudinal Data Analysis. No part of this document may be reproduced, in any form or by any means,
More informationEmpirical Asset Pricing
Department of Mathematics and Statistics, University of Vaasa, Finland Texas A&M University, May June, 2013 As of May 24, 2013 Part III Stata Regression 1 Stata regression Regression Factor variables Postestimation:
More informationOverdispersion Workshop in generalized linear models Uppsala, June 11-12, Outline. Overdispersion
Biostokastikum Overdispersion is not uncommon in practice. In fact, some would maintain that overdispersion is the norm in practice and nominal dispersion the exception McCullagh and Nelder (1989) Overdispersion
More informationECON Introductory Econometrics. Lecture 4: Linear Regression with One Regressor
ECON4150 - Introductory Econometrics Lecture 4: Linear Regression with One Regressor Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 4 Lecture outline 2 The OLS estimators The effect of
More information1 A Review of Correlation and Regression
1 A Review of Correlation and Regression SW, Chapter 12 Suppose we select n = 10 persons from the population of college seniors who plan to take the MCAT exam. Each takes the test, is coached, and then
More informationSubject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study
Subject-specific observed profiles of log(fev1) vs age First 50 subjects in Six Cities Study 1.4 0.0-6 7 8 9 10 11 12 13 14 15 16 17 18 19 age Model 1: A simple broken stick model with knot at 14 fit with
More informationClass Notes: Week 8. Probit versus Logit Link Functions and Count Data
Ronald Heck Class Notes: Week 8 1 Class Notes: Week 8 Probit versus Logit Link Functions and Count Data This week we ll take up a couple of issues. The first is working with a probit link function. While
More informationSection Least Squares Regression
Section 2.3 - Least Squares Regression Statistics 104 Autumn 2004 Copyright c 2004 by Mark E. Irwin Regression Correlation gives us a strength of a linear relationship is, but it doesn t tell us what it
More informationECON 497 Final Exam Page 1 of 12
ECON 497 Final Exam Page of 2 ECON 497: Economic Research and Forecasting Name: Spring 2008 Bellas Final Exam Return this exam to me by 4:00 on Wednesday, April 23. It may be e-mailed to me. It may be
More informationi (x i x) 2 1 N i x i(y i y) Var(x) = P (x 1 x) Var(x)
ECO 6375 Prof Millimet Problem Set #2: Answer Key Stata problem 2 Q 3 Q (a) The sample average of the individual-specific marginal effects is 0039 for educw and -0054 for white Thus, on average, an extra
More informationCase of single exogenous (iv) variable (with single or multiple mediators) iv à med à dv. = β 0. iv i. med i + α 1
Mediation Analysis: OLS vs. SUR vs. ISUR vs. 3SLS vs. SEM Note by Hubert Gatignon July 7, 2013, updated November 15, 2013, April 11, 2014, May 21, 2016 and August 10, 2016 In Chap. 11 of Statistical Analysis
More informationNonlinear relationships Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised February 20, 2015
Nonlinear relationships Richard Williams, University of Notre Dame, https://www.nd.edu/~rwilliam/ Last revised February, 5 Sources: Berry & Feldman s Multiple Regression in Practice 985; Pindyck and Rubinfeld
More information4/9/2014. Outline for Stochastic Frontier Analysis. Stochastic Frontier Production Function. Stochastic Frontier Production Function
Productivity Measurement Mini Course Stochastic Frontier Analysis Prof. Nicole Adler, Hebrew University Outline for Stochastic Frontier Analysis Stochastic Frontier Production Function Production function
More informationBIOSTATS 640 Spring 2018 Unit 2. Regression and Correlation (Part 1 of 2) STATA Users
Unit Regression and Correlation 1 of - Practice Problems Solutions Stata Users 1. In this exercise, you will gain some practice doing a simple linear regression using a Stata data set called week0.dta.
More informationsociology sociology Scatterplots Quantitative Research Methods: Introduction to correlation and regression Age vs Income
Scatterplots Quantitative Research Methods: Introduction to correlation and regression Scatterplots can be considered as interval/ratio analogue of cross-tabs: arbitrarily many values mapped out in -dimensions
More informationControl Function and Related Methods: Nonlinear Models
Control Function and Related Methods: Nonlinear Models Jeff Wooldridge Michigan State University Programme Evaluation for Policy Analysis Institute for Fiscal Studies June 2012 1. General Approach 2. Nonlinear
More information5. Let W follow a normal distribution with mean of μ and the variance of 1. Then, the pdf of W is
Practice Final Exam Last Name:, First Name:. Please write LEGIBLY. Answer all questions on this exam in the space provided (you may use the back of any page if you need more space). Show all work but do
More informationespecially with continuous
Handling interactions in Stata, especially with continuous predictors Patrick Royston & Willi Sauerbrei UK Stata Users meeting, London, 13-14 September 2012 Interactions general concepts General idea of
More informationStep 2: Select Analyze, Mixed Models, and Linear.
Example 1a. 20 employees were given a mood questionnaire on Monday, Wednesday and again on Friday. The data will be first be analyzed using a Covariance Pattern model. Step 1: Copy Example1.sav data file
More informationSTAT 526 Advanced Statistical Methodology
STAT 526 Advanced Statistical Methodology Fall 2017 Lecture Note 10 Analyzing Clustered/Repeated Categorical Data 0-0 Outline Clustered/Repeated Categorical Data Generalized Linear Mixed Models Generalized
More informationConfidence intervals for the variance component of random-effects linear models
The Stata Journal (2004) 4, Number 4, pp. 429 435 Confidence intervals for the variance component of random-effects linear models Matteo Bottai Arnold School of Public Health University of South Carolina
More informationNonrecursive Models Highlights Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised April 6, 2015
Nonrecursive Models Highlights Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised April 6, 2015 This lecture borrows heavily from Duncan s Introduction to Structural
More informationLecture 4: Multivariate Regression, Part 2
Lecture 4: Multivariate Regression, Part 2 Gauss-Markov Assumptions 1) Linear in Parameters: Y X X X i 0 1 1 2 2 k k 2) Random Sampling: we have a random sample from the population that follows the above
More information7/28/15. Review Homework. Overview. Lecture 6: Logistic Regression Analysis
Lecture 6: Logistic Regression Analysis Christopher S. Hollenbeak, PhD Jane R. Schubart, PhD The Outcomes Research Toolbox Review Homework 2 Overview Logistic regression model conceptually Logistic regression
More informationECON Introductory Econometrics. Lecture 6: OLS with Multiple Regressors
ECON4150 - Introductory Econometrics Lecture 6: OLS with Multiple Regressors Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 6 Lecture outline 2 Violation of first Least Squares assumption
More informationImpact of serial correlation structures on random effect misspecification with the linear mixed model.
Impact of serial correlation structures on random effect misspecification with the linear mixed model. Brandon LeBeau University of Iowa file:///c:/users/bleb/onedrive%20 %20University%20of%20Iowa%201/JournalArticlesInProgress/Diss/Study2/Pres/pres.html#(2)
More information4. MA(2) +drift: y t = µ + ɛ t + θ 1 ɛ t 1 + θ 2 ɛ t 2. Mean: where θ(l) = 1 + θ 1 L + θ 2 L 2. Therefore,
61 4. MA(2) +drift: y t = µ + ɛ t + θ 1 ɛ t 1 + θ 2 ɛ t 2 Mean: y t = µ + θ(l)ɛ t, where θ(l) = 1 + θ 1 L + θ 2 L 2. Therefore, E(y t ) = µ + θ(l)e(ɛ t ) = µ 62 Example: MA(q) Model: y t = ɛ t + θ 1 ɛ
More informationLab 6 - Simple Regression
Lab 6 - Simple Regression Spring 2017 Contents 1 Thinking About Regression 2 2 Regression Output 3 3 Fitted Values 5 4 Residuals 6 5 Functional Forms 8 Updated from Stata tutorials provided by Prof. Cichello
More informationLecture (chapter 13): Association between variables measured at the interval-ratio level
Lecture (chapter 13): Association between variables measured at the interval-ratio level Ernesto F. L. Amaral April 9 11, 2018 Advanced Methods of Social Research (SOCI 420) Source: Healey, Joseph F. 2015.
More informationoptions description set confidence level; default is level(95) maximum number of iterations post estimation results
Title nlcom Nonlinear combinations of estimators Syntax Nonlinear combination of estimators one expression nlcom [ name: ] exp [, options ] Nonlinear combinations of estimators more than one expression
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 informationESTIMATING AVERAGE TREATMENT EFFECTS: REGRESSION DISCONTINUITY DESIGNS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics
ESTIMATING AVERAGE TREATMENT EFFECTS: REGRESSION DISCONTINUITY DESIGNS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics July 2009 1. Introduction 2. The Sharp RD Design 3.
More informationLecture 5. In the last lecture, we covered. This lecture introduces you to
Lecture 5 In the last lecture, we covered. homework 2. The linear regression model (4.) 3. Estimating the coefficients (4.2) This lecture introduces you to. Measures of Fit (4.3) 2. The Least Square Assumptions
More informationDescription Quick start Menu Syntax Options Remarks and examples Stored results Methods and formulas Acknowledgments References Also see
Title stata.com mixed Multilevel mixed-effects linear regression Description Quick start Menu Syntax Options Remarks and examples Stored results Methods and formulas Acknowledgments References Also see
More information4 Instrumental Variables Single endogenous variable One continuous instrument. 2
Econ 495 - Econometric Review 1 Contents 4 Instrumental Variables 2 4.1 Single endogenous variable One continuous instrument. 2 4.2 Single endogenous variable more than one continuous instrument..........................
More informationTitle. Description. Special-interest postestimation commands. xtmelogit postestimation Postestimation tools for xtmelogit
Title xtmelogit postestimation Postestimation tools for xtmelogit Description The following postestimation commands are of special interest after xtmelogit: Command Description estat group summarize the
More informationPractice 2SLS with Artificial Data Part 1
Practice 2SLS with Artificial Data Part 1 Yona Rubinstein July 2016 Yona Rubinstein (LSE) Practice 2SLS with Artificial Data Part 1 07/16 1 / 16 Practice with Artificial Data In this note we use artificial
More informationEconometrics. 9) Heteroscedasticity and autocorrelation
30C00200 Econometrics 9) Heteroscedasticity and autocorrelation Timo Kuosmanen Professor, Ph.D. http://nomepre.net/index.php/timokuosmanen Today s topics Heteroscedasticity Possible causes Testing for
More information7 Introduction to Time Series
Econ 495 - Econometric Review 1 7 Introduction to Time Series 7.1 Time Series vs. Cross-Sectional Data Time series data has a temporal ordering, unlike cross-section data, we will need to changes some
More informationWarwick Economics Summer School Topics in Microeconometrics Instrumental Variables Estimation
Warwick Economics Summer School Topics in Microeconometrics Instrumental Variables Estimation Michele Aquaro University of Warwick This version: July 21, 2016 1 / 31 Reading material Textbook: Introductory
More informationLecture 3: Multiple Regression. Prof. Sharyn O Halloran Sustainable Development U9611 Econometrics II
Lecture 3: Multiple Regression Prof. Sharyn O Halloran Sustainable Development Econometrics II Outline Basics of Multiple Regression Dummy Variables Interactive terms Curvilinear models Review Strategies
More informationWeek 3: Simple Linear Regression
Week 3: Simple Linear Regression Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ALL RIGHTS RESERVED 1 Outline
More informationStatistics: A review. Why statistics?
Statistics: A review Why statistics? What statistical concepts should we know? Why statistics? To summarize, to explore, to look for relations, to predict What kinds of data exist? Nominal, Ordinal, Interval
More informationsociology 362 regression
sociology 36 regression Regression is a means of studying how the conditional distribution of a response variable (say, Y) varies for different values of one or more independent explanatory variables (say,
More informationApplied Econometrics. Lecture 3: Introduction to Linear Panel Data Models
Applied Econometrics Lecture 3: Introduction to Linear Panel Data Models Måns Söderbom 4 September 2009 Department of Economics, Universy of Gothenburg. Email: mans.soderbom@economics.gu.se. Web: www.economics.gu.se/soderbom,
More information10) Time series econometrics
30C00200 Econometrics 10) Time series econometrics Timo Kuosmanen Professor, Ph.D. 1 Topics today Static vs. dynamic time series model Suprious regression Stationary and nonstationary time series Unit
More informationIntroduction to Econometrics
Introduction to Econometrics STAT-S-301 Introduction to Time Series Regression and Forecasting (2016/2017) Lecturer: Yves Dominicy Teaching Assistant: Elise Petit 1 Introduction to Time Series Regression
More informationLecture 4: Multivariate Regression, Part 2
Lecture 4: Multivariate Regression, Part 2 Gauss-Markov Assumptions 1) Linear in Parameters: Y X X X i 0 1 1 2 2 k k 2) Random Sampling: we have a random sample from the population that follows the above
More informationSelf-Assessment Weeks 8: Multiple Regression with Qualitative Predictors; Multiple Comparisons
Self-Assessment Weeks 8: Multiple Regression with Qualitative Predictors; Multiple Comparisons 1. Suppose we wish to assess the impact of five treatments while blocking for study participant race (Black,
More informationCorrelation and Simple Linear Regression
Correlation and Simple Linear Regression Sasivimol Rattanasiri, Ph.D Section for Clinical Epidemiology and Biostatistics Ramathibodi Hospital, Mahidol University E-mail: sasivimol.rat@mahidol.ac.th 1 Outline
More information1
i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Foreign Liabilities/ Dependen Variabel Rasio Foreign Liabilities Total Debt (1) (2) Konstanta 0.216*** 0.219*** Ekspor/Total Sales -0.064-0.055
More information