Page 1 of 1

Calculation of standard deviation in stochastic simulation

Posted: Wed Jan 23, 2013 1:53 pm
by DannyBachman
When you do a stochastic simulation, you can get confidence limits and a standard deviation series. How are these calculated?

Re: Calculation of standard deviation in stochastic simulati

Posted: Wed Jan 23, 2013 2:47 pm
by EViews Gareth
Confidence interval is based on standard deviation. Standard deviation is simply calculated in the normal way from the simulation results.

Re: Calculation of standard deviation in stochastic simulati

Posted: Thu Jan 24, 2013 6:04 am
by DannyBachman
Sorry, you will have to pretend I am especially dense here (not hard to do, really). What is the "normal" way? Is that the sample standard deviation for a given period just the standard formula calculated for the observations for all the simulations in that period? I just want to be sure I understand.

Re: Calculation of standard deviation in stochastic simulati

Posted: Thu Jan 24, 2013 8:43 am
by EViews Gareth
At each observation of the solve, calculate the standard deviation of the simulated solution values. So you're not calculating a standard deviation across time periods, rather across stochastic solves.

Re: Calculation of standard deviation in stochastic simulati

Posted: Thu Jan 24, 2013 8:58 am
by DannyBachman
Thanks, Gareth. I think we are saying the same thing (you are confirming what I thought). We are working on getting the confidence limits directly from the simulations (e.g.), picking out the 97.5th highest and lowest simulation) rather than using the calculated standard deviations.

Re: Calculation of standard deviation in stochastic simulati

Posted: Thu Jan 24, 2013 9:12 am
by EViews Gareth
To be more concrete:

Code: Select all

create(page=page1) d5 1990 1991
rndseed 1
series y=nrnd
series x=nrnd
equation eq1.ls y c x
eq1.makemodel(m)

m.stochastic(p=page2)
m.solve(s=s)

show y_0s

pageselect page2

series sd = @stdevpsby(y_0, @obsid)

show sd