BETAINV did not converge

I am completely new to Dynare so I am having a few troubles using it. I am getting the following errors:

You did not declare endogenous variables after the estimation command.
Warning: BETAINV did not converge for a = 23.5125, b = 0.2375, p = 0.999.

In betainv at 109
In draw_prior_density at 47
In plot_priors at 101
In dynare_estimation_init at 125
In dynare_estimation_1 at 37
In dynare_estimation at 62
In herrera1a at 387
In dynare at 132
Warning: BETAINV did not converge for a = 23.5125, b = 0.2375, p = 1.
In betainv at 109
In prior_bounds at 50
In dynare_estimation_init at 128
In dynare_estimation_1 at 37
In dynare_estimation at 62
In herrera1a at 387
In dynare at 132
??? Error using ==> eval
Undefined function or variable ‘simudata’.

Error in ==> read_variables at 50
eval(dyn_instr_01);

Error in ==> dynare_estimation_init at 286
rawdata = read_variables(options_.datafile,options_.varobs,],options_.xls_sheet,options_.xls_range);

Error in ==> dynare_estimation_1 at 37
[data,rawdata,xparam1] = dynare_estimation_init(var_list_);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> herrera1a at 387
dynare_estimation(var_list_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;

Why am I getting all these errors?

For starters ignore the first warnings. They are not errors. Apparently, there is a problem with some beta priors like mean and standard deviation are inconsistent. The true problem is your combination of the varobs command and your data-file. However, without the mod- and the data-file it is impossible to tell what is going on.

Thank you.now the error that I am getting says:
POSTERIOR KERNEL OPTIMIZATION PROBLEM!
(minus) the hessian matrix at the “mode” is not positive definite!
=> posterior variance of the estimated parameters are not positive.
You should try to change the initial values of the parameters using
the estimated_params_init block, or use another optimization routine.
Warning: The results below are most likely wrong!

In dynare_estimation_1 at 436
In dynare_estimation at 62
In herrera1a at 377
In dynare at 132

RESULTS FROM POSTERIOR MAXIMIZATION
parameters
prior mean mode s.d. t-stat prior pstdev

beta 0.990 1.0000 0.0000 0.0000 beta 0.0200
lambda 1.005 1.0048 0.0200 50.1983 norm 0.0200
phi_y 0.330 0.3258 0.0200 16.3133 norm 0.0200
nu_y 1.500 1.5066 0.0189 79.7143 norm 0.0200
chi_y 0.100 0.0983 0.0199 4.9308 norm 0.0200
nu_z 1.500 1.5003 0.0199 75.3943 norm 0.0200
chi_z 0.100 0.0999 0.0200 5.0021 norm 0.0200
eta 2.000 2.0005 0.0200 100.0699 norm 0.0200
gam_y 0.900 0.9006 0.0200 45.0159 norm 0.0200
gam_z 0.900 0.9000 0.0200 45.0015 norm 0.0200
rho_r 0.900 0.7904 0.0117 67.6765 norm 0.0200
phi_pi 2.150 2.1581 0.0201 107.5753 norm 0.0200
phi_s 0.500 0.5148 0.0195 26.4355 norm 0.0200
eta_y 0.750 0.7500 0.0200 37.5004 norm 0.0200
eta_z 0.750 0.7500 0.0200 37.5004 norm 0.0200
rho_p 0.900 0.9003 0.0203 44.4508 beta 0.0200
rho_q 0.900 0.9002 0.0204 44.0847 beta 0.0200
phi_p 0.500 0.5000 0.0200 24.9401 beta 0.0200
phi_q 0.500 0.5000 0.0200 24.9401 beta 0.0200
rho_y 0.950 0.9257 0.0163 56.6648 beta 0.0200
rho_z 0.950 0.9511 0.0193 49.3725 beta 0.0200
rho_g 0.900 0.9012 0.0202 44.5179 beta 0.0200
rho_xi 0.900 0.8657 0.0078 110.9319 beta 0.0200
rho_er 0.900 0.8115 0.0373 21.7486 beta 0.0200

Log data density [Laplace approximation] is -2320.328786.

Warning: BETAINV did not converge for a = 23.5125, b = 0.2375, p = 1.

In betainv at 109
In prior_bounds at 50
In dynare_estimation_1 at 852
In dynare_estimation at 62
In herrera1a at 377
In dynare at 132
??? Error using ==> chol
Matrix must be positive definite.

Error in ==> metropolis_hastings_initialization at 52
d = chol(vv);

Error in ==> random_walk_metropolis_hastings at 58
ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck, nruns, NewFile, MAX_nruns, d ] = …

Error in ==> dynare_estimation_1 at 871
feval(options_.posterior_sampling_method,‘DsgeLikelihood’,options_.proposal_distribution,xparam1,invhess,bounds,gend,data,…

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> herrera1a at 377
dynare_estimation(var_list_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;

Please search the forum, this is one of the most common threads. A short answer is: Try using mode_compute=6 in the estimation command.