ACF.gls(nlme)
ACF.gls()所属R语言包:nlme
Autocorrelation Function for gls Residuals
GLS残差的自相关函数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This method function calculates the empirical autocorrelation function for the residuals from a gls fit. If a grouping variable is specified in form, the autocorrelation values are calculated using pairs of residuals within the same group; otherwise all possible residual pairs are used. The autocorrelation function is useful for investigating serial correlation models for equally spaced data.
这种方法函数计算gls适合的实证残差自相关函数。如果在form指定分组变量,自相关值计算使用同一组内的双残差;否则一切可能的残余对使用。自相关函数是有用的调查等距数据序列相关模型。
用法----------Usage----------
## S3 method for class 'gls'
ACF(object, maxLag, resType, form, na.action, ...)
参数----------Arguments----------
参数:object
an object inheriting from class gls, representing a generalized least squares fitted model.
从类继承的对象gls,较广义最小二乘拟合模型。
参数:maxLag
an optional integer giving the maximum lag for which the autocorrelation should be calculated. Defaults to maximum lag in the residuals.
一个可选的整数,应计算为最大滞后的自相关。默认最大残差滞后。
参数:resType
an optional character string specifying the type of residuals to be used. If "response", the "raw" residuals (observed - fitted) are used; else, if "pearson", the standardized residuals (raw residuals divided by the corresponding standard errors) are used; else, if "normalized", the normalized residuals (standardized residuals pre-multiplied by the inverse square-root factor of the estimated error correlation matrix) are used. Partial matching of arguments is used, so only the first character needs to be provided. Defaults to "pearson".
一个可选的字符串指定要使用的残差类型。如果"response",“原始”的残差(观测 - 拟合);否则,如果"pearson",标准化残差的(原料残差除以相应的标准误差);否则,如果 "normalized",用于归残差(标准化残差估计误差相关矩阵的逆平方根因素预乘)。使用部分匹配的参数,所以才有了第一个字符需要提供。 "pearson"默认。
参数:form
an optional one sided formula of the form ~ t, or ~ t | g, specifying a time covariate t and, optionally, a grouping factor g. The time covariate must be integer valued. When a grouping factor is present in form, the autocorrelations are calculated using residual pairs within the same group. Defaults to ~ 1, which corresponds to using the order of the observations in the data as a covariate, and no groups.
一个可选的双面公式的形式~ t或~ t | g,指定时间协t“,可以选择,分组因素g。协的时间必须是整数值。当一个分组的因素是目前在form,自相关计算使用同一组内的残余对。默认~ 1,这相当于使用秩序的意见作为协变量的数据,并没有组。
参数:na.action
a function that indicates what should happen when the data contain NAs. The default action (na.fail) causes ACF.gls to print an error message and terminate if there are any incomplete observations.
一个函数,它表示数据时,包含NA的,应该发生什么。默认动作(na.fail)导致ACF.gls打印一个错误消息并终止,如果有任何不完整的意见。
参数:...
some methods for this generic require additional arguments.
这个通用的一些方法需要额外的参数。
值----------Value----------
a data frame with columns lag and ACF representing, respectively, the lag between residuals within a pair and the corresponding empirical autocorrelation. The returned value inherits from class ACF.
与列的数据框lag和ACF,分别占内对相应的实证自相关的残差之间的滞后。返回值继承自类ACF。
作者(S)----------Author(s)----------
Jose Pinheiro and Douglas Bates <a href="mailto:bates@stat.wisc.edu">bates@stat.wisc.edu</a>
参考文献----------References----------
Analysis: Forecasting and Control", 3rd Edition, Holden-Day.
in S and S-PLUS", Springer.
参见----------See Also----------
ACF.lme, plot.ACF
ACF.lme,plot.ACF
举例----------Examples----------
fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary)
ACF(fm1, form = ~ 1 | Mare)
# Pinheiro and Bates, p. 255-257[皮涅伊罗和贝茨,P。 255-257]
fm1Dial.gls <- gls(rate ~
(pressure+I(pressure^2)+I(pressure^3)+I(pressure^4))*QB,
Dialyzer)
fm2Dial.gls <- update(fm1Dial.gls,
weights = varPower(form = ~ pressure))
ACF(fm2Dial.gls, form = ~ 1 | Subject)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|