can't obtain the posterior distribution

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

can't obtain the posterior distribution

Postby selima » Tue Jan 15, 2013 4:53 pm

hello please help me I can't obtain the posterior distribution this is my code and my data.m and below I tell you the error I obtained can you find a solution for me? thank you
//
var y c k i l y_l w r z ;
varexo e;
parameters beta psi delta alpha rho epsilon;
alpha = 0.33;
beta = 0.99;
delta = 0.023;
psi = 1.75;
rho = 0.95;
epsilon = 10;

model;
(1/c) = beta*(1/c(+1))*(1+r(+1)-delta);
psi*c/(1-l) = w;
c+i = y;
y = (k(-1)^alpha)*(exp(z)*l)^(1-alpha);
w = y*((epsilon-1)/epsilon)*(1-alpha)/l;
r = y*((epsilon-1)/epsilon)*alpha/k(-1);
i = k-(1-delta)*k(-1);
y_l= y/l;
z = rho*z(-1)+e;
end;

initval;
k = 9;
c = 0.76;
l = 0.3;
w = 2.07;
r = 0.03;
z = 0;
e = 0;
end;
steady;


varobs y;

estimated_params;
alpha, beta_pdf, 0.35, 0.02;
beta, beta_pdf, 0.99, 0.002;
delta, beta_pdf, 0.025, 0.003;
psi, gamma_pdf, 1.75, 0.1;
rho, beta_pdf, 0.95, 0.05;
epsilon, gamma_pdf, 10, 0.5;
stderr e, inv_gamma_pdf, 0.01, inf;
end;

estimation(datafile=y,mh_replic=2000,mh_nblocks=5,mh_drop=0.45,mh_jscale=0.8, mode_compute=4);


the error that I obtain


??? Error using ==> read_variables at 58
Can't find datafile: y.{m,mat,xls,xlsx}


Error in ==> initialize_dataset at 31
rawdata = read_variables(datafile,varobs,[],xls.sheet,xls.range);

Error in ==> dynare_estimation_init at 347
dataset_ = initialize_dataset(options_.datafile,options_.varobs,options_.first_obs,options_.nobs,transformation,options_.prefilter,xls);

Error in ==> dynare_estimation_1 at 59
[dataset_,xparam1, M_, options_, oo_, estim_params_,bayestopt_] = dynare_estimation_init(var_list_, dname, [], M_, options_, oo_, estim_params_, bayestopt_);

Error in ==> dynare_estimation at 70
dynare_estimation_1(var_list,dname);

Error in ==> exampleuserguide at 152
dynare_estimation(var_list_);

Error in ==> dynare at 120
evalin('base',fname) ;
Attachments
data.m
(1.24 KiB) Downloaded 77 times
selima
 
Posts: 46
Joined: Thu Jan 10, 2013 5:13 pm

Re: can't obtain the posterior distribution

Postby jpfeifer » Tue Jan 15, 2013 8:20 pm

Your code is wrong. You have to provide the name of the data-file (which is not y.m) after
Code: Select all
datafile=
Moreover, never name your data-file data.m
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 7 guests