On Thu, 5 Feb 2009, Sven Schreiber wrote:
Allin Cottrell schrieb:
> On Wed, 4 Feb 2009, Riccardo (Jack) Lucchetti wrote:
>> On Tue, 3 Feb 2009, Allin Cottrell wrote:
>>> It's now implemented in CVS, up to a point. Note that the old CVS
>>> functions acf() and xcf() are gone. We now have one function,
>>> corrgm(). This has the semantics Jack describes. Absent the
>>> third argument, ACF and PACF are combined, in adjacent pairs of
>>> columns in the output matrix. (There's just one pair of columns
>>> in the output if arg1 is a series or column vector, but k >= 1
>>> pairs if arg1 is a general matrix or list.)
>> Two possible (mututally exclusive) refinements: one is implied by the
>> attached patch: when arg1 is multiple, the 2*n columns of the output
>> vector are sorted so that the first n columns contain the ACFs and columns
>> from n+1 to 2*n contain the PACFs. This would make it easier (IMO) to
>> retrieve the results.
> I'm OK with that -- any other reactions?
Yes I think separating ACF and PACF is better, although either would be
fine with me.
I've now made that change in CVS. That is,
for y a list with k members or a matrix with k columns, now gives
a (p x 2k) matrix in which the first k column hold the ACF values
and the remaining columns hold the PACFs.
I was going to say there is no need for [allowing mixing of
matrices and lists as arguments to the XCF variant]. I tend to
think that it somehow would be cleaner programming practice to
not mix series/lists with matrices, and gretl might as well
BTW, if I understand correctly, all the actual calculation code
was already there, so there's no need to worry about the way
missing values are handled, right? But for the mixed
series/matrix case which was not possible before it's not
obvious to me how that would handle missing values.
It's fairly restrictive. Series (including list members) are
taken over the currently defined sample range and it's an error if
there are any missing values in that range. In the case of mixing
of series and matrices, the matrix must have a number of rows
equal to the number of observations in the current sample. Since
matrices cannot contain NAs we're OK in that respect.
(The corrgm command -- as opposed to the corrgm() function -- is
slightly more relaxed, in that it will automatically trim missing
values from the start and/or end of the sample range before