# How is aicbic or other matlab function used to find the AR order of specific data?

let us consider following matlab code

help aicbic
aicbic Akaike and Bayesian information criteria

Syntax:

[aic,bic] = aicbic(logL,numParam,numObs)

Description:

Given optimized log-likelihood function values logL obtained by fitting
a model to data, compute the Akaike (AIC) and Bayesian (BIC)
information criteria. Since information criteria penalize models with
additional parameters, aic and bic select models based on both goodness
of fit and parsimony. When using either AIC or BIC, models that
minimize the criteria are preferred.

Input Arguments:

logL - Vector of optimized log-likelihood objective function values
associated with parameter estimates of various models.

numParam - Number of estimated parameters associated with each value
in logL. numParam may be a scalar applied to all values in logL, or a
vector the same length as logL. All elements of numParam must be
positive integers.

Optional Input Argument:

numObs - Sample sizes of the observed data associated with each
value of logL. numObs is required for computing BIC, but not AIC.
numObs may be a scalar applied to all values in logL, or a vector the
same length as logL. All elements numObs must be positive integers.

Output Arguments:

aic - Vector of AIC statistics associated with each logL objective
function value. The AIC statistic is defined as:

aic = -2*logL + 2*numParam

bic - Vector of BIC statistics associated with each logL objective
function value. The BIC statistic is defined as:

bic = -2*logL + numParam*log(numObs)


Let us suppose that we have the data in a matlab vector X.

How do I apply this matlab function (aicbic) to X?

I am trying to find the AR order of the data.

• PLease stop posting your data all over the place. It's not instructive and will not help answer your question. – Peter K. Mar 30 '14 at 17:07
• why?i have posted question 1000 times and always you are answering?can you give me complete answer? or?question is exact right?so i need exact answer – dato datuashvili Mar 30 '14 at 17:35
• i am asking,i have given signal,please help me to choose correct AR order using matlab,is it impossible? – dato datuashvili Mar 30 '14 at 17:37
• Have you tried this? mathworks.nl/help/econ/choose-arma-lags.html – Matt L. Mar 30 '14 at 19:11
• @PeterK. I hope the OP appreciates your time and effort :) – Matt L. Mar 30 '14 at 19:14