0
$\begingroup$

I am a grad student with little experience with R. I am wondering if there is an equivalent of polr's zeta in glm.

For a part of my code, I used the intercepts for the class boundaries from a polr function by using zeta:

sto<-polr(factor(y)~log(x),method='probit')
sd<-1/as.vector(sto$coeff)
mu<-as.vector(sto$zeta)*sd
#sd
#[1] 0.2425612
#mu
#[1] 3.501163 3.677998

I now need to use glm, but it does not appear to work. My code is currently this:

sto<-glm(factor(y)~log(x),family = binomial(link='probit'))
sd<-1/as.vector(sto$coeff)
mu<-as.vector(sto$zeta)*sd
#sd
#[1] -0.06670092  0.24520331
#mu
#numeric(0)

After reading https://rdrr.io/cran/MASS/man/polr.html and https://rdrr.io/rforge/simdat.base/man/GLM.html, I believe the problem is the fact that zeta is not a component in glm.

$\endgroup$

1 Answer 1

0
$\begingroup$

This boils down to a programming problem, specifically understanding how R handles a non-standardized response in the LHS of the formula when fitting a binary response.

The proportional odds logistic regression (POLR) is a method for ordinal/polytomous response data, it models the cumulative probability of a response. However, the estimation method is far afield of standard GLMs. The text "Generalized Linear Models" from McCullogh and Nelder covers this in more detail. Essentially, your zeta is like an "intercept" term for each thresholded response, estimated with a common slope term in each case. The estimation is done with an EM algorithm.

But then you fit the GLM. The binomial family of GLMs is not a ordinal/polytomous analysis. R has transformed the response to an analyzable form for you, and with no warning. When you call "factor(y)", R codes each level of Y to a numeric value and assigns a numeric value based on alphabetical order. When you fit a binary analysis, you expect positive cases to take a numeric value of 1, so any other case can take a value of 0. Your logistic regression is just giving you the probability of randomly sampling a value of Y taken at it's alphabetically-first ordinal level. It's rubbish and has no relation to the output from POLR.

$\endgroup$
2
  • $\begingroup$ If the glm has no relation to the output from polr, which function should I use? I used polr for my ordinal data (the code I provided is part of a larger code to create an ordinal technique). I now need to use it for the binomial technique, but polr does not work with binomial data, which is why I used glm. $\endgroup$
    – user34930
    Commented Mar 17, 2022 at 22:02
  • $\begingroup$ @user34930 I'm not sure if this is the question you're asking, but if your Y is actually binomial, then the "intercept" coefficient is the closest analogue to the the zeta. $\endgroup$
    – AdamO
    Commented Mar 17, 2022 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.