Date: Fri, 27 Jun 1997 09:23:47 -0700
Reply-To: Donald Peter Cram <doncram@LELAND.STANFORD.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Donald Peter Cram <doncram@LELAND.STANFORD.EDU>
Organization: Stanford University, CA 94305, USA
Subject: Re: SAS Simulation
In article <Pine.GSO.3.96.970626103805.23118B-100000@elaine2.Stanford.EDU>,
Dana Arnetta Maclaurin <firstname.lastname@example.org> wrote:
>I have a fairly complicated SAS question. I am using SAS essentially to
>run a simulation. Here is the setup: I have two firms, each having its
>own quality level between 0 and 1. Say there are ten quality levels (0.1,
>0.2, 0.3, etc.), then I want to consider each possible combination of the
>two firms' quality levels. For each pair, I have some equations that I
>use to calculate prices and profits for each firm. Then I pick the combo
>that maximizes profits (first for firm 2 given each possible quality of
>firm 1, then for firm 1 overall). The result should be one "best"
You have a two player game and you seek an equilibrium where each
plays his/her best response (sets a product quality level) in response
to the other's quality level setting. It seems possible that there
exist more than one equilibrium. If the special nature of your
equations somehow lets you know that there is only one equilibrium,
then I wonder if the same information might be used to tailor a search
strategy for it.
Your approach is to do an exhaustive search over a grid. But
certainly you can write a formula expressing Firm 1's best response as
a fucntion of Firm 2's quality level. I assume that analytically
solving that maximisation problem is not possible. But you could use
PROC NLP or an NPL algorithm in PROC IML to solve numerically, for
each possible play by Firm 2. Use PROC PLOT to portray Firm 1's best
response to Firm 2 and also Firm 2's best response to Firm 1's
possible plays. You can then see where the intersection(s) is(are)
and examine more closely in those regions, assuming your problem is
"well-behaved". (If it's not well-behaved your exhaustive search
wouldn't work either.)
Your dataset size would be 2 datasets of say 1000 plays and
bestresponses, one for each firm. That would provide an equivalent
solution to your searching over 1000x1000 = 1,000,000 combinations.
To implement this you would run PROC NLP in a macro programming loop.
Start by checking the PROC NLP manual ( you can borrow mine).
Does anyone have sample code for plotting 2 best response funcitons?
>The bottom line: is there any way to have the current observation
>overwrite the previous observation if a certain condition is met?
I don't think so, and don't expect that a 40percent improvement is enough
for you anyhow.
doncram at gsb dot stanford dot edu
all lowercase http colon slash slash www hyphen leland dot stanford dot edu
slash tilde doncram