找回密码
 注册
查看: 9847|回复: 0

R语言:acf()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 19:26:08 | 显示全部楼层 |阅读模式
acf(stats)
acf()所属R语言包:stats

                                        Auto- and Cross- Covariance and -Correlation Function Estimation
                                         自动和互协方差和相关函数的估计

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

The function acf computes (and by default plots) estimates of the autocovariance or autocorrelation function.  Function pacf is the function used for the partial autocorrelations.  Function ccf computes the cross-correlation or cross-covariance of two univariate series.
功能acf计算(默认情况下,图)估计自相关或自相关函数。功能pacf是用于偏自相关函数。功能ccf计算两个单变量序列的互相关或交叉协方差。


用法----------Usage----------


acf(x, lag.max = NULL,
    type = c("correlation", "covariance", "partial"),
    plot = TRUE, na.action = na.fail, demean = TRUE, ...)

pacf(x, lag.max, plot, na.action, ...)

## Default S3 method:[默认方法]
pacf(x, lag.max = NULL, plot = TRUE, na.action = na.fail,
    ...)

ccf(x, y, lag.max = NULL, type = c("correlation", "covariance"),
    plot = TRUE, na.action = na.fail, ...)

## S3 method for class 'acf'
x[i, j]



参数----------Arguments----------

参数:x, y
a univariate or multivariate (not ccf) numeric time series object or a numeric vector or matrix, or an "acf" object.
一元或多元(不ccf)数字时间序列对象或一个数值向量或矩阵,或"acf"对象。


参数:lag.max
maximum lag at which to calculate the acf. Default is 10*log10(N/m) where N is the number of observations and m the number of series.  Will be automatically limited to one less than the number of observations in the series.
在计算ACF最大滞后。默认是10*log10(N/m)N的若干意见和m的序列号。将自动限制一个小于一系列观测的数量。


参数:type
character string giving the type of acf to be computed. Allowed values are "correlation" (the default), "covariance" or "partial".
计算ACF类型的字符串。允许的值是"correlation"(默认),"covariance"或"partial"。


参数:plot
logical. If TRUE (the default) the acf is plotted.
逻辑。如果TRUE(默认)的ACF绘制。


参数:na.action
function to be called to handle missing values. na.pass can be used.
函数被调用来处理缺失值。 na.pass可以使用。


参数:demean
logical.  Should the covariances be about the sample means?
逻辑。应该是方差有关样本手段?


参数:...
further arguments to be passed to plot.acf.
进一步的参数被传递到plot.acf。


参数:i
a set of lags (time differences) to retain.
一套的滞后(时间差)保留。


参数:j
a set of series (names or numbers) to retain.
一系列集(名称或号码)保留。


Details

详情----------Details----------

For type = "correlation" and "covariance", the estimates are based on the sample covariance. (The lag 0 autocorrelation is fixed at 1 by convention.)
type="correlation"和"covariance",估计是基于对样本协方差。 (0滞后自相关是固定的约定。1)

By default, no missing values are allowed.  If the na.action function passes through missing values (as na.pass does), the covariances are computed from the complete cases.  This means that the estimate computed may well not be a valid autocorrelation sequence, and may contain missing values.  Missing values are not allowed when computing the PACF of a multivariate time series.
默认情况下,没有遗漏值是不允许的。如果na.action函数通过传递遗漏值(na.pass不),从完整的情况下,计算协方差。这意味着计算,估计可能不是一个有效的自相关序列,并可能包含缺失值。当计算一个多变量时间序列的PACF不允许遗漏值。

The partial correlation coefficient is estimated by fitting autoregressive models of successively higher orders up to lag.max.
偏相关系数估计自回归模型拟合先后更高的订单lag.max。

The generic function plot has a method for objects of class "acf".
通用函数plot类"acf"对象的方法。

The lag is returned and plotted in units of time, and not numbers of observations.
返回的滞后,并绘制在单位时间内,而不是数字和观测。

There are print and subsetting methods for objects of class "acf".
有print“子集类对象"acf"方法。


值----------Value----------

An object of class "acf", which is a list with the following elements:
一个类的对象"acf",这是一个包含下列元素的列表:


参数:lag
A three dimensional array containing the lags at which the acf is estimated.
三维数组包含在ACF的估计滞后。


参数:acf
An array with the same dimensions as lag containing the estimated acf.
lag估计包含ACF尺寸相同的数组。


参数:type
The type of correlation (same as the type argument).
相关类型(一样type参数)。


参数:n.used
The number of observations in the time series.
在时间序列观测。


参数:series
The name of the series x.
名称系列x。


参数:snames
The series names for a multivariate time series.
多元时间序列的系列名称。

The lag k value returned by ccf(x,y) estimates the correlation between x[t+k] and y[t].
滞后k值ccf(x,y)返回估计x[t+k]和y[t]之间的相关性。

The result is returned invisibly if plot is TRUE.
返回无形如果plot是TRUE的结果。


作者(S)----------Author(s)----------



Original: Paul Gilbert, Martyn Plummer.
Extensive modifications and univariate case of <code>pacf</code> by
B. D. Ripley.




参考文献----------References----------

Modern Applied Statistics with S.  Fourth Edition. Springer-Verlag.


参见----------See Also----------

plot.acf, ARMAacf for the exact autocorrelations of a given ARMA process.
plot.acf,ARMAacf一个给定的ARMA过程的确切自相关。


举例----------Examples----------


require(graphics)

## Examples from Venables &amp; Ripley[#例如从维纳布尔斯和里普利]
acf(lh)
acf(lh, type = "covariance")
pacf(lh)

acf(ldeaths)
acf(ldeaths, ci.type = "ma")
acf(ts.union(mdeaths, fdeaths))
ccf(mdeaths, fdeaths, ylab = "cross-correlation")
# (just the cross-correlations)[(只是交叉关联)]

presidents # contains missing values[包含缺失值]
acf(presidents, na.action = na.pass)
pacf(presidents, na.action = na.pass)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-1-24 13:33 , Processed in 0.022408 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表