Unrecognized function or variable 'arma'

4 vues (au cours des 30 derniers jours)
Michal Kalowski
Michal Kalowski le 26 Avr 2023
Commenté : Michal Kalowski le 27 Avr 2023
A code snippet:
% Input data
X = dY;
% BIC cost for different combinations of p and q
bic = zeros(2,2);
for p = 1:2
for q = 1:2
[theta,~,logl,~] = arma(X,p,q,0);
k = (p+q+1)*numel(X);
bic(p,q) = -2*logl + k*log(numel(X));
end
end
After running the program, it shows the message:
"Unrecognized function or variable 'arma'."
What could be the cause of this problem?

Réponse acceptée

Dyuman Joshi
Dyuman Joshi le 26 Avr 2023
Déplacé(e) : Image Analyst le 26 Avr 2023
Given the syntax used, arma is a function, but it is not an inbuilt function.
Do you have a function defined as arma? If yes, is it in the current directory? If no, well, then you need to define arma(), before using it.
  4 commentaires
Dyuman Joshi
Dyuman Joshi le 26 Avr 2023
Which arima? There are 2 such functions arima and arima. Which one did you use? None of the these functions provide 4 outputs as used in the above code (and thus the error).
It seems that you have copied this code from somewhere, which used a user-defined function called arma, which was not provided with the code.
Michal Kalowski
Michal Kalowski le 27 Avr 2023
thanks for the help

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Conditional Mean Models dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by