Dear Statalists,
My question in short: Am I calculating my control function terms and the following regression correctly?
I’m running a random effect panel model to estimate effects on weekly sales of product new releases (first 12 weeks after release, during 6 observation years) with exponentially declining sales on three sales channels. One (endog.) independent has a nonlinear effect that is measured via its squared values. For the other (endog.) independent there is no instrument, thus I rely on a gaussian copula term. Since many controls are time invariant a fixed effect models cannot return useful results, most information is omitted. Due to several interactions that shall be calculated in the following steps, I employ control function terms.
Model
Dependent: sales (= cumul. sales of product i in sales week t, t = 1…12. Accrued on three different sales channels simultaneously)
Independents: w (invariant with t), w^2, and p (variant with t); all likely endogenous.
Controls: c (time invariant continuous variables), d (time invariant dummies), i.sweek (fixed effect for sales week), i.year (fixed effect for year of product release = 1-6), i.channel (fixed effect for sales channels 1-3)
Instruments for w, w^2: z1 z2
Control Functions: w_cf, w2_cf, p_gc (= gaussian copula)
Panel Setup: Panel Variable = ProductID+Channel, Time Variable = Sales Week.
Stata commands
Note/problem: sometimes stata omits the constant term (dependent on included fixed effects), the estimated coefficient for w, w^2 of xtreg vs. xtivreg are not the same.
Thank you very much in advance, it would help me a great deal
Kind regards
Nicolas
My question in short: Am I calculating my control function terms and the following regression correctly?
I’m running a random effect panel model to estimate effects on weekly sales of product new releases (first 12 weeks after release, during 6 observation years) with exponentially declining sales on three sales channels. One (endog.) independent has a nonlinear effect that is measured via its squared values. For the other (endog.) independent there is no instrument, thus I rely on a gaussian copula term. Since many controls are time invariant a fixed effect models cannot return useful results, most information is omitted. Due to several interactions that shall be calculated in the following steps, I employ control function terms.
Model
Dependent: sales (= cumul. sales of product i in sales week t, t = 1…12. Accrued on three different sales channels simultaneously)
Independents: w (invariant with t), w^2, and p (variant with t); all likely endogenous.
Controls: c (time invariant continuous variables), d (time invariant dummies), i.sweek (fixed effect for sales week), i.year (fixed effect for year of product release = 1-6), i.channel (fixed effect for sales channels 1-3)
Instruments for w, w^2: z1 z2
Control Functions: w_cf, w2_cf, p_gc (= gaussian copula)
Panel Setup: Panel Variable = ProductID+Channel, Time Variable = Sales Week.
Stata commands
- Control Function Terms:
Code:
cumul p, g(p_cdf) gen p_gc = invnormal(p_cdf) reg w z1 z2 p p_gc c d i.sweek i.year i.channel, vce(bootstrap, reps(1000)) predict w_cf, r reg w2 z1 z2 p p_gc c d i.sweek i.year i.channel, vce(bootstrap, reps(1000)) predict w2_cf, r
- Regression:
Code:
xtreg ln_sales w w2 p w_cf w2_cf p_gc c d i.sweek i.year i.channel, re vce(bootstrap, reps(200)) Rob. Check: xtivreg ln_sales (w w2 = z1 z2) p p_gc c d i.sweek i.year i.channel, re vce(bootstrap, reps(200))
Thank you very much in advance, it would help me a great deal
Kind regards
Nicolas
Comment