Monte Carlo simulation with random poisson draws and fixed exogenous variables

6 Ansichten (letzte 30 Tage)
Hello
I have a question concerning Monte Carlo simulation in matlab. I've created a function calling an estimate function, that does a MLE of my model. Now I want to simulate it to evaluate the perfomance of my MLE. My model is a poisson proces and I want the number of replications to be N=1000 and my sample size to be T.
lambda_t = delta+sigma_1*y_t-1+beta_1*lambda_t-1+gamma*x_t-1
First of all y_t must be drawn from a poisson distribution as it can't take negative values - see below. Second of all I have a series for x_t which I want to use - thus fixing x_t with the values I've actually observed. The sample size of x_t is 360.
Let's say I want to carry out the simulation with delta=0.1; sigma=0.3; beta=0; gamma=0.5;
I use this script:
konk=importdata('konk.txt');
y=poissrnd(konk); %this makes y a poisson random draw from konk
opi=importdata('opi.txt');
X=opi;
theta0=[0.1;0.3;0;0.5]; %here I set delta=0.1, sigma=0.3, beta=0 and gamma=0.5
lb=-Inf*ones(4,1); %I am not sure if a lower bound is necessary
opt=optimset('Algorithm','interior-point');
outputMC(y,X,theta0,lb,opt,1,1,1)
%this function calls my MLE-function which uses fmincon. This is the one I want to simulate with the above paramater values, and 1000 replications. 1 is the lags of y and lambda respectively while the last 1 is output sheet in excel.
Am I on the right track? I need to simulate this instead of estimating it.
If you lack information to help solve my question please tell me and I will try to provide it.
Thanks in advance

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by