Date: Thu, 10 Nov 2005 12:03:19 -0500
Reply-To: Talbot Michael Katz <topkatz@MSN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Talbot Michael Katz <topkatz@MSN.COM>
Subject: Re: Monte-carlo simulation with conditional draws....
Slight error in the first line I gave you. Change "R*R" to "RHP*RHP" :
-- TMK --
"The Macro Klutz"
On Thu, 10 Nov 2005 11:51:58 -0500, Talbot Michael Katz <topkatz@MSN.COM>
>For normal random variables, linear combinations are still normal.
>Suppose that RHP is the correlation between HIGHTEMP and PRECIP.
>Then modify your code as follows:
>Now HIGHTEMP and PRECIP should have the correlation you desire.
>As for modeling, this looks like a job for PROC MIXED; from the online
>"The primary assumptions underlying the analyses performed by PROC MIXED
>are as follows:
>"The data are normally distributed (Gaussian).
>"The means (expected values) of the data are linear in terms of a certain
>set of parameters.
>"The variances and covariances of the data are in terms of a different set
>of parameters, and they exhibit a structure matching one of those
>available in PROC MIXED.
>"Since Gaussian data can be modeled entirely in terms of their means and
>variances/covariances, the two sets of parameters in a mixed linear model
>actually specify the complete probability distribution of the data. The
>parameters of the mean model are referred to as fixed-effects parameters,
>and the parameters of the variance-covariance model are referred to as
>covariance parameters. "
>Of course, three or more covariates follow the same principles, but with
>additional combinatorial complexity.
>-- TMK --
>"The Macro Klutz"
>On Thu, 10 Nov 2005 10:51:12 -0500, Peter Larsen <phlarsen@YAHOO.COM>
>>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
>>Lately, I have been experimenting with running a monte-carlo simulation
>>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
>>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):
>>DO I=1 to 100;
>>Thanks in advance for your help. You guys/gals rock!