Week8Questions.pdf - Week 8 Questions Dr L Scott-Hayward...

This preview shows page 1 - 4 out of 11 pages.

Week 8 QuestionsDr L Scott-HaywardIntroductionWe are going to use the same data as for the last four weeks of the ‘Weekly Questions’ to look at whatcovariates affect the Tobin’s Q score. We will fit models using Generalised Estimating Equations and/orrobust standard errors from both thegeepackandMRSea Rpackages. There will also be some assessment ofdiagnostics.As a reminder, Tobin’s Q is the ratio between a physical assets market value and its replacement value and isan interesting quantity in the markets. Theidvariable identifies the company.Fitting a GLMnewdat <-read.table("../data/dataForWeeklyQuestions.csv",header =T)require(dplyr)newdat <-arrange(newdat, id, year)glmfit <-glm(tobinsQ~ltd+ads+bookval+year,data =newdat)summary(glmfit)Call:glm(formula = tobinsQ ~ ltd + ads + bookval + year, data = newdat)Deviance Residuals:Min1QMedian3QMax-6.097-1.979-1.0700.437190.299Coefficients:Estimate Std. Error t value Pr(>|t|)(Intercept)3.683e+011.413e+012.6060.00918 **ltd2.484e-045.790e-054.291 1.79e-05 ***ads1.628e-033.641e-044.470 7.88e-06 ***bookval-2.630e-043.569e-05-7.369 1.82e-13 ***year-1.676e-027.055e-03-2.3760.01752 *---Signif. codes:0***0.001**0.01*0.05.0.11(Dispersion parameter for gaussian family taken to be 27.6165)Null deviance: 375420on 13524degrees of freedomResidual deviance: 373375on 13520degrees of freedomAIC: 83271Number of Fisher Scoring iterations: 2acf(residuals(glmfit))1
Fitting a GEErequire(geepack)geefit <-geeglm(tobinsQ~ltd+ads+bookval+year,data =newdat,id =id)summary(geefit)Call:geeglm(formula = tobinsQ ~ ltd + ads + bookval + year, data = newdat,id = id)Coefficients:EstimateStd.errWald Pr(>|W|)(Intercept)3.683e+012.147e+01 2.9430.08625 .ltd2.484e-042.188e-04 1.2890.25625ads1.628e-036.767e-04 5.7850.01616 *bookval-2.630e-049.655e-05 7.4220.00644 **year-1.676e-021.072e-02 2.4460.11785---Signif. codes:0***0.001**0.01*0.05.0.11Estimated Scale Parameters:Estimate Std.err(Intercept)27.615.084Correlation: Structure = independenceNumber of clusters:1240Maximum cluster size: 25acf(residuals(geefit))2
geefit2 <-geeglm(tobinsQ~ltd+ads+bookval+year,data =newdat,id =id,corstr ="ar1")summary(geefit2)Call:geeglm(formula = tobinsQ ~ ltd + ads + bookval + year, data = newdat,id = id, corstr = "ar1")Coefficients:EstimateStd.errWald Pr(>|W|)(Intercept) 47.172544 22.9638394.220.0400 *ltd0.0003050.0002181.96

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture