I am running a simple regression in R with Price and Quantity:
MyModel=lm(MyData$Price ~ MyData$CumQuantity)
MyCoef=coef(MyModel)
Then the slope will be MyCoef[2]
, while the intercept will be MyCoef[1]
.
Is it possible to force it to go through a certain point (a Price and a Quantity), and then get the slope and intercept for that line instead?
Thanks in advance!