'GLM Output - Remove Coefficient Breakout By Value in Field
I want to create a glm model that has a coefficient and standard error. Below is my code:
glm(y ~ a + b + a*b + as.factor(c) + as.factor(d), family = binomial(link = "probit"), data = df)
When my output appears, variables c and d are broken out by the values something like below. I left out standard errors in this case for the output.
How do I make variables c and d not be broken out but keep as just total?
c is chr [1:762] "Afghanistan" "Afghanistan" "Afghanistan" ...
d is int [1:762] 2010 2011 2012 2013 2014 2010 2011 2012 2013 2014 ...
Coefficients:
Estimate
(Intercept) -6.13672
a 11.72536
b 0.32235
as.factor(c)Albania -11.93774
as.factor(c)Algeria 1.14561
as.factor(c)Angola -13.72281
as.factor(c)Argentina -13.64121
as.factor(c)Armenia -11.44819
as.factor(d)2011 0.08119
as.factor(d)2012 -0.32459
as.factor(d)2013 -0.32445
as.factor(d)2014 0.16409
a:b -0.29193
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
