From pgilbert at bank-banque-canada.ca  Mon Sep  8 18:07:02 2003
From: pgilbert at bank-banque-canada.ca (Paul Gilbert)
Date: Mon Sep  8 23:07:25 2003
Subject: [Rd] pacf lags
In-Reply-To: <3F5CCB41.6040507@bank-banque-canada.ca>
References: <3F5CC042.9010703@bank-banque-canada.ca>
	<3F5CCB41.6040507@bank-banque-canada.ca>
Message-ID: <3F5CEF76.4080909@bank-banque-canada.ca>

Looking even more carefully, it seems both sampleT and the lag.max 
correction for nser need to be fixed:

    sampleT <- if (is.matrix(x)) nrow(x) else length(x)
    if (is.null(lag.max)) lag.max <- floor(10 * 
             (log10(sampleT) - if (is.matrix(x)) log10(ncol(x)) else 0))


Paul Gilbert

Paul Gilbert wrote:

> On further examination, it looks like
>  sampleT <- length(x)
> in pacf.default is not handling the matrix case properly and probably 
> needs to be replaced by something like
>  sampleT <- if (is.matrix(x)) nrow(x) else length(x)
>
> Paul Gilbert
> Paul Gilbert wrote:
>
>> pacf  in  devel seems by default to return a different number of lags 
>> than 1.7.1 for  $pacf. I don't see any mention of this in the NEWS 
>> file, or any change in the documentation,  so I suspect it is and 
>> error, though it may be an undocumented improvement.
>>
>> (Newbie question:  How is the simplest way to display a function like 
>> pacf.default that is not exported from a namespace?)
>>
>> Paul Gilbert
>>
>> ______________________________________________
>> R-devel@stat.math.ethz.ch mailing list
>> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
>>
>


[Rd] pacf lags
Paul Gilbert