Closed jessi96 closed 2 years ago
So to be clear, the cited solution computes coefficients on observed characteristics: a constant, sugar, and mushy. I'm guessing you're referring to them as unobserved characteristics because we're assuming there is unobserved preference heterogeneity for these same characteristics by including them in our X2 formula. Technically, the only unobserved characteristic in the model is xi. Hopefully that clears up some terminology!
The above solution uses a minimum distance procedure because if we tried to include a constant, sugar, and mushy in our X1 formula, these would be perfectly collinear with the product fixed effects, so we couldn't estimate their coefficients. Based on your description, I don't think you have the same issue. If there's characteristic variation within brand, you should be able to identify coefficients on these characteristics from this within-brand variation. Does that make sense?
I'm going to close this for now, but feel free to keep commenting / re-open the issue if there's anything else.
Hi,
thanks a lot for the great work on the PyBLP package. At the moment, I am working on the model and try to compute the coefficients and standard errors for the constant + the unobserved product characteristics. Contrary to the solution of the thread cited below, I do not use product fixed effects, but rather brand fixed effects. Therefore, I do not have a single number that I can align to each brand regarding the unobserved characteristics. Is there still a way to compute the constant + unobserved characteristics coefficients, e.g. take the mean / median value of the unobserved characteristic (e.g. sugar) per brand?
You should be able to run this just before the "Restricting Parameters" section:
The above approximately replicates the original paper, giving:
The point estimates and the standard errors for the last two covariates are a bit off, perhaps because the results are somewhat sensitive to the optimizer termination tolerance. (Above, I set a very loose tolerance to get a similar local (not global) optimum that was reported in the table you posted above.) Or maybe the reported estimates used a slightly different standard error formula -- not sure.
Hope this helps. I'll keep this issue open for now as a reminder to incorporate something like this into the notebook.
Originally posted by @jeffgortmaker in https://github.com/jeffgortmaker/pyblp/issues/93#issuecomment-888527383