GENERATING RANDOM NORMAL DRAWS
Posted: Sun Dec 10, 2023 6:57 am
Dear Eviews team
'==========================='
'CALCUTLATING FORECAST ERROR, ITS VARIANCE, and generating RANDOM DRAWS
'==============================
genr error_CA_{%h}Y_{%c}_AR = CA_{%c} - CA_{%c}_0_AR 'actual-forecast = error
scalar errorvariance_CA_{%h}Y_{%c}_AR=@var( error_CA_{%h}Y_{%c}_AR) 'Forecast error variance
scalar num_draws_AR = 1000 'Set the number of random draws you want to generate random draws from the normal distribution
series draws_errorvariance_CA_{%h}Y_{%c}_AR=@rnorm(num_draws, 0, @sqrt(errorvariance_CA_{%h}Y_{%c}_AR)) ' generate random draws from
the normal distribution //
ON THE LAST LINE OF THIS CODE I KEEP GETTING A SYNTAX ERROR. I cannot figure out why. Please advice.
Kind Regards,
Florence
'==========================='
'CALCUTLATING FORECAST ERROR, ITS VARIANCE, and generating RANDOM DRAWS
'==============================
genr error_CA_{%h}Y_{%c}_AR = CA_{%c} - CA_{%c}_0_AR 'actual-forecast = error
scalar errorvariance_CA_{%h}Y_{%c}_AR=@var( error_CA_{%h}Y_{%c}_AR) 'Forecast error variance
scalar num_draws_AR = 1000 'Set the number of random draws you want to generate random draws from the normal distribution
series draws_errorvariance_CA_{%h}Y_{%c}_AR=@rnorm(num_draws, 0, @sqrt(errorvariance_CA_{%h}Y_{%c}_AR)) ' generate random draws from
the normal distribution //
ON THE LAST LINE OF THIS CODE I KEEP GETTING A SYNTAX ERROR. I cannot figure out why. Please advice.
Kind Regards,
Florence