gls(nlme)
gls()所属R语言包:nlme
Fit Linear Model Using Generalized Least Squares
使用广义最小二乘拟合线性模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function fits a linear model using generalized least squares. The errors are allowed to be correlated and/or have unequal variances.
此功能适合使用广义最小二乘线性模型。允许相关的错误和/或有不平等的差异。
用法----------Usage----------
gls(model, data, correlation, weights, subset, method, na.action,
control, verbose)
## S3 method for class 'gls'
update(object, model., ..., evaluate = TRUE)
参数----------Arguments----------
参数:object
an object inheriting from class gls, representing a generalized least squares fitted linear model.
从类继承的对象gls,较广义最小二乘拟合线性模型。
参数:model
a two-sided linear formula object describing the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right.
两个片面的线性公式对象描述模型与~运营商和条件+运营商的权利,分离,左侧的响应。
参数:model.
Changes to the model – see update.formula for details.
该模型的变化 - 看到update.formula详情。
参数:data
an optional data frame containing the variables named in model, correlation, weights, and subset. By default the variables are taken from the environment from which gls is called.
一个可选的数据框包含model命名的变量,correlation,weights,subset。默认情况下,从gls被称为环境变量。
参数:correlation
an optional corStruct object describing the within-group correlation structure. See the documentation of corClasses for a description of the available corStruct classes. If a grouping variable is to be used, it must be specified in the form argument to the corStruct constructor. Defaults to NULL, corresponding to uncorrelated errors.
一个可选的corStruct对象,它描述的组内相关结构。可用corClasses类的描述,请参阅文件corStruct。如果是用于分组变量,它必须在form参数指定corStruct构造。默认NULL,相应的互不相关的错误。
参数:weights
an optional varFunc object or one-sided formula describing the within-group heteroscedasticity structure. If given as a formula, it is used as the argument to varFixed, corresponding to fixed variance weights. See the documentation on varClasses for a description of the available varFunc classes. Defaults to NULL, corresponding to homoscedastic errors.
一个可选的varFunc对象或片面的公式描述组内异方差结构。如果给出一个公式,它是用来作为的varFixed,相应的固定方差权重的参数。可用varClasses类的描述,请参阅文件varFunc。 NULL默认值,相应的同方差错误。
参数:subset
an optional expression indicating which subset of the rows of data should be used in the fit. This can be a logical vector, or a numeric vector indicating which observation numbers are to be included, or a character vector of the row names to be included. All observations are included by default.
一个可选的表达式的行子集data应在适合使用。这可以是一个逻辑向量,或一个数字的向量,被列入观察数字或字符向量的行名被列入。所有的意见,包括默认情况下。
参数:method
a character string. If "REML" the model is fit by maximizing the restricted log-likelihood. If "ML" the log-likelihood is maximized. Defaults to "REML".
一个字符串。如果"REML"模型适合最大限度地限制日志的可能性。如果"ML"日志的可能性最大化。 "REML"默认。
参数:na.action
a function that indicates what should happen when the data contain NAs. The default action (na.fail) causes gls to print an error message and terminate if there are any incomplete observations.
一个函数,它表示数据时,包含NA的,应该发生什么。默认动作(na.fail)导致gls打印一个错误消息并终止,如果有任何不完整的意见。
参数:control
a list of control values for the estimation algorithm to replace the default values returned by the function glsControl. Defaults to an empty list.
估计算法的控制值的列表来替换默认的返回值的函数glsControl。默认为一个空列表。
参数:verbose
an optional logical value. If TRUE information on the evolution of the iterative algorithm is printed. Default is FALSE.
一个可选的逻辑值。如果TRUE迭代算法打印演化的信息。默认FALSE。
参数:...
some methods for this generic require additional arguments. None are used in this method.
这个通用的一些方法需要额外的参数。没有使用这种方法。
参数:evaluate
If TRUE evaluate the new call else return the call.
如果TRUE评估新的呼叫,否则返回通话。
值----------Value----------
an object of class gls representing the linear model fit. Generic functions such as print, plot, and summary have methods to show the results of the fit. See glsObject for the components of the fit. The functions resid, coef, and fitted can be used to extract some of its components.
类gls代表线性模型拟合的对象。通用功能,如print,plot,summary有方法来显示合适的结果。看到glsObject适合的组成部分。职能resid,coef,fitted可以用来提取其组成部分。
作者(S)----------Author(s)----------
Jose Pinheiro and Douglas Bates <a href="mailto:bates@stat.wisc.edu">bates@stat.wisc.edu</a>
参考文献----------References----------
<code>correlation</code> argument are described in Box, G.E.P., Jenkins, G.M., and Reinsel G.C. (1994), Littel, R.C., Milliken, G.A., Stroup, W.W., and Wolfinger, R.D. (1996), and Venables, W.N. and Ripley, B.D. (1997). The use of variance functions for linear and nonlinear models is presented in detail in Carroll, R.J. and Ruppert, D. (1988) and Davidian, M. and Giltinan, D.M. (1995).
Analysis: Forecasting and Control", 3rd Edition, Holden-Day.
Regression", Chapman and Hall.
for Repeated Measurement Data", Chapman and Hall.
"SAS Systems for Mixed Models", SAS Institute.
in S and S-PLUS", Springer, esp. pp. 100, 461.
S-PLUS", 2nd Edition, Springer-Verlag.
参见----------See Also----------
corClasses, glsControl, glsObject, glsStruct, plot.gls, predict.gls, qqnorm.gls, residuals.gls, summary.gls, varClasses, varFunc
corClasses,glsControl,glsObject,glsStruct,plot.gls,predict.gls,qqnorm.gls,residuals.gls,summary.gls,varClasses,varFunc
举例----------Examples----------
# AR(1) errors within each Mare[AR(1)在每个Mare的错误]
fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
correlation = corAR1(form = ~ 1 | Mare))
# variance increases as a power of the absolute fitted values[作为权力的绝对拟合值的差异增加]
fm2 <- update(fm1, weights = varPower())
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|