glm is returning random letters for levels of an ordered factor

I'm using the glm function to evaluate the effect of two variables on the response variable converted, which are:

tibble [780 × 3] (S3: tbl_df/tbl/data.frame)
 $ converted     : Factor w/ 2 levels "no","yes": 1 2 2 2 2 ...
 $ personal_email: Factor w/ 2 levels "FALSE","TRUE": 1 1 1 1 1 ...
 $ when          : Ord.factor w/ 4 levels "immediately"<..: NA NA NA 1 1

call for the function is: glm(formula = converted ~ personal_email + when, family = binomial, data = df)

which returns, with the summary() function:

glm(formula = converted ~ personal_email + when, family = binomial, 
    data = df)

Coefficients:
                   Estimate Std. Error z value   Pr(>|z|)    
(Intercept)          -3.457    303.653  -0.011      0.991    
personal_emailTRUE   -3.704      0.809  -4.579 0.00000468 ***
when.L              -11.083    814.787  -0.014      0.989    
when.Q               -9.235    607.307  -0.015      0.988    
when.C               -4.918    271.597  -0.018      0.986    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 230.97  on 167  degrees of freedom
Residual deviance: 170.47  on 163  degrees of freedom
  (612 observations deleted due to missingness)
AIC: 180.47

Number of Fisher Scoring iterations: 16

why is the function returning these letters for when levels instead of the actual levels? Also, the coefficients and p-values for the levels of said factor changed after I made the factor ordered, which I thought the glm function did not take into acount.

What am I doing wrong?

Upvotes: 0

Views: 18

Answers (0)

Related Questions