Skip to contents

This is an adaptation of code found spread out in the package mclogit. The methods for estimating overdispersion are described in Afroz 2018. Summarized in page 54 and 55.

Usage

estimate_overdispersion(
  y,
  fitted_values,
  coefs,
  method = "Afroz",
  number_samples = NULL,
  weight = NULL
)

Arguments

y

The vector of multinomial observations.

fitted_values

The fitted mean values.

coefs

The Coefficients or the number of coefficients.

method

The method of estimating overdispersion. One of "Afroz", "Pearson", "Fletcher", or "Deviance". "Afroz" is recommended.

number_samples

The number of samples that were fitted. Usually the number of rows in the matrix fitted (y). Only necessary if providing a flattened y.

weight

TODO

Value

The estimation for overdispersion.