Date: Thu, 10 Nov 2005 10:51:12 -0500
Reply-To: Peter Larsen <phlarsen@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter Larsen <phlarsen@YAHOO.COM>
Subject: Monte-carlo simulation with conditional draws....
Hi SASHeads-
I recently built an economic model with four measures of weather (precip
total, precip deviation, low temp, and high temp) used as inputs to the
model. I have parameter estimates for all of my variables (including the
four weather measures) that were generated from an OLS performed on the
data.
Lately, I have been experimenting with running a monte-carlo simulation in
SAS that takes hundreds/thousands of random draws from a normal
distribution with a mean and std. error calculated from the raw weather
data. Currently, the code is drawing the iterations of each weather
variable independently and sticking them into the equation estimated from
the OLS to produce a distribution of economic output. In other words,
high temp is drawn independent of the draw of total precipitation.
Obviously, temperature and precip are often correlated so the above method
is producing unrealistic weather scenarios for my economic model.
My question is this: How would someone design a MC simulation in SAS that
is conditional on the value obtained from a previous draw? Also, what
sort of modeling, correlation matrix, etc. is needed to
determine "realistic" combinations of weather based on the conditional
drawing technique posed above?
My code for the draws looks like this (truncated):
DATA TEMP;
SET TEMP;
DO I=1 to 100;
X=RANNOR(10);
Y=RANNOR(11);
HIGHTEMP=HIGHTEMP_MEAN+sqrt(HIGHTEMP_VARIANCE)*X;
PRECIP=PRECIP_MEAN+sqrt(PRECIP_VARIANCE)*Y;
OUTPUT;
END;
RUN;
Thanks in advance for your help. You guys/gals rock!
Pete