I buy flowers at a local market on a fairly regular basis.  The flower
vendors post their prices and if I want to buy only one or two flowers I
will generally get the posted price.  From time to time I want to buy large
quantities of flowers, and sometimes a vendor will give me a better price
than their posted price for the bulk order, but more often I have to offer
them a higher price than the posted price to get my desired quantity.  I
have collected the outcome of several thousand visits to the flower market
and I want to analyze whether there is any relationship between the amount
of flowers I am buying and the 'average' increment above the posted price
that I end up needing to pay.  Moreover, I am interested in the "right hand
side" of this relationship since tomorrow, being Valentine's Day, I am
contemplating purchasing a very large number of flowers.  So, if

 

amt = a vector of quantities of flowers bought on various days

deltaP = a vector of the differences between the purchase price and the
posted price on those days

 

Two simple models might be:

 

mottle1 = lm( deltaP ~ amt )

or 

mottle2 = lm( deltaP ~ amt - 1 )

 

But, I have the urge to set the model up as follows

 

mottle3 = lm( deltaP ~ amt - 1, weights = amt )

 

because I want the big purchases to weigh much more in the calculation of
the slope than the small purchases, but I have an uneasy feeling that this
amounts to double-dipping/counting.  Can anyone explain to me if/why this is
a bad idea?

 

Thanks,

 

Dan


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to