1
$\begingroup$

I am referring to the book titled " Beating the commodity trap: Maximize your competitive position and increase your pricing power" by Richard A. D'Aveni. In the price-benefit analysis method in the Appendix, the author says:

" To get the best estimate of the price-benefit equation, it is wise to weight each product on the price benefit map by its volume sales in units or dollars- a technique commonly found in statistical packages. This methodology prevents small sellers from distorting the line you are estimating"

How do I do this in a statistical package like "R". It seems like we have to give different weights to residuals.Higher weights to be given to the residuals of observations of the product with higher sales volume.

Kindly clarify so as to how to do this in a statistical package.

$\endgroup$
1
  • 1
    $\begingroup$ See the documentation in help("lm"): "Non-NULL weights can be used to indicate that different observations have different variances (with the values in weights being inversely proportional to the variances); or equivalently, when the elements of weights are positive integers w_i, that each response y_i is the mean of w_i unit-weight observations (including the case that there are w_i observations equal to y_i and the data have been summarized)." $\endgroup$
    – Roland
    Commented Apr 25, 2016 at 11:50

1 Answer 1

3
$\begingroup$

There is not much to it:

# Some data:
n       <- 1000
x       <- rnorm(n, mean = 7000, sd = 500)
y       <- 50 + x*50 + rnorm(100)
weights <- 1:1000/1000
# Regression:
ols     <- lm(y ~ x)
wls     <- lm(y ~ x, weights = weights)

You simply specify the weights argument. R then applies the weights to each observation and the intercept.

$\endgroup$

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.