How can i run a regression on the scatter plot as shown in image below? Need to estimate price elasticity of demand I want to estimate price elasticity of demand i.e. how variation in price affects volume sales(data shown is weekly price and volume for last 100 weeks). Since there were few price changes that happened, the data points are in the form of long spread clusters at specific price points. A linear fit is not helpful in this case. Have already tried fitting non-linear least square using nls function in R, but that throws an initial parameter error. Fitting a curve itself doesn't look like a good option to me. Please suggest what could be best way forward.
 A: With many circumstances in economics, it is difficult (or misleading) to try to solve equations in isolation without considering relevant endogenous and exogenous effects. Economic analysis is normally dynamic in the sense that the economic system is like a spiderweb (sensitive). I say this to say that you need to go a little deeper and use this additional info so that you can isolate a solution.
On one hand, when considering price elasticity of demand you need to remember that goods (products) or services ultimately will be classified as belonging to certain product groups for certain consumers or businesses. For example, there are normal products in the middle of the scale, inferior (or Giffen products) at one end of the scale and luxury products at the other end of the scale. What is a luxury item for some is a normal item for others & etc. Elasticity curves look different for these different product groups and you need to have an idea of approximately where your product belongs.
On the other hand, at the core of price elasticity of demand is the question of the extent to which there are substitutes for the item under consideration. The question of substitutes automatically draws attention to the question of the degree to which similar products have been artificially differentiated. For example, the ABC company sells a 5k gas generator of a specific quality direct to certain re-sellers while it sells this same gas generator to only one specific re-seller differentiated (different model#, different color, & some other superficial differences). 
Some products require an artificial price change to test elasticity. Your graph shows that the price went from near 19 cents to near 39 cents. Maybe the price needed to be artificially changed to higher and lower numbers for a certain time period to observe a broader range of behaviors so that you get a better idea of the price elasticity of demand.
In my first sentence I mentioned endogenous and exogenous effects. You need to make a grid with the top (most important) endogenous and exogenous effects with respect to your product. Then you must create multiple price elasticity of demand graphs or curves based on the different levels of these endogenous and exogenous effects. Start with creating multiple price by volume graphs constrained by the different levels of these endogenous and exogenous effects. Even though you didn't mention the product under consideration in your question, it really doesn't matter because the strategy used to construct (or identify) the curve (or graph) for the price elasticity of demand still follows a certain technique. For example, you must consider income for most products. You could break your analysis into multiple income groups then reexamine your price by volume plot. Consider the price change of close substitutes in your 100 weeks time period. Complete your grid by generating many different price by volume plots given the combinations of your endogenous and exogenous input constraints. Even region, weather, season & culture might have something to do with the price elasticity of demand.
Once you complete your grid, you will begin to graphically see what the price elasticity of demand curve approximates without an exact curve. Price is one of the most important factors in economic analysis and a relevant price will reflect the impact of all endogenous and exogenous effects. The more shortcuts there are in your analysis, the more misleading your final outcome will be. Remember that Economist frequently use structural equation systems to resolve many economic questions. Thus, price analysis is not simple. You might even need survey data to complete the grid.
