[Rd] pacf lags

Paul Gilbert pgilbert at bank-banque-canada.ca
Mon Sep 8 18:07:02 MEST 2003


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 at stat.math.ethz.ch mailing list
>> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
>>
>



More information about the R-devel mailing list