vglm in VGAM package for ordinal variables: what do the letters L and Q stand for?

StackOverflow https://stackoverflow.com//questions/24040584

  •  21-12-2019
  •  | 
  •  

Question

I'm fitting a cumulative-logit model using an ordinal explicative, the coefficients I get are as following:

coefficients(cum_mod_podds_ord,matrix=TRUE)
             logit(P[Y>=2]) logit(P[Y>=3])
(Intercept)     -0.4106068     -1.2504301
depr_ord.L       1.3749694      1.3749694
depr_ord.Q      -0.1039784     -0.1039784

I'd like to know what the L and Q that the function put after the name of the variable stand for.

Thank you in advance

Was it helpful?

Solution

These are the contrasts for an ordered factor; contrasts based on orthogonal polynomials. The L is for the "linear" polynomial term , the Q for the quadratic term. This is a bit like x and x^2 and so on, but just in terms of contrasts for the ordered factor.

If you have three levels in the ordered factor, the polynomial contrasts for those levels are:

> zapsmall(contr.poly(3))
             .L         .Q
[1,] -0.7071068  0.4082483
[2,]  0.0000000 -0.8164966
[3,]  0.7071068  0.4082483

where the rows above are the 3 levels of the factor. Each level in the factor is then replaced by the corresponding .L and .Q values (hence the factor is replaced by two variables in the model matrix).

If you need more info than this, Stackoverflow probably isn't the place; try CrossValidated instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top