Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Draw an offer curve (supply curve)?


From   "G. Dai" <dgecon@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Draw an offer curve (supply curve)?
Date   Wed, 2 Nov 2011 14:01:05 -0600

Thanks, Brian. It is what I need: efficient and concise.

On Mon, Oct 24, 2011 at 7:07 AM, Brian P. Poi <bpoi@stata.com> wrote:
> G. Dai wrote:
>>
>> Dear all,
>> I have a dataset on real offering behavior and I want to draw an
>> offering curve (supply curve) from the data set.
>> One simple example of the data is following:
>>
>> ID    Qantity_Offered    Price_asked
>>
>> 1       10                         99
>> 2        23                        90
>> 1        5                          50
>> 4       30                         32
>> 3       39                         10
>> 2       30                          0
>> 4       20                          0
>> 3       20                          0
>>
>> ID is the individual participating in the trade, and quantity_offered
>> is the quantity they can offer at the price of Price_asked.
>> We can see some individuals just ask zero price for some quantities,
>> while ask a higher price for extra quantities.  My object is draw an
>> offer curve (supply curve) from the data in an efficient way because
>> the dataset  is big.
>>
>> Any suggestion is appreciated.
>> Thanks and have a great weekend!
>
> How about something like this:
>
> . input id q p
> 1       10                         99
> 2        23                        90
> 1        5                         50
> 4       30                         32
> 3       39                         10
> 2       30                          0
> 4       20                          0
> 3       20                          0
> end
>
> . sort p                  // put data in ascending price order
> . gen totalq = sum(q)     // running sum of total quantity offered
>                          // for price <= p
> . line p totalq, connect("stairstep")
>
>
> Brian P. Poi
> Senior Economist
> StataCorp LP
>
> *
> *   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index