Why High-Cardinality Factors Need Special Care
A rating factor is high-cardinality when it has many possible levels. Examples might include a detailed vehicle classification, a large set of territories, or a product code with numerous categories. A model can estimate a separate effect for each level, but the existence of a code does not mean there is enough experience to estimate its effect reliably.
The central issue is the relationship between model complexity and level volume. Each additional freely estimated level effect uses information. When a level has little exposure or few claims, its fitted relativity can be driven by a small number of observations rather than a persistent risk difference. At the same time, merging levels indiscriminately can conceal real differences or create groups that are difficult to explain. The goal is not to minimize the number of levels at any cost; it is to make distinctions that are adequately supported and defensible.
Measure Support in the Context of the Model
For a claim-frequency model, policies or exposure units are not interchangeable with claims as measures of precision. A level may have substantial exposure but few claims, leaving its observed frequency imprecise. Conversely, a large number of claims can support a more precise frequency estimate, subject to the model assumptions and the exposure definition. For a severity model, claim count is usually more directly relevant than policy count because severities are observed on claims.
To make the frequency calculations precise, suppose claim counts \(N_j\) for levels \(j=1,\ldots,K\) are independent Poisson random variables, with mean \(e_j\lambda_j\). Here \(e_j\) is earned exposure in consistent units and \(\lambda_j\) is the expected claim frequency per exposure unit. This model assumes a constant frequency within each level over the period being modeled, conditional on the model predictors, and independent Poisson counts. If these assumptions are unsuitable—for example, because the data have material overdispersion—the uncertainty calculations below need an appropriate alternative model or variance adjustment.
Under these assumptions, \(\operatorname{Var}(N_j)=e_j\lambda_j\), so the estimated variance of \(\widehat{\lambda}_j\) is approximately \(\widehat{\lambda}_j/e_j\). For a positive count, the estimated standard error of the log frequency is approximately \(1/\sqrt{N_j}\). This is a useful diagnostic of relative uncertainty: it depends on claim count, not exposure alone.
Worked Example: Comparing Frequency Precision Across Levels
A hypothetical insurer models claim frequency by territory. Territory Alder has 8 claims from 400 earned vehicle-years; territory Birch has 80 claims from 4,000 earned vehicle-years. Assume independent Poisson counts with constant frequency within each territory, and use a 95% Wald interval on the log-frequency scale. Compare the estimated frequencies and their approximate intervals. Name a common mistake the comparison avoids.
Method. Estimate each rate as claims divided by exposure. For a positive Poisson count \(N_j\), the approximate log-scale standard error is \(1/\sqrt{N_j}\). The interval is the estimated rate multiplied by \(\exp(\pm1.96/\sqrt{N_j})\).
For Alder, \(\widehat{\lambda}_A=8/400=0.0200\) claims per vehicle-year. Its log-scale standard error is \(1/\sqrt{8}=0.3536\), and its margin on the log scale is \(1.96(0.3536)=0.6930\). Thus the interval is \(0.0200\exp(-0.6930)\) to \(0.0200\exp(0.6930)\), approximately 0.0100 to 0.0400.
For Birch, \(\widehat{\lambda}_B=80/4{,}000=0.0200\) claims per vehicle-year. Its log-scale standard error is \(1/\sqrt{80}=0.1118\), and its margin is \(1.96(0.1118)=0.2191\). Its interval is \(0.0200\exp(-0.2191)\) to \(0.0200\exp(0.2191)\), approximately 0.0161 to 0.0249.
Both observed frequencies are 0.0200, but Alder's interval is much wider because it has only 8 claims. Check: both intervals contain the common point estimate 0.0200, and Birch's interval is narrower. The mistake to avoid is treating equal observed rates—or equal exposure alone—as evidence that the estimates have equal precision.
Pooling Levels Without Losing the Meaning of the Factor
Pooling replaces several level-specific effects with one effect for a combined group. A defensible grouping may reflect a known classification structure, similar observed experience, or a documented business reason. The earlier material on grouping rare categorical levels addresses the mechanics of rare-level grouping; here the emphasis is on evaluating whether a factor with many levels has sufficient support overall and whether its distinctions remain credible.
When combining frequency experience, add claims and exposure, then calculate the pooled frequency. Do not take an unweighted average of the individual frequencies unless the exposures happen to be equal. The pooled estimate is exposure-weighted because it is the total number of claims divided by the total exposure.
Worked Example: Pooling Two Low-Volume Classes
A hypothetical commercial auto program has two adjacent equipment classes that are candidates for pooling. Class Cedar has 2 claims from 50 earned vehicle-years, and class Flint has 6 claims from 300 earned vehicle-years. A separate, larger class has 40 claims from 1,750 earned vehicle-years. Calculate the pooled frequency for Cedar and Flint, compare it with the larger class, and identify the averaging error to avoid.
Method. Pool counts and exposure before calculating the rate. Cedar's rate is \(2/50=0.0400\); Flint's is \(6/300=0.0200\). The pooled count is \(2+6=8\), and the pooled exposure is \(50+300=350\). Therefore the pooled rate is \(8/350=0.022857\) claims per vehicle-year.
The larger class has rate \(40/1{,}750=0.022857\) claims per vehicle-year, the same rate to the shown precision. The unweighted average of the Cedar and Flint rates would be \((0.0400+0.0200)/2=0.0300\), which is not the pooled estimate because the two classes have different exposures.
Check: the total pooled rate also equals the exposure-weighted calculation \(\{50(0.0400)+300(0.0200)\}/350=8/350\). Similar observed rates can support considering a shared effect, but they do not, by themselves, prove the classes have identical underlying risk.
Why the Poisson Precision Formula Holds
The approximate log-frequency standard error follows from the Poisson model, rather than from a rule of thumb about how many policies a level contains. For one level with exposure \(e\) and count \(N\), the log-likelihood, omitting terms that do not involve \(\lambda\), is \(N\log(\lambda)-e\lambda\). Its maximum occurs at \(\widehat{\lambda}=N/e\). The negative second derivative of the log-likelihood at that estimate is \(N/\widehat{\lambda}^{\,2}\), so the usual likelihood-based variance approximation for \(\widehat{\lambda}\) is \(\widehat{\lambda}^{\,2}/N\). Applying the delta method to \(\log(\widehat{\lambda})\) gives variance approximately \(1/N\), and hence standard error \(1/\sqrt{N}\).
This is a local, large-sample approximation. It is not reliable as a substitute for judgment when a level has very few claims, and it does not yield a finite log-rate estimate when \(N=0\). In a GLM with other predictors, the uncertainty of a level effect also depends on the model design and the distribution of experience across combinations of predictors.
Separate Effects, Complexity, and Validation
For a factor with \(K\) levels, an ordinary categorical effect generally requires \(K-1\) independent contrasts relative to a reference or under an equivalent constraint. A high-cardinality factor can therefore consume many parameters. If each level has strong, broad experience, this may be appropriate. If many levels are weakly supported, the fitted effects can be unstable, and apparent in-sample improvement may not persist in new data.
A useful comparison is between a model that pools a proposed set of levels and one that estimates separate effects. Under the Poisson assumptions, the likelihood-ratio deviance compares their fit. For a pre-specified split into two levels with counts \(N_1,N_2\) and exposures \(e_1,e_2\), the deviance against a pooled-rate model is \(2\sum_{j=1}^2 N_j\log(N_j/\widehat{N}_j)\), where \(\widehat{N}_j=e_j(N_1+N_2)/(e_1+e_2)\). A good in-sample fit improvement is evidence to investigate, not automatic proof that the distinction is stable or worth retaining.
Worked Example: Testing a Pre-Specified Split
A hypothetical rating review asks whether two pre-specified workshop categories should have separate claim-frequency effects. Category Lumen has 40 claims from 1,000 earned units; category Mica has 10 claims from 1,000 earned units. Assume independent Poisson counts with constant frequency within category. Calculate the deviance comparing separate rates with a pooled rate. State what the result does and does not establish.
Method. The separate model estimates rates \(40/1{,}000=0.040\) and \(10/1{,}000=0.010\) claims per unit. The pooled model has 50 claims from 2,000 units, so its rate is \(50/2{,}000=0.025\). It predicts 25 claims in each category.
The deviance is \(2\{40\log(40/25)+10\log(10/25)\}\). The log terms are \(\log(1.6)=0.4700\) and \(\log(0.4)=-0.9163\). Therefore the deviance is \(2\{40(0.4700)+10(-0.9163)\}=2(18.800-9.163)=19.274\), or approximately 19.27.
Check: the separate model fits the two observed counts exactly, while the pooled model predicts 25 for each, so the deviance is positive. Under the usual large-sample likelihood-ratio approximation, a pre-specified one-parameter split can be compared with a chi-square distribution with 1 degree of freedom. The result indicates substantial in-sample evidence against pooling under the stated assumptions. It does not establish that the split will improve out-of-sample performance, nor does this single comparison account for searching across many possible splits.
Choosing and Defending a Level Structure
A sound assessment combines numerical support with context. Before retaining or combining levels, examine the volume relevant to the response, the stability of estimates over time or across data partitions, and whether the proposed distinctions have a defensible interpretation. Useful checks include:
- Exposure and response volume: inspect both the amount of exposure and the number of claims or payments supporting each level.
- Parameter burden: compare the number of estimated contrasts with the information available, including whether experience is concentrated in only a few levels.
- Stability: assess whether estimated effects change substantially across reasonable time periods or validation samples.
- Multiple comparisons: treat striking differences found after examining many levels cautiously; some may appear by chance.
- Defensibility: document why retained levels or pooled groups make sense for the classification and intended use.
Regularization or hierarchical modeling can shrink noisy level estimates toward a common pattern rather than forcing a complete choice between separate estimates and full pooling. These approaches require an explicit penalty or distributional assumption and suitable validation; they do not create information where the data are sparse. Likewise, an impressive training-fit statistic is not sufficient justification for a complicated factor. A practical evaluation should consider predictive performance on data not used to choose the grouping or tune the model.
The common exam trap is to equate a large number of policies with reliable evidence for every level. For frequency, the claim count also matters; for severity, the number and variability of claim payments matter. Another trap is to merge levels solely because their raw rates look similar, without considering uncertainty, exposure weights, or a defensible classification rationale. Use the response model to quantify support, and use validation and context to decide whether the resulting distinctions should remain.
Check Your Understanding
Work each problem using the stated assumptions; answers are provided for checking.
- A hypothetical territory has 12 claims over 600 earned units. Under an independent Poisson frequency model, what is its estimated frequency, and what is the approximate standard error of its log frequency? (Answer: 0.0200 claims per unit; \(1/\sqrt{12}=0.2887\).)
- Two candidate levels have 3 claims from 100 exposure units and 9 claims from 600 exposure units. Find the pooled rate and the unweighted mean of the separate rates. (Answer: pooled rate \(12/700=0.01714\); unweighted mean \((0.0300+0.0150)/2=0.02250\) claims per unit.)
- A factor has 24 levels, and one level has 4 claims. Under the Poisson approximation, what is the standard error of that level's log-frequency estimate? Why is exposure alone insufficient to interpret this value? (Answer: \(1/\sqrt{4}=0.5000\); the approximation reflects claim count, while exposure is also needed to calculate the estimated frequency.)
- Two pre-specified categories have 30 and 10 claims, each with 800 exposure units. The pooled model predicts 20 claims in each. Calculate the separate-versus-pooled Poisson deviance. (Answer: \(2\{30\log(30/20)+10\log(10/20)\}=2\{12.164-6.931\}=10.47\), approximately.)
- A modeler checks 40 possible level splits, finds one with a large in-sample deviance improvement, and proposes retaining it without validation. Name two reasons this conclusion is incomplete. (Answer: searching many splits creates a multiple-comparison risk, and in-sample improvement does not establish stable out-of-sample predictive value.)