Usually whether two goods are complementary or substitutes can be measured by estimating cross-price elasticity of demand. If cross-price elasticity of demand is negative the two goods are complements and if the cross-elasticity of demand is positive they are substitutes. However, how would we determine if goods are complements or substitutes when one is provided for free (e.g. are free e-books on Bayesian analysis and coffee complements or substitutes?).
Now, as far as I understand, theoretically this does not pose any issue because even though price of one good is always set to 0 there will be some theoretical demand for the e-book that will depend on price (even if we can't observe any price other than 0). But from a practical perspective would it be possible to estimate cross-price elasticity empirically in such case?
Normally, we would estimate cross-price elasticity in some sort of regression like (or more sophisticated analogues):
$$\ln q_x = \beta_0 + \beta_1 \ln p_x + \beta_2 \ln p_y +...+ \epsilon$$
but $\beta_2$ can only be identified if $VAR(p_y) \neq 0$ since $\beta_2= \frac{COV(q_x,p_y)}{VAR(p_y)}$.
Are there any models that could allow us to estimate cross-elasticity even in such cases or is it simply impossible? Are there other empirical methods of determining if goods are complementary/substitutes aside from estimating cross-price elasticity?
I tried to do due diligence search on google scholar but even though there are plenty of papers discussing estimation of cross-price elasticities (such as Deaton 1987), I was not able to find paper discussing this issue. This being said estimating such elasticities is not area of my specialty so I am not sure if I am missing some important keywords. I ask this question because I TA undergraduate microeconomics class and one of the students raised this, in my opinion very interesting, question.