Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Charles Vinis <charles.vinis@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Re: Finding and graphing intersection of lines |

Date |
Wed, 3 Aug 2011 00:21:51 -0400 |

Thanks for the reply. I basically made a stata loop that gives different market shares for firms (or average market shares by country) based on a percentage point change in marginal cost for one (or a group) of firms, then I reshape the set and use the data points to make a line plot of the market share against the percent change in marginal cost. Here's an example of the type of graph I'm doing: (I'm using # delimit ; to end lines) graph twoway line sim_comp_share pct_decrease_mc_fslr if(company == "first_solar" & year == 2010), color(brown) || line avg_ctry_comp_share pct_decrease_mc_fslr if(ctry_code_hq == "usa" & year == 2010), color(green) || line avg_ctry_comp_share pct_decrease_mc_fslr if(ctry_code_hq == "china" & year == 2010), color(red) || line avg_ctry_comp_share pct_decrease_mc_fslr if(ctry_code_hq == "germany" & year == 2010), color(blue) || line avg_ctry_comp_share pct_decrease_mc_fslr if(ctry_code_hq == "taiwan" & year == 2010), color(purple) ytitle(Market Share) xtitle(Percent Decrease in First Solar MC) legend(label(1 First Solar) label(2 USA) label(3 China) label(4 Germany) label(5 Taiwan)); Basically I would like for STATA to tell me exactly at which point (what % decrease in MC and what market share) First Solar's market share is equal to the average market share of a German or a Chinese firm, and I would like to get stata to label that point on the graph. Any ideas? On Tue, Aug 2, 2011 at 5:21 PM, Anders Alexandersson <andersalex@gmail.com> wrote: > Could you please describe the line intersection problem more clearly, > perhaps using a simple data example in Stata? > Did you consider using the Stata graphics editor for editing the graphs? > > Anders Alexandersson > andersalex@gmail.com > > Charles Vinis <charles.vinis@gmail.com> wrote: >>> I'm currently developing an n-firm model of Cournot competition in which I am mapping the change in market shares between multiple companies based on reductions in marginal costs. I used a stata loop to find different market shares based on a 1-99 percent decrease in MC for the indicated firm, and I am graphing this as a line against the firms whose MCs are not decreasing. Because this is a program that I want people to be able to experiment with, I would prefer to find a way to get stata to find the intersection of the lines on its own so that I don't have to do it myself each time I run the calculations. I would like to be able to get the graph to label the point of intersection of these lines as well as to display the value of the x-axis and y-axis at that time. If anybody has any helpful ideas I would really appreciate it. > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Re: Finding and graphing intersection of lines***From:*Scott Merryman <scott.merryman@gmail.com>

**References**:**st: Re: Finding and graphing intersection of lines***From:*Charles Vinis <charles.vinis@gmail.com>

**Re: st: Re: Finding and graphing intersection of lines***From:*Anders Alexandersson <andersalex@gmail.com>

- Prev by Date:
**Re: st: How to return regression results from a complex column vector in mata back to stata** - Next by Date:
**RE: st: --estimates table, drop()" and FACTOR variables (texdoc)** - Previous by thread:
**Re: st: Re: Finding and graphing intersection of lines** - Next by thread:
**Re: st: Re: Finding and graphing intersection of lines** - Index(es):