I'm trying to explain Y (a count variable), in terms of X, Xsquared, and Size, with random effects for Industry/Firm, by year. My hypothesis is that there is a positive relationship between Y and X, and that this relationship has a inverted-U shape (thus the Xsquared term). I normally do this with normal regression models, but I want to know if it would mean the same in a GLMER one (I'm new with these models)
Do my results, here below, support my inverted-U hypothesis, or something else? Any tips on how to show this inverted-U effect graphically in r? Lastly, how can I interpret the random effects part?
My GLMER model looks like this:
model <- glmer(Y ~ Year + X + Xsquared + Size + (1 + Year|Industry/Firm), data = mydata, family = poisson)
Results:
Random effects:
Groups Name Variance Std.Dev. Corr
Firm:Industry (Intercept) 1.787e+04 1.337e+02
Year 4.434e-03 6.659e-02 -1.00
Industry (Intercept) 7.749e-01 8.803e-01
Year 1.923e-07 4.385e-04 -1.00
Number of obs: 436, groups: Firm:Industry, 109; Industry, 37
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 51.697639 9.178129 5.633 1.77e-08 ***
Year -0.027132 0.004535 -5.983 2.19e-09 ***
X 1.322702 0.334092 3.959 7.52e-05 ***
Xsquared -0.277335 0.141129 -1.965 0.0494 *
Size 0.321026 0.043825 7.325 2.39e-13 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) Year DOI DOI2
Year -0.999
DOI 0.004 -0.019
DOI2 -0.009 0.020 -0.953
LNAssets -0.162 0.119 0.003 -0.007
Updated results after changing Year to cYear
Random effects:
Groups Name Variance Std.Dev. Corr
Firm:Industry (Intercept) 5.840e-01 0.764205
cYear 5.546e-03 0.074474 0.38
Industry (Intercept) 8.243e-05 0.009079
cYear 2.011e-05 0.004485 0.54
Number of obs: 436, groups: Firm:Industry, 109; Industry, 37
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -2.87753 0.47970 -5.999 1.99e-09 ***
cYear -0.02303 0.02778 -0.829 0.407
X 1.32358 0.33632 3.935 8.30e-05 ***
Xsquared -0.27628 0.14217 -1.943 0.052 .
FirmSize 0.31789 0.04989 6.371 1.87e-10 ***