Why Use Customer Fixed Effects?
Repeated demand observations can contain substantial differences between customers that are not fully recorded in the data. For example, two hypothetical insurance customers may face similar quoted prices but have different baseline propensities to purchase because of stable preferences, household circumstances, or long-run risk attitudes. If those characteristics are associated with the prices customers receive, a comparison across customers can mix price response with baseline differences.
Customer fixed effects address this issue by giving each customer a separate intercept. The price response is then estimated from how demand changes as the same customer faces different prices, rather than from differences between customers alone. This controls for stable unobserved customer characteristics, but it does not automatically control for factors that change over time or establish that observed price changes are otherwise unconfounded.
The Within Transformation
For a customer observed \(T_i\) times, define that customer’s averages as \(\bar{Y}_i=T_i^{-1}\sum_tY_{it}\) and \(\bar{P}_i=T_i^{-1}\sum_tP_{it}\). Subtract the customer average of the model from each observation:
The customer intercept disappears because \(\alpha_i-\alpha_i=0\). The transformation therefore removes any characteristic that affects the outcome only through a constant customer-specific intercept. In a balanced or unbalanced panel, ordinary least squares on these demeaned observations estimates the common within-customer slope as
This formula applies to a linear conditional-mean model with a common slope, and requires a nonzero denominator. A standard assumption for interpreting the coefficient as a response to price is strict exogeneity: conditional on the customer effect and included variables, the errors have mean zero given the customer’s full observed price history. If price changes are related to changing unobserved demand influences, fixed effects alone do not ensure this condition.
Why Demeaning Gives the Fixed-Effects Estimate
The within formula follows directly from least squares. For any proposed slope \(b\), choose each customer’s intercept to minimize that customer’s squared residuals. The minimizing intercept is \(\hat{\alpha}_i(b)=\bar{Y}_i-b\bar{P}_i\), since the residuals for that customer must sum to zero. Substituting this intercept into each fitted value gives the residual
Thus, minimizing the original sum of squared residuals over all customer intercepts and the common slope is equivalent to minimizing the sum of squares of the demeaned residuals over \(b\). Differentiating that sum with respect to \(b\), setting the derivative to zero, and solving gives the displayed ratio for \(\hat{\beta}_{FE}\). This also explains the key identification condition: if every customer’s price is constant over time, every demeaned price is zero, the denominator is zero, and the price slope cannot be estimated.
Worked Example: Estimating a Within-Customer Price Slope
A hypothetical insurer observes a continuous demand measure for two customers at three quote occasions each. The outcome is the number of coverage units purchased. Estimate the common fixed-effects change in coverage units per dollar of quoted price.
| Customer | Price ($) | Coverage units |
|---|---|---|
| A | 80 | 14 |
| A | 100 | 10 |
| A | 120 | 8 |
| B | 60 | 18 |
| B | 90 | 14 |
| B | 120 | 10 |
Method. Apply the within estimator. Customer A has mean price \((80+100+120)/3=100\) and mean outcome \((14+10+8)/3=32/3\). Its price deviations are \((-20,0,20)\), and its outcome deviations are \((10/3,-2/3,-8/3)\). Its cross-product sum is
and its squared-price-deviation sum is \(400+0+400=800\).
Customer B has mean price \(90\) and mean outcome \(14\). Its deviations are \((-30,0,30)\) for price and \((4,0,-4)\) for outcome. Its cross-product sum is \((-30)(4)+(0)(0)+(30)(-4)=-240\); its squared-price-deviation sum is \(900+0+900=1{,}800\).
Combine the customers’ sums. The numerator is \(-120-240=-360\), and the denominator is \(800+1{,}800=2{,}600\). Therefore \(\hat{\beta}_{FE}=-360/2{,}600=-0.1384615\), or -0.1385 coverage units per dollar rounded to four decimal places. The fitted within-customer association is a decrease of about 0.1385 coverage units for each $1 price increase.
Check. The customer-specific means have been removed, so the calculation uses only within-customer deviations. The negative numerator and positive denominator give a negative slope, consistent with both customers’ outcomes tending to fall as their prices rise. A common mistake is to treat all six observations as one group and center at the portfolio-wide means; that does not remove the customer intercepts and is not the fixed-effects calculation.
Interpreting Fixed Effects in Demand Models
The outcome scale determines the coefficient’s interpretation. In the level model above, \(\beta\) is the change in the outcome for a one-unit price change. If price is measured in dollars, the coefficient is per dollar; rescaling price to hundreds of dollars rescales the coefficient by a factor of 100. Record the units before interpreting the result.
A log-log specification can instead express a constant elasticity. For positive demand \(Y_{it}\) and positive price \(P_{it}\), a model of the form \(\log(Y_{it})=\alpha_i+\beta\log(P_{it})+\varepsilon_{it}\) has price elasticity \(\beta\): a small 1% price change is associated with approximately a \(\beta\)% change in demand. This interpretation depends on the log-log form and is not the interpretation of a level model.
Worked Example: A Fixed-Effects Log-Log Elasticity
Two hypothetical customers each receive two quotes. Customer U’s prices are $50 and $100, with demands of 20 and 10 coverage units. Customer V’s prices are $40 and $80, with demands of 30 and 15 units. Fit the common within-customer slope in the log-log model and interpret it.
Method. Demean \(\log(P)\) and \(\log(Y)\) within each customer. For U, the change between observations in log price is \(\log(100)-\log(50)=\log(2)\). The change in log demand is \(\log(10)-\log(20)=-\log(2)\). The two observations’ demeaned values are each half the corresponding difference, with opposite signs. Consequently U contributes \(-(\log 2)^2\) to the numerator and \((\log 2)^2\) to the denominator.
For V, the price doubles from $40 to $80 and demand halves from 30 to 15. Its log differences are again \(\log(2)\) and \(-\log(2)\), so it contributes another \(-(\log 2)^2\) to the numerator and \((\log 2)^2\) to the denominator. The combined numerator is \(-2(\log 2)^2\), and the denominator is \(2(\log 2)^2\). Using \(\log(2)\approx0.6931\), these are approximately \(-0.9609\) and \(0.9609\), respectively. Thus \(\hat{\beta}_{FE}=-1.000\).
The fitted within-customer elasticity is -1: a 1% price increase corresponds to approximately a 1% decrease in demand under this specification. In this particular data set, doubling price coincides with halving demand for both customers, which is also consistent with the fitted elasticity. Do not interpret this coefficient as units lost per dollar; that is the level-model interpretation, not the log-log interpretation. The computed numerator divided by the denominator is exactly -1, verifying the result.
What Fixed Effects Can—and Cannot—Estimate
A customer fixed effect controls for observed or unobserved characteristics that are constant for that customer across the study period, provided those characteristics enter as an additive intercept in the model. For example, stable baseline preferences may be absorbed even if they are correlated with a customer’s average price. Fixed effects do not estimate a separate coefficient for a characteristic that never changes within a customer: its value is indistinguishable from that customer’s intercept.
Variables that do change over time can be included as additional predictors, provided the model and the required assumptions are appropriate. But customer fixed effects do not remove influences that vary over time within a customer. If a customer receives a higher quote at the same time as an unobserved change in purchase interest, the within-price association can still reflect both changes. The fixed-effects transformation is not by itself a solution to that problem.
For binary purchase outcomes, a linear probability model can include customer fixed effects, although fitted probabilities can fall outside the interval from zero to one. A fixed-effects logistic model is another option: conditional likelihood conditions on each customer’s total number of purchases to eliminate that customer’s intercept. Customers with all outcomes zero or all outcomes one provide no within-customer outcome contrast for estimating the conditional price effect. Neither approach makes the identifying variation appear where there is none.
Worked Example: Diagnosing Limited Within-Customer Price Variation
A hypothetical analyst has three observations for each of two customers. Customer A faces prices of $90, $90, and $90, with outcomes 12, 11, and 13. Customer B faces prices of $99.90, $100.00, and $100.10, with outcomes 10.2, 10.0, and 9.8. Calculate the fixed-effects slope, then assess how much of the price information supports it.
Method. Customer A’s demeaned prices are all zero, so A contributes zero to both the within-price denominator and the price-outcome numerator. A’s outcomes may vary, but that variation cannot identify a price slope without price variation.
Customer B’s mean price is $100.00 and mean outcome is 10.0. Its price deviations are \((-0.10,0,0.10)\), and its outcome deviations are \((0.2,0,-0.2)\). Its cross-product sum is \((-0.10)(0.2)+(0)(0)+(0.10)(-0.2)=-0.04\). Its squared-price-deviation sum is \(0.01+0+0.01=0.02\). Hence the overall fixed-effects slope is \(-0.04/0.02=-2.00\) outcome units per dollar. Only customer B supplies any within-price information.
Assess the limitation. B’s observed price range is only $0.20. If only the middle outcome changed from 10.0 to 10.1, the mean outcome would become \(10.0333\), and the demeaned outcomes would be approximately \((0.1667,0.0667,-0.2333)\). The cross-product sum would then be \((-0.10)(0.1667)+(0.10)(-0.2333)\approx-0.04\), giving a slope of approximately -2.00 still; this particular change is not a useful sensitivity illustration because the centered middle observation has zero price deviation. Instead, change the first outcome from 10.2 to 10.3 while keeping the other two unchanged. The mean becomes 10.0333, the demeaned outcomes are approximately \((0.2667,-0.0333,-0.2333)\), and the cross-product sum is \((-0.10)(0.2667)+(0.10)(-0.2333)\approx-0.05\). The denominator remains 0.02, so the slope becomes approximately -2.50. A change of only 0.1 outcome unit has materially changed the estimate.
The calculation is internally checked by the fixed-effects formula: customer A contributes nothing, while customer B supplies numerator \(-0.04\) and denominator \(0.02\) in the original data. The trap is to read the large absolute number 2.00 as evidence of a precisely estimated, strong response. The denominator is very small because the identifying price changes are tiny; the slope can therefore be sensitive to small outcome changes. If all customers had constant prices, the denominator would be zero and the slope would be unidentified, not zero.
Practical Checks Before Interpreting a Result
Identify what one customer-period represents, the demand outcome, and the price unit. Repeated quote records for one customer are not independent customer-level observations.
Inspect price changes within customers. Customers with no price variation do not identify the common price slope in the within estimator.
A level model gives an outcome change per price unit; a log-log model gives a constant elasticity under its assumptions.
Fixed effects remove stable customer intercepts, not time-varying influences. The estimated within association is not automatically a causal price effect.
Repeated observations can make a price-response analysis more informative by separating stable customer differences from within-customer changes. The method is especially useful when those stable differences may be related to average price. Its value still depends on adequate within-customer price variation, an appropriate functional form, and assumptions connecting price changes to the remaining demand error. These distinctions are aligned with the CAS Exam 8 (Advanced Ratemaking) syllabus.
Check Your Understanding
For each problem, identify the relevant fixed-effects calculation or limitation before interpreting the result.
- A customer has prices of $40 and $60 and demand outcomes of 9 and 7. Calculate that customer’s contribution to the within numerator and denominator. (Answer: Numerator \(-20\); denominator \(200\).)
- In a log-log fixed-effects model, one customer’s price rises from $25 to $50 while demand falls from 8 to 4. What within-customer elasticity is implied by these two observations? (Answer: \(-1.000\).)
- Three customers each have three observations, but one customer’s price is constant in all periods. Does that customer contribute to the within-price denominator? (Answer: No; the customer’s demeaned prices are all zero.)
- A fitted level-model slope is \(-0.04\) policies per dollar. What change in predicted demand does the model associate with a $25 price increase, holding the customer effect fixed? (Answer: \(-1.00\) policy.)
- Every customer in a panel faces the same price in all observed periods, although prices differ across customers. Can customer fixed effects estimate a common price slope? Explain using the within denominator. (Answer: No; all demeaned prices are zero, so the within denominator is zero and the slope is unidentified.)