1
$\begingroup$

I have a dataset like this:

enter image description here

Fileds

  1. Profit x Product: It is the variable that I can change, and is the independent variable.
  2. %Sales: Number of sales/Customer
  3. %Sales With subscription: Number of Sales with subscription/ Sales

Question:

  1. I would like to make a model that captures the relation between %Sales and %Sales with Subscription, such that

$$ Y_2 + Y_1 = \alpha_1 + \alpha_2 X_1 + \epsilon $$

  • $Y_1$ = %Sales with Subscription

  • $Y_2$ = %Sales

  • $X_1$ = Profit x Product

What kind of model I can use?

  1. After obtaining the model, I would like to calculate the elasticity of the Profit x Product by group, like this.

enter image description here

enter image description here

How can make this analysis of elasticity?

I would like to make this analysis in R.

$\endgroup$
4
  • $\begingroup$ Please explain what $Y_1$, $Y_2$, and $X_2$ are in question 1 (i.e. which one is %Sales etc) $\endgroup$
    – Lynn
    Commented May 29, 2022 at 22:51
  • $\begingroup$ @Lynn Thanks, done!!! $\endgroup$ Commented May 30, 2022 at 7:15
  • $\begingroup$ I am confused as to why you add $Y_1$ and $Y_2$ in the model. Do you want to estimate elasticities for their sum? Or do I understand it correctly that you want to estimate elasticities with respect to each of them individually? $\endgroup$ Commented May 30, 2022 at 8:44
  • $\begingroup$ Hi, @MartinGeorgHaas I want to estimate the sales and of these sales the sales with the subscription. For this, I would like to be together. $\endgroup$ Commented May 30, 2022 at 13:15

1 Answer 1

0
$\begingroup$

What kind of model I can use?

You can use a log-log model, to estimate elasticities: $$ \log(Y) = \beta_0 + \beta_1 \log(X) + \dots + \varepsilon $$ Just set $Y$ to your desired outcome variable (e.g. %Sales) and $X$ to Profit x Product. The coefficient $\beta_i$ then gives the (ceteris paribus) percentage change in $Y$ given a $1\%$ change in $X$.

Individual elasticities per group

If you want to estimate individual elasticities for each group you can add an interaction effect: $$ \log(Y) = \beta_0 + \beta_1 \log(X)\times group + \dots + \varepsilon $$ where $group$ is a dummy variable indicating the group membership.

R implementation

You can estimate this model via:

lm(log(Y) ~ log(X):group,
   data = data)
$\endgroup$
5
  • $\begingroup$ Why do you use log-log model and not something like panel data? or multilevel model? $\endgroup$ Commented May 30, 2022 at 13:16
  • $\begingroup$ The log-log functional form or the model allows you to interpret $\beta_1$ as elasticity. It does not prevent you from using panel data or other methods. $\endgroup$ Commented May 30, 2022 at 13:43
  • $\begingroup$ Hi @Martin, but I think that with this approach I miss the relation between groups $\endgroup$ Commented May 31, 2022 at 7:22
  • $\begingroup$ What relation between groups are you trying to model? Please be more specific. $\endgroup$ Commented May 31, 2022 at 7:43
  • $\begingroup$ Hi, As panel data, you can use the random effect to model de effect across all the groups, with this approach we are not capturing this relation. $\endgroup$ Commented May 31, 2022 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.