orthopoly function

Orthogonal polynomials

Orthogonal polynomials

This function is called from the function omca. It allows the analyst to compute the orthogonal polynomials of each ordered categorical variable. The number of the polynomials is equal to the variable category less one. The function computes the polynomial transformation of the ordered categorical variable.

orthopoly(marginals, scores)

Arguments

  • scores: The ordered scores of an ordered variable. By default mj=NULL, the natural scores (1,2,...) are computed.
  • marginals: The marginals, relative frequencies of the ordered variable.

Returns

Describe the value returned - B: the matrix of the orthogonal polynomials without the trivial polynomial.

References

Beh EJ and Lombardo R 2014 Correspondence analysis, Theory, Practice and New Strategies. Wiley.

Author(s)

Rosaria Lombardo and Eric J Beh

Note

Note that the sum of the marginals of the ordered variables should be one. At the end, the various polynomial matrices will be stored in a super-diagonal matrix.

Examples

orthopoly(marginals=c(.1,.2,.3,.2,.2), scores=c(1,2,3,4,5))