3
$\begingroup$

I am working on sales of a B2B company and I have sales volumes of different customers at different price points. Some customers, however, purchased at only a single price point.

I'm trying to identify the effect of price on sales volume using a mixed-effects model (varying slope, varying intercept), where each customer is a "group"

Eg. Sales ~ Price + (1+Price|Customer)

My question is - What happens when certain customers have only one price point (ie. the independent variable does not change). Would these customers affect the fixed effect of 'Price' (do they bring the slope of the fixed effect closer to zero)? Is it more appropriate to remove these customers from my analysis?

$\endgroup$
3
  • 1
    $\begingroup$ I would consider that the customers with only one price point do not yet have enough data for an analysis of variation. $\endgroup$ Oct 28, 2018 at 13:34
  • $\begingroup$ Thanks, @JamesPhillips, very helpful. Would this also be somehow related to why I'm getting a perfect correlation (= -1) between by random effects (the random effects slope and intercept)? Am I getting the perfect correlation because the model fails to converge because of this absence of variation? $\endgroup$ Oct 28, 2018 at 13:43
  • 1
    $\begingroup$ One way forward is to experiment. Try excluding all the ones with only one price point and compare the two sets of output carefully. Then if you still have further questions come back here and edit your question with a description of what you found. Interesting question (+1) $\endgroup$
    – mdewey
    Oct 28, 2018 at 14:28

1 Answer 1

4
$\begingroup$

No, you do not have to exlcude the customers with one measurement. They still contribute to the cross-sectional effect of Price on Sales. This is also in relation to the potential missing data you may have, i.e., mixed models provide you with valid inferences under the missing at random assumption, and this requires to use all available data.

Regarding the perfect correlation, try working with the centered prices.

$\endgroup$
3
  • $\begingroup$ Thanks, @Dimitris. Could you shed more light on how customers with only one price point "contribute to the cross-sectional effect of Price on Sales"? Do they contribute by bringing the slope closer to zero (because their slopes are zero)? Note that customers with one price point can still have multiple measurements (at the same price point, but varying sales, measured in different months). My mixed effect model has varying slope and intercept for each customer. $\endgroup$ Oct 29, 2018 at 11:54
  • $\begingroup$ Say that you have only customers with one measurement, then you could a simple linear regression with Price as the covariate and Sales as the outcome, and see via the corresponding coefficients how strongly related the two are. This is the cross-sectional effect, and this is what you also get as the fixed-effect regression coefficient from the mixed model. The difference between the mixed model and linear regression will be that in the former you correctly account for the correlations in the repeated measurements of customers who have more than one. $\endgroup$ Oct 29, 2018 at 13:07
  • 1
    $\begingroup$ The longitudinal effect is captured by the random effects. Even if a customer has a single measurement you see that you get an estimate for his/her slope (e.g., using the ranef() function) that it's not 0. Moreover, you can see that the estimated slopes of customers with one measurement will not be the same. That is, if two customers who had one measurements differ in the sales they had, you get a different slope for them. This is because the a-posteriori random intercepts and sloes are correlated, and being able to estimate the one you also get the other. $\endgroup$ Oct 29, 2018 at 13:12

Your Answer

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

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