필터 지우기
필터 지우기

Please expalin the error

조회 수: 3 (최근 30일)
dav
dav 2013년 8월 20일
Hi,
I am using the following code to estimate parameters of an ARCH(1) model.
However, I am getting the given error.
Is there any way to correct it please?
Code:
clc;
clear;
p=1;
T = 1000;
a0 = 0.1; a1 = 0.4;
ra = zeros(T+2000,1);
seed=123;
rng(seed);
%ra = randn(T+2000,1);
ra = trnd(5,T+2000,1);
epsi=zeros(T+2000,1);
simsig=zeros(T+2000,1);
unvar = a0/(1-a1);
for i = 1:T+2000
if (i==1)
simsig(i) = unvar;
s=(simsig(i))^0.5;
epsi(i) = ra(i) * s;
else
simsig(i) = a0+ a1*(epsi(i-1))^2;
s=(simsig(i))^0.5;
epsi(i) = ra(i)* s;
end
end
epsi2 = epsi.^2;
yt = epsi2(2001:T+2000);
model = arima(1,0,0);
model.Constant = 0 ;
fit = estimate( model,yt);
Error:
Undefined function 'arima' for input arguments of type 'double'.
Error in test (line 41)
model = arima(1,0,0);

채택된 답변

Walter Roberson
Walter Roberson 2013년 8월 20일
  1. you might not have the econ toolbox installed
  2. you might not have the econ toolbox licensed
  3. you might be using a version of MATLAB older than when the arima function was first implemented
  4. you might have a broken MATLAB path that does not include the econ toolbox
  댓글 수: 2
dav
dav 2013년 8월 20일
Thank you very much. I s there a way to check if I have the econ toolbox?
Im using matlab 2012a
Walter Roberson
Walter Roberson 2013년 8월 20일
At the MATLAB command prompt, give the command
ver
and see if econ is listed. If it is, check license issues by using
which -all arima
arima() did exist in the Econometrics toolbox for R2012a. Additional arima functionality was added in R2012b and R2013a, but that would not affect the existence of arima() itself.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Range and Doppler Estimation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by