I'm trying to check a relationship between two variable. one with three levels and other is with 7 levels.
one variable is overall_sentiment with (Positive, Negative, Neutral)
other is comments_created_at with (Monday, Tuesday, Wed, Thu, Fri, sat, sun)
I have to put Overall_sentiment
as dependent variable for regression. I know for 2 level we can use glm()
.
As there is three levels in dependent variable what should I do.
I ran the model using glm
function it worked. But I don't know how to interpret the result.
m <- glm(as.numeric(Meteor$overall_sentiment) ~ comments_created_at, data = Meteor)
summary(m)
OUTPUT
Call:
glm(formula = as.numeric(Meteor$overall_sentiment) ~ comments_created_at,
data = Meteor)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.3364 -0.3364 0.6636 0.7030 0.7821
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.296965 0.011820 194.320 < 2e-16 ***
comments_created_atMon -0.005070 0.017018 -0.298 0.765751
comments_created_atSat -0.037599 0.021351 -1.761 0.078258 .
comments_created_atSun -0.079039 0.023320 -3.389 0.000701 ***
comments_created_atThu -0.007945 0.016532 -0.481 0.630832
comments_created_atTue 0.039464 0.015337 2.573 0.010083 *
comments_created_atWed 0.005864 0.015871 0.369 0.711762
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 0.6582407)
Null deviance: 20097 on 30501 degrees of freedom
Residual deviance: 20073 on 30495 degrees of freedom
AIC: 73814
Number of Fisher Scoring iterations: 2