prop.multinom function

Proportions and standard errors

Proportions and standard errors

Computes proportions (and their standard errors) when the number of classes is >= 2, based on predicted values of a model. The function is intended to be used parallel to a multinomial log-linear model.

prop.multinom(x)

Arguments

  • x: either a factor or a matrix with K columns giving the counts for each of the K classes.

Details

The proportions can be computed through the predict function applied on a multinomial log-linear model (see multinom). However, standard errors (or confidence intervals) cannot be obtained this way. The present function uses differents GLMs (in each case considering one category vs. the sum of all others) to obtain proportions and standard errors. Overdispersion is taken into account by default, using a quasibinomial law in all GLMs built.

Returns

  • probs: the calculated proportions.

  • se: the calculated standard errors.

Author(s)

Maxime HERVE maxime.herve@univ-rennes1.fr

See Also

multinom, glm

Examples

response <- data.frame(A=c(2,2,4,0,2,14,6,16,0,0), B=c(2,0,0,0,6,2,10,6,0,0), C=c(12,6,0,6,2,0,0,0,0,0), D=c(0,0,0,14,0,0,0,0,2,0), E=c(0,0,0,0,0,0,0,0,16,15)) prop.multinom(response)
  • Maintainer: Maxime HERVE
  • License: GPL-2
  • Last published: 2023-11-06

Useful links