A collection of coin manufacturers, $m$, each produces a line of coins, the number of which varies by manufacturer (some produce 3 types of coins, others make 7, and so on). Each manufacturer imparts a characteristic bias towards flipping heads on all their coins. Further, manufacturers produce many of the same types of coins, $c$, which have a fixed, unknown bias. We can estimate the impact of coin, $c$, through an external database of coin-specific biases. Lastly, the coins are pressed once each year, $a$, and each pressing of the coins has another unique bias shared across all manufacturers and coins. Each coin is flipped a variable number of times, $n_i$, and the number of heads could be represented as
\begin{align*} y_{i,m,c,a} \sim \textrm{Binom}(n_{i}, p_{m,c,a}) \end{align*}
Assuming a large data set of coin-flip trials across an identifiable set of conditions (i.e., year, manufacturer, coin type), I would like to estimate the $m$ biases. Our measured variables are:
- number of heads, $y$
- number of trials, $n_i$
- manufacturer, $m$
- coin-specific probabilities (taken from external database), $c$
- year, $a$
I would like to estimate $m$ biases and perform a model comparison between nested models that have/don't have manufacturer info in a NHST framework. "Hits" will be manufacturers with large biases. My first thought was to use a generalized linear mixed model (GLMM), yet I'm having trouble figuring out how to specify the model, particularly given the varying number of trials. (For clarification, with simpler designs, I'm familiar with R syntax for using weights when the number of trials varies, function(y/n ~ ., ..., weights = n, ...)
.)
While I can see a Bayesian formulation for this model,
- Please assume a large data set of 100,000 observations and many of these models to fit when proposing an inference strategy
- For "historical reasons" (read: this test should look like an extension of an existing testing procedure), I'd like to use maximum likelihood.
I'm an applied scientist, so answers that provide references and code would be most helpful. Would Coull & Agresti 2000 be relevant to my case?