! Bivariate normal distribution tests for MCMC

! suppress dialogs
SPECIAL>NOINTERACTION

SPECIAL>LOADMODEL|normal-bivar.mdl

! Powell (ordinary)
! estimate should find the right optimum
! but confidence bounds by the Payoff Value method will understate the true bounds
! because of the high covariance
SIMULATE>RUNNAME|powell-sens
SIMULATE>PAYOFF|objective-PF.vpd
SIMULATE>OPTPARM|powell-sens.voc
MENU>RUN_OPTIMIZE|o
! edit powell-sens_sensitive.tab to view resulting bounds


! Powell search, with MCMC payoff sensitivity
! Powell
! estimate should find the right optimum
! but confidence bounds by the Payoff Value method will understate the true bounds
! because of the high covariance
SIMULATE>RUNNAME|powell-mcmc
SIMULATE>PAYOFF|objective-PF.vpd
SIMULATE>OPTPARM|powell-mcmc.voc
MENU>RUN_OPTIMIZE|o
! edit powell-mcmc_sensitive.tab to view resulting bounds

! export the MCMC diagnostic dataset for viewing
MENU>DAT2VDF|powell-mcmc_MCMC_stats.dat
! export sample and all points
MENU>TAB2VDF|powell-mcmc_MCMC_sample.tab||MCMC_tab.frm
MENU>TAB2VDF|powell-mcmc_MCMC_points.tab||MCMC_tab.frm


! Standalone MCMC
! estimate bivariate normal from likelihood
! marginal distribution on each dimension should match mean & sd of parameters
SPECIAL>LOADMODEL|normal-bivar.mdl
SIMULATE>RUNNAME|mcmc-standalone
SIMULATE>PAYOFF|objective-PF.vpd
SIMULATE>OPTPARM|opt-MCMC.voc
MENU>RUN_OPTIMIZE|o

! export the MCMC stats for viewing
MENU>DAT2VDF|mcmc-standalone_MCMC_stats.dat
! export sample and all points
MENU>TAB2VDF|mcmc-standalone_MCMC_sample.tab||MCMC_tab.frm
MENU>TAB2VDF|mcmc-standalone_MCMC_points.tab||MCMC_tab.frm


! Standalone MCMC - correlated
! estimate bivariate normal from likelihood, w/ high covar of x1,x2
! marginal distribution on each dimension should match mean & sd of parameters
SPECIAL>LOADMODEL|normal-bivar.mdl
SIMULATE>SETVAL|rho=.9
SIMULATE>RUNNAME|mcmc-correlated
SIMULATE>PAYOFF|objective-PF.vpd
SIMULATE>OPTPARM|opt-MCMC.voc
MENU>RUN_OPTIMIZE|o

! export the MCMC stats for viewing
MENU>DAT2VDF|mcmc-correlated_MCMC_stats.dat
! export sample and all points
MENU>TAB2VDF|mcmc-correlated_MCMC_sample.tab||MCMC_tab.frm
MENU>TAB2VDF|mcmc-correlated_MCMC_points.tab||MCMC_tab.frm
