{'fraction_non_alphanumeric': 0.03962021971384348, 'fraction_numerical': 0.011004567933859339, 'mean_word_length': 4.599725187612303, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Dynamic demand for differentiated products with fixed-effects unobserved heterogeneity

This paper studies identification and estimation of a dynamic discrete choice model of demand for differentiated product using consumer-level panel data with few purchase events per consumer (i.e., short panel). Consumers are forward-looking and their preferences incorporate two sources of dynamics: last choice dependence due to habits and switching costs, and duration dependence due to inventory, depreciation, or learning. A key distinguishing feature of the model is that consumer unobserved heterogeneity has a Fixed Effects (FE) structure -- that is, its probability distribution conditional on the initial values of endogenous state variables is unrestricted. I apply and extend recent results to establish the identification of all the structural parameters as long as the dataset includes four or more purchase events per household. The parameters can be estimated using a sufficient statistic - conditional maximum likelihood (CML) method. An attractive feature of CML in this model is that the sufficient statistic controls for the forward-looking value of the consumer's decision problem such that the method does not require solving dynamic programming problems or calculating expected present values.


Introduction
In many markets, consumer demand is dynamic in the sense that consumers' utility depends on past decisions. Sources of dynamics in demand include, among others, storable products, 1 durable products, 2 habit formation and switching costs, 3 adoption costs, 4 and learning. 5 These models exhibit two main forms of state dependence in consumers' purchasing decisions: lastchoice dependence and duration dependence. We have last-choice dependence if a consumer's previous purchase of a product has a causal effect on her current probability of buying that product, for instance, as a result of habits, switching costs, or learning. We have duration dependence if the time elapsed since the last purchase has a causal effect on the current buying decision. Depletion of storable products and depreciation of durable products generate duration dependence in consumer demand. These forms of state dependence can induce substantial differences between short-run and long-run responses of demand to price changes. This has important economic implications in applications such as evaluating the effects of taxes and subsidies, measurement of firms' market power, or consumer welfare. The estimation of dynamic structural demand models using consumer panel data tries to measure these causal effects and use them for counterfactual analysis and welfare evaluation. 6 Unobserved heterogeneity plays a fundamental role in dynamic demand models using consumer panel data. Ignoring or incorrectly specifying the correlation between unobserved heterogeneity and pre-determined explanatory variables (e.g., previous purchasing decisions) can generate important biases in the estimation of the structural parameters that capture dynamic causal effects (Heckman, 1981b). Furthermore, the distribution of consumer taste heterogeneity has an important impact on demand price elasticities (Berry, Levinsohn, and Pakes, 1995).
The empirical literature on dynamic demand of differentiated product has considered a Ran-dom Effects (RE) approach to model consumer unobserved heterogeneity. RE models impose parametric restrictions on the distribution of unobserved heterogeneity and on the correlation between these unobservables and the initial values of the predetermined explanatory variables. 7 Though this distribution is not identifiable in short panels, its misspecification can generate important biases in the estimation of dynamic causal effects. This is the so called initial conditions problem (Heckman, 1981a). Therefore, RE models are not robust to misspecification of parametric restrictions on unobserved heterogeneity. 8 Fixed effects (FE) approaches impose no restriction on the distribution of consumers' unobserved heterogeneity such that the identification of parameters of interest is more robust than in RE models. However, several identification concerns have inclined researchers to avoid a FE approach in applications of dynamic discrete choice structural models, and more specifically, in dynamic demand models. 9 A first issue is related to the identification of structural parameters. All the existing (positive) identification results in FE dynamic discrete choice models impose the restriction that unobserved heterogeneity enters additively in the utility of each choice alternative. However, in dynamic programming models, unobserved heterogeneity enters not only in current utility but also in the continuation value of the forward-looking decision problem, and these continuation values depend non-additively (and in fact, without a closed-form expression) on both unobserved heterogeneity and observable state variables. The common wisdom was that FE models cannot 7 In the literature of dynamic discrete choice structural models, the most common approach to deal with timeinvariant unobserved heterogeneity is assuming that it has a finite mixture distribution with a small number of points of support -often as small as two or three unobserved types. The probability of the initial values of the state variables is unrestricted conditional on an unobserved individual type. Some studies allow the distribution of unobserved types and the probability of initial conditions varies with observable time-invariant individual characteristics. A few studies assume that the probability of the initial conditions comes from the ergodic distribution of the state variables. For more details, see the survey papers by Aguirregabiria and Mira (2010), Arcidiacono and Ellickson (2011), or Keane (2015). 8 In the context of dynamic discrete choice demand models, a recent paper by Simonov, Dubé, Hitsch, and Rossi (2020) shows that the bias induced by the misspecification of the probability of the initial conditions can be sizable. The authors show that Random Effects specifications commonly used in empirical applications, if misspecified, can lead to biases larger than two times the true value of the structural parameter. This magnitude of the bias appears even in relatively long panel data sets spanning more than three or four years of shopping history.
9 An interesting exception is Jones and Landwehr (1988). The authors estimate a Fixed Effects dynamic binary logit model for consumers' decision of buying the same brand as in last purchase or switching to a different brand. They estimate this model using a conditional maximum likelihood method. In their model, consumers are not forward-looking, there is no duration dependence, there are no product characteristics (e.g., prices), and it is a binary choice model. deal with the non-additive unobserved heterogeneity that is inherent to discrete choice dynamic programming models. A second important issue is related to the fact that FE methods cannot deliver identification of the distribution of unobserved heterogeneity with short-panels. Most empirical applications of dynamic structural models are interested in using the estimated model to obtain Average Marginal Effects (AME) on endogenous variables of changes in explanatory variables or in structural parameters. Demand price elasticities are examples of these AME s.
Until very recently, the common wisdom was that AME s are not identified in FE models, as they are expectations over the distribution of the unobserved heterogeneity (e.g., Abrevaya and Hsu, 2021;Honoré and De Paula, 2021).
Two recent studies provide positive identification results for the two issues discussed above. Aguirregabiria, Gu, and Luo (2021) establish the identification of structural parameters in a class of FE dynamic panel data logit models where agents are forward-looking. The class of models includes two types of endogenous state variables: the lagged choice variable, and the time duration in the last choice. Aguirregabiria and Carro (2021) prove point identification of different AMEs in FE dynamic logit models. For instance, the average causal effect of changes in the lagged dependent variable or in the duration in last choice are identified. 10 In this paper, I apply and extend identification results in Aguirregabiria, Gu, and Luo (2021) to a FE dynamic panel data model of consumer demand with differentiated products. The model can incorporate storable or durable products, habit formation, and brand switching costs.
I present a new identification result in FE dynamic discrete choice with forward-looking agents.
I show identification of utility parameters associated to state variables that follow exogenous stochastic processes. More specifically, in the context of demand models, I establish the identification of parameters that capture the effect of prices. In a FE forward-looking model, this identification result relies on a particular structure in the stochastic process of prices. There are two components in prices: a persistent component and a transitory component (i.e., temporary promotion).
The structural parameters of the model are estimated using a sufficient statistics -conditional maximum likelihood (CML) method for dynamic discrete choice panel data models. Seminal work on this method is due to Cox (1958), Rasch (1960Rasch ( , 1961, and Andersen (1970), and in econometrics by Chamberlain (1985). More specifically, I apply the kernel-weighted method in Honoré and Kyriazidou (2000). In the context of dynamic structural models, a very helpful implication of this CML method is that it is not subject to a curse of dimensionality associated with the computational cost of solving a dynamic programming problem, or calculating present values of future utilities. This is particularly relevant in applications of dynamic demand of differentiated product because the dimension of the state space increases exponentially with the number of products, which is typically large. The sufficient statistics -CML method "differences out" the continuation (forward-looking) value of the consumer's decision problem, as this value depends on the incidental parameters / unobserved heterogeneity. This implies that continuation values need not be computed to implement the CML estimator. Therefore, the CML estimation of this dynamic structural model is computationally as simple as in static or myopic models, and its cost does not depend on the dimension of the state space. 11 Related to the curse of dimensionality in the estimation of dynamic structural models, it is worth to note that the CML method in this paper is quite different to the Finite Dependence -Conditional Choice Probabilities (FD-CCP) approach in Arcidiacono and Miller (2011). The FD-CCP approach is a Random Effects method that requires parametric assumptions on the distribution of the unobserved heterogeneity, typically, a finite mixture structure. The FD-CCP method also requires consistent nonparametric estimates of conditional choice probabilities for each unobserved individual type. Consistent nonparametric estimates of type-specific CCPs are available -under some conditions -in Random Effects finite mixture models (see Kasahara and Shimotsu, 2009), but not in Fixed Effects models.
In an influential paper, Hendel and Nevo (2006) propose an approach to deal with the curse of dimensionality in the estimation of structural dynamic discrete choice models of consumer demand. Under the restrictions of (i) no brand switching costs, (ii) no product differentiation in 11 CML estimation implies a different type of curse of dimensionality. The evaluation of the conditional likelihood function involves adding up a function over all the possible values of the vector of sufficient statistics. The number of possible values increases exponentially with the number of time periods in the data, T . However, this dimensionality problem has an easy solution -at the cost of some efficiency lost in the CML estimator -which consists of splitting a T -periods history into shorter sub-histories. depreciation / depletion rates, and (iii) no product differentiation in consumption (only at the moment of purchase), a consumer brand choice decision is a static decision, and the only dynamic decision is the replenishment or (repurchasing time) decision. This structure -together with the behavioral assumption that consumers believe that McFadden's surplus (i.e., inclusive value) follows a Markov process -facilitates substantially the estimation of the dynamic structural model. In contrast, in this paper, I consider a model that includes brand switching costs, product differentiation in depletion rates, and product differentiation in consumption, so that consumer brand choice is dynamic. Furthermore, the sufficient statistic result in my paper relies on the structure of the utility function, but it does not exploit any additional behavioral restriction on consumers' beliefs.
In a recent paper, Kong, Dubé, and Daljord (2022) apply the Dynamic Potential Outcomes (DPO) model in Torgovitsky (2019) to study the identification of the causal effect of consumers' past purchasing decisions on current choices, and more specifically the separation between brand switching costs and unobserved heterogeneity. The DPO model can be interpreted as the reduced form of a dynamic structural model that allows for a very general form of consumer unobserved heterogeneity including, for instance, unobserved heterogeneity in consumer switching costs. Using the DPO model and consumer panel data -and in the absence of a controlled randomized experiment -the causal effect of state dependence is not point identified. The authors characterized the identified set for the state dependence generated by brand switching costs. They also show that consumer forward-looking behavior in the presence of brand switching costs implies exclusion restrictions that satisfy the conditions in Abbring and Daljord (2020) to identify the discount factor and the utility function jointly.
Motivated by the difficulty of estimating Random Effects models with rich forms of unobserved heterogeneity, Chesher and Santos Silva (2002) propose an extension of the standard multinomial logit model and a simple two-step estimation method that shares some similarities with the sufficient-statistics conditional likelihood approach in this paper. Though the authors present their model/method in a static / cross-sectional context, it seems that it can be applied to a dynamic logit model and combined with the method in this paper to allow for unobserved heterogeneity in the structural parameters capturing state dependence.
The rest of the paper is organized as follows. Section 2 describes the model. Section 3 presents identification results. Section 4 describes the estimation method. In section 5, I summarize and discuss some extensions for further research.

Model
I present a framework that includes both storable and durable differentiated products. Most of the features of the model are standard in the literature. The main distinguishing feature is the Fixed Effects (FE) nature of consumer unobserved heterogeneity.

Basics
There are J different brands of a differentiated product, and we index brands by j ∈ {1, 2, ..., J}.
We index consumers by i. Time is discrete and indexed by t. There is a dichotomy in the definition of time in empirical applications of dynamic consumer demand. In most applications, t has the standard interpretation as calendar time: for instance, the unit of time can be a week.
In these applications, the model and data account for time periods where a consumer does not purchase any variety of the differentiated product. In contrast, a good number of empirical applications in this literature consider t as the index for purchase events, such that t = 1 means a consumer's first purchase, t = 2 is her second purchase, and so on (see Keane, 1997;Osborne, 2011;among others). The different definition of time t has implications on the interpretation of dynamics in the model, such as duration dependence. 12 Here, I follow the standard definition of t as calendar time. However, all the identification results in this paper apply also to models where t indexes purchase events.
Every period t, consumer i decides whether to purchase or not one unit of the product, and which brand to buy. Variable y it ∈ Y = {0, 1, ..., J} represents the decision of consumer i at period t, where y it = 0 means "no purchase", and y it = j > 0 means purchase of brand j. There are two endogenous state variables that capture dynamics in consumer demand: brand choice in the last purchase, it ∈ {1, 2, ..., J}; and time duration since the last purchase, d it ∈ {1, 2, ..., ∞}. 13 Last brand choice is related to habit formation and switching costs. Duration since last purchase captures the effect of inventory depletion (for storable products) or depreciation (for durable products). By definition, the transition rule of the vector of endogenous state variables x it ≡ ( it , d it ) is: In many applications, consumers are located in different geographic markets and face different prices. This is not a necessary condition for the identification results in this paper, but I allow for it. Let p it (j) be the price of product j at period t in the market where consumer i is located, and let p it be the vector with the prices of all products, p it ≡ (p it (j) : j = 1, 2, ..., J).

Utility
Let U it be the per-period utility that consumer i obtains at period t. It has four components: The term b i (y it , it , d it ) is the utility from consumption of the branded product; m i (y it , p it ) represents utility from consumption of the outside good or numeraire; sc i (y it , it ) captures brand switching costs or habits; and ε it (y it ) is a consumer idiosyncratic taste shock at the moment of purchase. I describe below each of these components.
(i) Utility from consumption of the branded product. The flow utility from consumption of the branded product has the following form: 13 At this point, I consider that the space of the duration variable is unbounded from above. In Section 3 below, I introduce Assumption 3 that implies that there is a finite value, d * , for the duration variable such that a consumer's utility function does not change for values of duration greater than d * . Under this Assumption 3, we can restrict the space of the duration variable to be {1, 2, ..., d * }. Importantly, the value d * is identified from the data as long as d * ≤ (T − 1)/2, where T is the number of time periods in the data.
The model allows for product differentiation at the moment of consumption and not only at the moment of purchase. Parameter α i (j) is the flow utility that consumer i receives from consuming product j when the product has not depreciated (or depleted) over time. The vector (2), ..., α i (J)) represents the fixed effects for consumer i. The fixed effect α i (j) depends on product and consumer characteristics in an unrestricted way. For instance, it could have the structure α i (j) = x j β i + ξ j ω i , where x j and ξ j are vectors of observable and unobservable product characteristics, respectively, and β i and ω i are the vectors of marginal utilities of these characteristics for consumer i. Therefore, the specification of consumer heterogeneity in preferences is very flexible.
The flow utility from consumption of the branded product takes into account depletion or depreciation over time. 14 If the consumer purchases a new product (if y it = j > 0), there is no depreciation effect and the flow utility is α i (j). Otherwise, if the consumer does not purchase a new product (if y it = 0), she consumes product it -her last purchase -and flow utility where w i is a vector of consumer characteristics observable to the researcher, e.g., income, education, geographic location. Parameter (or function) β dep (w i , j) represents the depreciation (depletion) rate in product j. This depreciation/depletion effect can vary across products.
(ii) Utility from consumption of the composite good. The consumer's budget constraint implies that consumption of the composite good is equal to µ i − J j=1 p it (j) 1{y it = j}, where where µ i is the consumer's (weekly) disposable income, and J j=1 p it (j) 1{y it = j} represents expenditure in the branded product. The utility from consumption of the composite good is: where h(c) is a strictly increasing function that is known to the researcher, e.g. linear (h(c) = c), logarithmic (h(c) = ln(c)); and γ (w i ) is a structural parameter (function) related to the marginal 14 The datasets used in this literature contain information on consumer purchase histories, but not on consumption and inventories of storable products. To deal with this missing information for storable products, researchers have imposed different restrictions. Aguirregabiria and Nevo (2013) discuss this issue and different restrictions in the literature. A common approach is using duration since last purchase, d it , as a proxy of inventory. For storable products, this is the approach in Erdem, Imai, and Keane (2003). utility of consuming the composite good and may depend on consumer observable characteristics w i . When function h(c) is nonlinear -e.g., logarithmic -the identification results in this paper require that the researcher observes consumer disposable income µ i . For the rest of the paper, I assume that this is the case.
(iii) Product switching costs / habits. Following the standard approach, brand switching costs take place at the moment of purchase, and not through the consumption of the product.
The specification of brand switching costs is: Parameter β sc (w i , k, j) represents the cost of switching from brand k to brand j. There is no switching cost without switching or without a new purchase, such that such that β sc (w i , k, k) = 0 This component of the utility can be also interpreted in terms of habit formation. In that is the increase in utility from purchasing the same brand as in last purchase, and for any k = j, β hab (w i , k, j) is restricted to be zero. This habit formation model is equivalent to the brand switching cost model under the restrictions β sc (w i , k, j) = β sc (w i , k , j) for any k, k = j. This more parsimonious specification is quite common in this literature. Keane (1997Keane ( , 2015 and Bronnenberg and Dubé (2017)  during the last n purchase events, where n is larger than one. More generally, following the seminal work by Guadagni and Little (1983), the model can include a habits (brand loyalty) stock variable for each product, where the stock depreciates with a certain rate and increases when the product is purchased. Establishing identification of this, more flexible, model of habit formation in this Fixed Effects framework is an interesting topic for further research.
(iv) Extreme value distributed shocks in preferences. Finally, variable ε it (j) captures other consumer idiosyncratic factors affecting the utility from purchasing product j at period t.
distribution. Both α i and ε it are unobservable to the econometrician.
Putting together the different components of the utility function, we have: For the rest of the paper, I use function u α i (y it , x it , p it ) to represent the part of the utility that does not include the unobservable logit shocks, such that (v) A remark on the identification / normalization of switching costs parameters.
In discrete choice models, we can only identify parameters affecting the difference between the utilities of two choice alternatives, for instance, the utility differences U it (j) − U it (0) for j = 1, 2, ..., J. For the model in this paper, this implies that we need some "normalization" restrictions of the switching cost parameters. These restrictions are needed even in the hypothetical (ideal) case where there is no time-invariant consumer unobserved heterogeneity, consumers are not forward-looking, and the researcher observes utility differences U it (j) − U it (0) for j = 1, 2, ..., J.
In this model, these utility differences have the following form: To illustrate this issue, consider the simpler case with: J = 2 products; α i (j) = α(j) for every consumer i; and γ = 0. Conditional on duration d it = d, we have only four possible utility differences: (0) for l it = 1, 2. The mean values of these utility differences are: The system of equations in (8) includes four restrictions and eight parameters: α(1), α(2), (1), and β dep (2). We need additional restrictions.
As mentioned above, if we interpret β sc (k, j) as a switching cost, it seems natural to assume that there is no switching cost without switching, so that β sc (1, 1) = β sc (2, 2) = 0.
These additional restrictions imply the identification of the depletion parameters: However, these restrictions are not sufficient to identify the switching cost parameters β sc (1, 2) and β sc (2, 1) separately from the difference in the intercepts α(2) − α(1). Nevertheless, it is straightforward to show that we can identify the following linear combination of switching cost parameters: This result extends to a model with any number of products J ≥ 2. Therefore, for the rest of the paper, I focus on the identification of parameters γ(w i ), β dep (w i , j), and the following linear combination of switching cost parameters:

Stochastic process for prices
The structure of the stochastic process of prices that I describe here is not necessary for the identification of the parameters β sc and β dep , but it plays an important role in the identification of the marginal utility of income parameter, γ, in this forward-looking model. ASSUMPTION 1. The price of any product j has two components, one that is persistent over time (z it (j)), and other that is transitory (e it (j)). 15 That is: where ρ(.) is a function that is strictly increasing in all its arguments, and it is known to the researcher. ( EXAMPLE. Hi-Lo pricing. For many supermarket products, the evolution of weekly prices is characterized by the alternation between a regular price and a promotion price. The (latent) regular and promotion prices remain constant for months, but the occurrence of a promotion is very uncertain and it lasts no more than one week. See, for instance, Hitsch, Hortacsu, and Lin (2019) for recent and extensive evidence using Nielsen data. Figure 1 presents an example of the actual time series of prices for a laundry detergent product. Liu and Balachander (2014) show that this evolution of prices is not consistent with the assumption of first order Markov process that is common in many empirical applications of dynamic demand models. They find that relaxing this restriction has important implications to explain consumer behavior.
I present here a stochastic process for prices under Hi-Lo pricing that satisfies the general conditions described in Assumption 1 above. The persistent component z it (j) has two elements: the regular price, z reg it (j), and the promotion price, z pro it (j). By definition, z reg it (j) > z pro it (j). These two (latent) variables have discrete support and follow a joint first order Markov process with substantial persistence. 16 At any period t, the price of product j can be either the regular price (i.e., p it (j) = z reg it (j)), or the promotion price (i.e., p it (j) = z pro it (j)). Let e it (j) be the dummy variable that indicates the existence of a promotion for product j in market i at period t. Therefore, in this example, the ρ function has the following form: Conditional on z it , the vector of promotion dummies e it has a multinomial distribution that is independently distributed over time.
Liu and Balachander (2014) consider a stochastic process for prices that satisfies equation (12) but is that there exists a value of "duration since last sales promotion", say D, such that there is no duration dependence either for duration it < D or for duration it > D. This restriction is testable.
This structure has an important implication on a consumer's dynamic decision model. The whole vector of prices p t (both z t and e t ) affects a consumer's current utility, but the expected and discounted value of future utilities (the continuation value) depends on z t but not on e t .
This exclusion restriction plays an important role in the identification of parameter γ in the Fixed Effects dynamic forward-looking model in this paper.
It is relevant to note that, given time series data on prices and a specification of the ρ(.) function, it is possible to identify the parameters in the two stochastic processes that characterize the evolution of prices, and based on these parameters, it is possible to identify (i.e., to estimate consistently) the two components z it and e it . In the Example of Hi-Lo pricing above, this 16 More precisely, the whole vector z it for all the J products follows a first order Markov chain. identification is straightforward. For the rest of the paper, I assume that these two vectors, z it and e it , are observable to the researcher.

Consumer decision problem
Every period t, the consumer observes the vectors of state variables x it , z it , e it , and ε it , and makes a purchasing decision y it to maximize her expected and discounted intertemporal utility This consumer's problem is a stationary Markov Decision Process (MDP), and Blackwell's Theorem establishes that the value function and the optimal decision rule are time-invariant (Blackwell, 1965).
17 Consumers know z it and e it . For instance, in the Example for Hi-Lo pricing above, consumers can distinguish between regular and promotion prices.
The decision problem of consumer i at period t is: where, as defined in equation (1), f x (j, x it ) represents the value of x i,t+1 given state x it and decision y it = j; and v α i (f x (j, x it ), z it ) is the continuation value function, i.e., the expected and discounted value of future utility given current state is (x it , z it ) and current choice j. 18 A property of the model that plays a key role in the identification of parameter γ is that Define the conditional choice probability (CCP) function as: This CCP function is conditional on the observable state variables (x it , z it , e it ) and on the unobservable fixed effects α i . The type I Extreme Value distribution of the unobservables ε implies that the CCP function has the following form. For any j ∈ Y: The logarithm of this CCP function is: where σ α i (x it , z it , e it ) is the logarithm of the denominator in the logit CCP function:

Identification
The researcher observes a panel dataset of N households over T periods with information on households' purchasing decisions and prices. The time length of the panel, T , is short in the sense that it contains only a few purchases per household. The identification results in this paper consider that T is fixed and -as it is common in proofs of identification -that N is infinite such that we have an infinite population of households. Also, remember that variables z it and e it have been retrieved using data on prices, such that they are observable to the researcher.
Assumption 2, together with Assumption 1, summarize the restrictions on the model for the identification of structural parameters β sc , β dep , and γ. Assumption 2(A) and 2(B) rule out product-time effects in consumer utility which are common to all consumers in the same local market and unobservable to the researcher. This restriction is very common in the literature of structural dynamic demand models, especially in applications using consumer level data. 19 It is important to note that, until very recently, there was not any point identification result for Fixed Effects dynamic logit models with time dummies (i.e., time fixed effects) using short panels. 20 This may seem a strong assumption in an econometric demand model, and at odds with the literature on estimation of static demand models using the BLP framework (Berry, Levinsohn, and Pakes, 1995). However, as I explain in the next two paragraphs, the FE approach in this paper controls for two important sources of endogeneity in prices.
First, note that the vector of fixed effects α i = (α i (1), α i (2), ..., α i (J)) includes product fixed effects: in fact, it accounts for any interaction of product effects and consumer effects. Therefore, these incidental parameters account for time-invariant differences in product quality that can be correlated with the cross-sectional variation in prices across products. That is, the model accounts -in a very general way -for endogeneity of price levels. This means that the potential concern with Assumption 2(B) is because of potential endogeneity of time-variation in prices.
Second, all the identification results in this paper control for variation over time in the persistent component of prices, z it and exploit only variation in the transitory component, e it .
Therefore, the method controls for endogeneity of regular prices.
Importantly, we consider a fixed effects (FE) model, in the sense that both the unconditional distribution F α (α i ) and the sequence of conditional distributions F α|x,t (α i | it , d it , z it , e it ) for t = 1, 2, ..., T are completely unrestricted functions.
19 For instance, Erdem, Imai, and Keane (2003), Hendel and Nevo (2006), Pavlidis and Ellickson, (2017), Griffith, Nesheim, and O'Connell, (2018), or Mysliwski, Sanches, Junior, and Srisuma, (2020), among many other papers in this literature, assume that prices are not correlated with transitory shocks. In contrast, some dynamic demand models using market level data, such as Gowrisankaran and Rysman (2012), allow for unobserved market-level demand shocks. 20 The absence of this identification result is mentioned in Honoré and Kyriazidou (2000), Hahn (2001), or Honoré and Tamer (2006), among many others. Existing fixed effects methods, such as Honoré and Kyriazidou (2000), are based on matching values of exogenous explanatory variables over several time periods. This matching is not possible when the set of explanatory variables includes time dummies, or even a linear time trend. A recent paper by Kitazawa (2022) shows identification of a Fixed Effects dynamic binary logit model with time dummies and T = 4. His identification approach uses moment conditions based on an ingenious transformation of the model. Nevertheless, it seems difficult to extend his result to a model where agents are forward-looking because time effects appear also in the agent's continuation value function together with the individual fixed effect.

Sufficient statistics -Conditional likelihood approach
Let θ be the vector of structural parameters: Note that vector θ has finite dimension: more precisely, it has 1 + J + J(J−1) 2 elements. To establish the identification of θ, I follow Aguirregabiria, Gu, and Luo (2021), who consider a sufficient statistic -conditional likelihood approach for dynamic nonlinear panel data models in the spirit of Cox (1958), Rasch (1960), Chamberlain, (1985, or Honoré and Kyriazidou, (2000). 21 I start describing some general features of this approach in the context of the dynamic demand model. For notational simplicity, I omit the vector of observable consumer characteristics, w i , for the rest of the paper.
Let y i ≡ ( i1 , d i1 , y i1 , y i2 , ..., y iT ) be the vector with consumer i's choice history, including the initial condition ( i1 , d i1 ), and let z i ≡ (z i1 , z i2 , ..., z iT ) and e i ≡ (e i1 , e i2 , ..., e iT ) be the vectors with the histories of the two components in prices. The probability of a choice history y i conditional on the history of prices and parameters θ and α i is: where p * 1 (.) is the probability of the state variables at period t = 1. Given definition of σ α i (x it , z it , e it ) -in equation (17) above -as the logarithm of the denominator in the logit CCP function, we have that the log-probability of choice history y i is: Taking into account the structure of the utility function and the transition rules of the state variables, we can develop further this expression to obtain: where 1{.} is the indicator function.
Based on equation (21), the log-probability of a choice history has the following structure: where g(α i ) is a vector of functions of the incidental parameters α i , and s i ≡ s(y i , z i , e i ) and c i ≡ c(y i , z i , e i ) are vectors of statistics, i.e., functions of (y i , z i , e i ). Equation (21) provides the elements in each of these vectors. That is: where D T is the maximum duration observed in the data, and Z T × E T are the sets of values of z it and e it , respectively, observed in the data. The following equation presents each element in the vector of statistics s i , with its corresponding element in vector g(α i ).
Similarly, the following equation presents each element in the vector of statistics c i , with its corresponding element in the vector of structural parameters θ.
The structure in equation (22) which shows that parameter θ k is identified from the log odds ratio of histories A and B. 22 This intuitive description of the identification of parameters in FE discrete choice models has been used by Chamberlain (1985) and Honoré and Kyriazidou (2000), among others. In this paper, I follow this approach.
More generally, equation (22) implies that s i is a sufficient statistic for α i . That is, the probability P(y i | z i , e i , α i , θ, s i ) does not depend on α i . To see this, note that s i is a deterministic function of y i such that P(y i , s i ) = P(y i ). Then, applying equation (22), we have: where y: s(y)=s i is the sum over all the possible choice histories y with s(y) equal to s i . This sufficiency result comes from usual properties of the exponential family, to which the Type I Extreme Value distribution belongs.
Second, using the expression at the bottom line of equation (27), we have the following conditional log-likelihood function (at the population level): The first order conditions for the maximization of this likelihood function with respect to θ imply the following moment conditions (i.e., likelihood equations): The Jacobian matrix for this vector of moment conditions -or equivalently, the Hessian of the log-likelihood function, or the negative of Fisher's information matrix -is: This is the negative of a variance-covariance matrix, and therefore, it is negative semidefinite for any value of θ. In other words, the likelihood function is globally concave in θ. Furthermore, based on these moment conditions, a necessary and sufficient condition for (point) identification of θ is that this Jacobian matrix ∂m(θ)/∂θ is nonsingular (i.e., rank identification condition).
The right-hand-side in equation (30) is a nonsingular matrix if there is no perfect collinearity between the residuals of vector c i once we remove its mean dependence on s i .
It is important to note that for some FE nonlinear panel data models the identification conditions based on this conditional likelihood approach are sufficient but not necessary. Bonhomme

Dynamic demand without duration dependence
Suppose that there is no depreciation or depletion, so that β dep (j) = 0 for every product j, but there is habit formation or/and brand switching costs, so that β sc (k, j) = 0 for some pair of products (k, j). This is the demand model in empirical applications like Roy, Chintagunta, and Haldar (1996), Keane (1997), Osborne (2011), or Mysliwski, Sanches, Junior, andSrisuma, (2020), among others.
In this restricted version of the model, it is the only state variable whose evolution depends on the consumer's choices. Its transition function is: Then, combining equation (16) with this transition rule, we have the following expression for the log-CCP function that, for simplicity, I represent using the shorter notation log P it instead of log P (y it |x it , z it , e it , α i ): where, for notational simplicity, I use h it (j) to represent h (µ i − p it (j)).
Suppose that T = 4. Let k and j be two different products, and consider the following pair of choice histories: Taking into account the structure of the log-CCP function in equation (32), we have the following expression for the log-probabilities of the choice histories: and log P(B) = log p * 1 (k, Therefore, the difference between log-probabilities of the two histories is: Given equation (36), we can establish the identification of parameters β sc (k, j) and γ. To control for the unobserved heterogeneity in the functions v(., α i ) and σ(., α i ), we need to impose the restrictions z 2 = z 3 = z 4 and e 3 = e 4 . Given these restrictions, we have that: Identification of parameters β sc (k, j) and γ follows from equation (37). When p 2 (j) − p 3 (j) = 0 The pair of histories A and B in equation (33) is only one of the many history pairs with identification power for the structural parameters. For instance, we can extend this example by including periods of no purchase. Let 0 n represent a vector of n zeros. For k, j ≥ 1 with k = j, and any two natural numbers n 1 and n 2 , consider the following choice histories: A = (k, 0 n 1 , j, 0 n 2 , k, 0 n 2 , j) ; B = (k, 0 n 1 , k, 0 n 2 , j, 0 n 2 , j) It is straightforward to show that the difference between the log-probabilities of these two his-23 On a minor technical point, remember that both h(.) and ρ(.) are strictly monotonic functions such that h it (j) ≡ h(µ i − ρ[z it (j), e it (j)]) always varies when e it (j) does. tories has the following expression: To eliminate the unobserved heterogeneity α i from this difference we need the following conditions on prices: (i) the permanent component z t is constant from period n 1 + 2 to n 1 + 2n 2 + 4; and (ii) the transitory component e t is constant between periods n 1 + 3 and n 1 + 2n 2 + 4. Under these conditions, we have that: This equation shows that a change between periods n 1 +2 and n 1 +3 in the transitory component of the price of product j or k identifies parameter γ. The switching cost parameter β sc (k, j) is identified from histories where this transitory component is constant.

Dynamic demand with duration dependence
Consider now the demand model with duration dependence. The expression for the log-CCP function is: First, it is straightforward to verify that the pair of histories in equation (33) still identifies the switching cost parameters β sc kj and the price sensitivity parameter γ. Therefore, I focus here on the identification of the depreciation parameters β dep (j). Furthermore, for notational simplicity, I consider here that the two price components are constant over the considered choice histories and omit z t and e t as arguments.
Let n be a natural number such that 2 ≤ n ≤ (T − 2)/2. Consider the following choice histories, both with initial duration d 1 = 1: Note that these histories do not contain any product switching event such that switching cost parameters do not appear in the probabilities of these choice histories. Taking into account the structure of the log-CCP in equation (41), we have the following expressions for log-probabilities of these choice histories: log P(B) = log p * 1 (j, d 1 |α i ) + 2(n + 1)α They imply the following expression for the difference between the log-probabilities: The expression in the right-hand-side still depends on the incidental parameters α i such that, without further restrictions, this pair of histories does not identify parameter β dep (j).
In general, without further restrictions, the depreciation rates β dep (j) are not identified in the forward-looking model. 24 To obtain identification of these parameters, I follow the same approach as Aguirregabiria, Gu, and Luo (2021) and impose the following restriction.
ASSUMPTION 3. For any product j, there is a value of duration d * j -which can vary across products -such that the structural function that captures the depreciation effect is: Importantly, as established in Proposition 6 in Aguirregabiria, Gu, and Luo (2021), the value of d * j is identified from the data as long as it is not larger than (T − 1)/2. I reproduce here this result from Aguirregabiria, Gu, and Luo (2021).
PROPOSITION. Let d * j be the value of duration defined in Assumption 3 above. For any product j and any duration n with 2n+1 ≤ T , define the pair of histories A j,n = (j, 0 n−1 , j, 0 n+1 ) and B j,n = (j, 0 n , j, 0 n ). If d * j ≤ (T −1)/2, then the value d * j is point identified from the following expression: An important implication of Assumption 3 is that the continuation value function is such for any duration n ≥ d * j . Combining this property with equation (45), we have that for n = d * j − 1: such that the depreciation rate β dep (j) is identified.

Estimation of structural parameters
Let θ be the vector of structural parameters as defined in equation (18) In the identification results in Section 3, we represent a sufficient statistic for α i as a binary indicator that combines two conditions: the condition that choice history y i is either equal to A or to B; and a set of restrictions on the evolution of prices. For instance, for the identification of switching costs and price parameters, the persistent component z it should be constant between periods n 1 + 2 and n 1 + 2n 2 + 4, and the transitory component e it should be constant between periods n 1 + 3 and n 1 + 2n 2 + 4. We represent these restrictions on prices using the system of equations r( z i , e i ) = 0. Therefore, a sufficient statistic s i is the following binary indicator: We have shown that: where c(y i , z i , e i ) is a vector of known statistics.
There are many pairs of histories A and B that provide sufficient statistics for α i and have identification power for θ. Let these sufficient statistics be indexed by m ∈ {1, 2, ..., M }. We also index by m the different elements that define sufficient statistic s m i , that is: the corresponding pair of choice histories, (A m , B m ); the restrictions on prices, r m ( z i , e i ) = 0; and the identifying statistics, c m (y i , z i , e i ). Note that we can use m also to index different sub-periods in the panel dataset. 25 Given these M sufficient statistics, we can define the following conditional log-likelihood function: The CML estimator is the value of θ that maximizes L(θ), which is a globally concave function.
In many possible applications, such as those using weekly or daily supermarket scanner data, price stickiness implies such that the restrictions r m ( z i , e i ) = 0 hold for a non-negligible fraction of observations. Nevertheless, imposing exactly these restrictions typically implies losing a substantial amount of observations. This is exactly the issue that motivates the Kernel Weighted CML in Honoré and Kyriazidou (2000). In the log-likelihood function, we replace the indicator 1{r m ( z i , e i ) = 0} with a weight that depends inversely on the magnitude of vector |r m ( z i , e i )| such that we put more weight in the log-likelihood of observations for which |r m ( z i , e i )| is close to zero. More specifically, we consider the following Kernel Weighted conditional log-likelihood function: where K(.) is a kernel density function that satisfies the regularity condition K(v) → 0 as ||v|| → ∞, and b N is a bandwidth parameter such that b N → 0 and N b N → ∞ and N → ∞.
As shown by Honoré and Kyriazidou (2000), this estimator is consistent and asymptotically normal. If prices z it and e it have discrete support, the rate of convergence of the estimator is N −1/2 . Otherwise, with continuous prices, the rate of convergence is slower than N −1/2 .

Average marginal effects and counterfactual experiments for aggregate consumer demand
An important motivation for the estimation of structural demand models is using them to obtain In Fixed Effect discrete choice models with short panels, the distribution of the time-invariant unobserved heterogeneity is not identified. This is because the data consist of a finite number of probabilities -as many as the number of possible choice histories -but the distribution of the unobserved heterogeneity has infinite dimension. Since aggregate consumer demand is an expectation over the distribution of the unobserved heterogeneity, and this distribution is not identified, the common wisdom is that Fixed Effect approaches cannot (point) identify AMEs or counterfactuals on aggregate demand. Here I present a brief discussion of two possible approaches.
(i) Random Effects approach. After the Fixed Effects estimation of the structural parameters θ, the researcher can consider a parametric Random Effects model for the distribution of the unobserved heterogeneity, f α (α i ), and the probability function for the initial conditions, p * ( i1 , d i1 |α i ). The parameters in these two functions can be estimated using full maximum likelihood (or other full solution method), taking as given the estimate of θ. Given the Fixed Effects estimate of θ and the Random Effects estimate of the parameters in f α (α i ) and p * ( i1 , d i1 |α i ), the researcher can calculate any AME or counterfactual experiment.
Though conceptually simple, this approach suffers from two important limitations. A first issue is the potential misspecification of the parametric restrictions imposed on functions f α (α i ) and p * ( i1 , d i1 |α i ). Though the Fixed Effect estimation of θ is robust to this misspecification, the estimates of AMEs and counterfactuals are not, as they depend on the distribution of the unobservables. A second issue is that the full solution estimation of the model requires computing continuation value functions, that may be impractical in applications when the number of products is not small.
(ii) Recent results on identification of AMEs in Fixed Effects discrete choice models. Here I briefly describe recent developments on identification and estimation of AMEs and counterfactuals in Fixed Effects discrete choice models with short panels. In contrast to the Random Effects approach in item (i) above, these methods share the same attractive features of robustness and computational simplicity in the Fixed Effects estimation of θ. However, this literature is very recent and the results are still limited. Chernozhukov, Fernandez-Val, Hahn, and Newey (2013) study the identification and estimation of AMEs and counterfactuals in Fixed Effects binary choice models. The AMEs of interest consist of the causal effect on aggregate demand (i.e., CCP function integrated over the distribution of unobserved heterogeneity) of a change in an explanatory variable for all the consumers (e.g., a change in market prices) or a change in structural parameters (e.g., making β dep equal to zero). The authors characterize the identified set of the AME, and propose an algorithm to estimate this set.
For Fixed Effects dynamic multinomial logit models as the ones in this paper, Aguirregabiria and Carro (2021)  Effects discrete choice models. They also propose simple algorithms to compute the identified sets.

Conclusions
This paper presents a Fixed Effects dynamic panel data model of demand for different products where consumers are forward looking. I apply and extend recent results from Aguirregabiria, Gu, and Luo (2021) to establish the identification of all structural parameters in this model.
Several extensions of the results in this paper are interesting topics for further research.
First, the specification of the sources of demand dynamics in the model of this paper is restrictive. For instance, as mentioned in Section 2.2, more realistic models of habit formation include habit stock variables for each product, where the stock increases when the product is purchased and declines otherwise. Also, the model does not accommodate some forms of consumer learning for experienced goods used in the literature with Random Effects models (e.g., Ching, 2010). Second, the model assumes that consumers buy at most one unit of the product per period.
However, it is well-known that forward-looking consumers can buy for inventory (Hendel andNevo, 2006, 2013). It would be interesting to extend the model to incorporate the possibility of consumers purchasing multiple units.
Third, as mentioned in Section 4.2, an important motivation for the estimation of structural demand models is the evaluation of counterfactual experiments on aggregate consumer demand.
Developments on (point or set) identification and estimation of this type of counterfactuals would be very useful in this literature.
Fourth, in the same spirit as the the recent work by Mysliwski, Sanches, Junior, and Srisuma, (2020), this dynamic demand can be combined with a dynamic game of price competition.
Assumption 1 on the two price components -persistent and transitory -is consistent with an equilibrium of a dynamic pricing game with i.i.d. firms' private information.