0
$\begingroup$

Below is the function and the output of glm() function in r. My question is why the output of the predictor variables contains one factor level for example MaritalStatusMarried, instead of MaritalStatus only. My predictor variable "MaritalStatus" had two levels,"Single" and "Married"

enter image description here

$\endgroup$
6
  • 2
    $\begingroup$ MaritalStatusSingle is the baseline and is included in the intercept. MaritalStatusMarried is the "effect" of being Married rather than Single. $\endgroup$
    – harre
    Aug 30, 2022 at 12:35
  • $\begingroup$ Okay, so there's no way I can remove that from the output? $\endgroup$
    – Wagathu
    Aug 30, 2022 at 13:05
  • $\begingroup$ What do you want to remove? $\endgroup$
    – harre
    Aug 30, 2022 at 13:06
  • $\begingroup$ I want the output to be like MaritalStatus and not MaritalStatusMarried $\endgroup$
    – Wagathu
    Aug 30, 2022 at 13:10
  • 1
    $\begingroup$ You are probably looking for the output from library(car); Anova(StudentModel) . You may also want to look at the emmeans package. $\endgroup$ Aug 30, 2022 at 14:25

0

Browse other questions tagged or ask your own question.