nlme(nlme)
nlme()所属R语言包:nlme
Nonlinear Mixed-Effects Models
非线性混合效应模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This generic function fits a nonlinear mixed-effects model in the formulation described in Lindstrom and Bates (1990) but allowing for nested random effects. The within-group errors are allowed to be correlated and/or have unequal variances.
这个通用的功能,适合在制定非线性混合效应模型所描述的林德斯特罗姆和贝茨(1990),但允许嵌套的随机效果。允许相关组内的错误和/或有不平等的差异。
用法----------Usage----------
nlme(model, data, fixed, random, groups, start, correlation, weights,
subset, method, na.action, naPattern, control, verbose)
参数----------Arguments----------
参数:model
a nonlinear model formula, with the response on the left of a ~ operator and an expression involving parameters and covariates on the right, or an nlsList object. If data is given, all names used in the formula should be defined as parameters or variables in the data frame. The method function nlme.nlsList is documented separately.
非线性模型公式响应~操作符和表达式涉及的权利,或nlsList对象的参数和协变量的左侧。 data如果,在公式中使用的所有名称应定义为数据框中的参数或变量。该方法的功能nlme.nlsList分开记录。
参数:data
an optional data frame containing the variables named in model, fixed, random, correlation, weights, subset, and naPattern. By default the variables are taken from the environment from which nlme is called.
一个可选的数据框包含model命名的变量,fixed,random,correlation,weights,subset,naPattern 。默认情况下,从nlme被称为环境变量。
参数:fixed
a two-sided linear formula of the form f1+...+fn~x1+...+xm, or a list of two-sided formulas of the form f1~x1+...+xm, with possibly different models for different parameters. The f1,...,fn are the names of parameters included on the right hand side of model and the x1+...+xm expressions define linear models for these parameters (when the left hand side of the formula contains several parameters, they all are assumed to follow the same linear model, described by the right hand side expression). A 1 on the right hand side of the formula(s) indicates a single fixed effects for the corresponding parameter(s).
两个片面的线性公式形式f1+...+fn~x1+...+xm,或双面形式f1~x1+...+xm可能不同型号,不同的参数,公式列表。 f1,...,fn是在右侧的参数包括名称model和x1+...+xm表达式定义这些参数的线性模型(公式的左侧包含几个参数时,他们都认为,遵循相同的线性模型,右边表达式描述)。一个1(S)的公式右边显示相应的参数(S)的一个单一的固定效果。
参数:random
optionally, any of the following: (i) a two-sided formula of the form r1+...+rn~x1+...+xm | g1/.../gQ, with r1,...,rn naming parameters included on the right hand side of model, x1+...+xm specifying the random-effects model for these parameters and g1/.../gQ the grouping structure (Q may be equal to 1, in which case no / is required). The random effects formula will be repeated for all levels of grouping, in the case of multiple levels of grouping; (ii) a two-sided formula of the form r1+...+rn~x1+..+xm, a list of two-sided formulas of the form r1~x1+...+xm, with possibly different random-effects models for different parameters, a pdMat object with a two-sided formula, or list of two-sided formulas (i.e. a non-NULL value for formula(random)), or a list of pdMat objects with two-sided formulas, or lists of two-sided formulas. In this case, the grouping structure formula will be given in groups, or derived from the data used to fit the nonlinear mixed-effects model, which should inherit from class groupedData,; (iii) a named list of formulas, lists of formulas, or pdMat objects as in (ii), with the grouping factors as names. The order of nesting will be assumed the same as the order of the order of the elements in the list; (iv) an reStruct object. See the documentation on pdClasses for a description of the available pdMat classes. Defaults to fixed, resulting in all fixed effects having also random effects.
可选以下任:(一)双面公式的形式r1+...+rn~x1+...+xm | g1/.../gQ,r1,...,rn上model右侧命名参数,x1+...+xm这些参数指定的随机效应模型和g1/.../gQ分组结构(Q可能等于1,在这种情况下,没有/需要)。随机效应的公式将重复所有级别的分组,在分组的多层次的情况下;(ii)一个双面公式的形式r1+...+rn~x1+..+xm,双面公式的形式 r1~x1+...+xm,可能有不同的随机效应模型不同的参数,pdMat用双面公式的对象,或列表的双面公式(即非NULL价值 formula(random)),或与双面公式,或双面公式列表pdMat对象的名单。在这种情况下,分组结构公式将在groups,或使用适合非线性混合效应模型中的数据的,它应该从类继承groupedData;(三)一个名为公式的公式,列表,或(ii)中的pdMat对象的名单,作为名称的分组因素。嵌套的顺序将被假定为顺序列表中的元素的顺序相同;(四)reStruct的对象。可用pdClasses类的描述,请参阅文件pdMat。的fixed,导致所有固定效应,随机效应也默认。
参数:groups
an optional one-sided formula of the form ~g1 (single level of nesting) or ~g1/.../gQ (multiple levels of nesting), specifying the partitions of the data over which the random effects vary. g1,...,gQ must evaluate to factors in data. The order of nesting, when multiple levels are present, is taken from left to right (i.e. g1 is the first level, g2 the second, etc.).
可选片面公式的形式~g1(单级嵌套)或~g1/.../gQ(多层次的嵌套),指定的随机效应不同的数据分区。 g1,...,gQ必须评估在data因素。嵌套的顺序,多层次,采取从左至右(即g1是一级g2第二,等)。
参数:start
an optional numeric vector, or list of initial estimates for the fixed effects and random effects. If declared as a numeric vector, it is converted internally to a list with a single component fixed, given by the vector. The fixed component is required, unless the model function inherits from class selfStart, in which case initial values will be derived from a call to nlsList. An optional random component is used to specify initial values for the random effects and should consist of a matrix, or a list of matrices with length equal to the number of grouping levels. Each matrix should have as many rows as the number of groups at the corresponding level and as many columns as the number of random effects in that level.
一个可选的数字向量,或固定效应和随机效应的初步估计。如果声明为一个数值向量,它被转换成内部列表一个组件fixed向量。 fixed组件是必需的,除非该模型的功能从类继承selfStart,在这种情况下,初始值将被从调用nlsList派生。一个可选的random组件用于指定初始值的随机效应,并应组成一个矩阵,或等于分组级别的数量与长度的矩阵列表。每个矩阵应该有许多行,如在相应级别的群体数量,并在该级别中随机效应的多列。
参数:correlation
an optional corStruct object describing the within-group correlation structure. See the documentation of corClasses for a description of the available corStruct classes. Defaults to NULL, corresponding to no within-group correlations.
一个可选的corStruct对象,它描述的组内相关结构。可用corClasses类的描述,请参阅文件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 within-group errors.
一个可选的varFunc对象或片面的公式描述组内异方差结构。如果给出一个公式,它是用来作为的varFixed,相应的固定方差权重的参数。可用varClasses类的描述,请参阅文件varFunc。默认NULL,对应于同方差组内的错误。
参数:subset
an optional expression indicating the subset of the rows of data that 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 "ML".
一个字符串。如果"REML"模型适合最大限度地限制日志的可能性。如果"ML"日志的可能性最大化。 "ML"默认。
参数:na.action
a function that indicates what should happen when the data contain NAs. The default action (na.fail) causes nlme to print an error message and terminate if there are any incomplete observations.
一个函数,它表示数据时,包含NA的,应该发生什么。默认动作(na.fail)导致nlme打印一个错误消息并终止,如果有任何不完整的意见。
参数:naPattern
an expression or formula object, specifying which returned values are to be regarded as missing.
表达或公式对象,指定返回值将被视为失踪。
参数:control
a list of control values for the estimation algorithm to replace the default values returned by the function nlmeControl. Defaults to an empty list.
估计算法的控制值的列表来替换默认的返回值的函数nlmeControl。默认为一个空列表。
参数:verbose
an optional logical value. If TRUE information on the evolution of the iterative algorithm is printed. Default is FALSE.
一个可选的逻辑值。如果TRUE迭代算法打印演化的信息。默认FALSE。
值----------Value----------
an object of class nlme representing the nonlinear mixed-effects model fit. Generic functions such as print, plot and summary have methods to show the results of the fit. See nlmeObject for the components of the fit. The functions resid, coef, fitted, fixed.effects, and random.effects can be used to extract some of its components.
一个类的对象nlme代表的非线性混合效应模型拟合。通用功能,如print,plot和summary方法来显示合适的结果。看到nlmeObject适合的组成部分。职能resid,coef,fitted,fixed.effects,random.effects可以用来提取其组成部分。
作者(S)----------Author(s)----------
Jose Pinheiro and Douglas Bates <a href="mailto:bates@stat.wisc.edu">bates@stat.wisc.edu</a>
参考文献----------References----------
Lindstrom, M.J. and Bates, D.M. (1990). The variance-covariance parametrizations are described in Pinheiro, J.C. and Bates., D.M. (1996). The different correlation structures available for the <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 mixed effects models is presented in detail in Davidian, M. and Giltinan, D.M. (1995).
Analysis: Forecasting and Control", 3rd Edition, Holden-Day.
for Repeated Measurement Data", Chapman and Hall.
Longitudinal Data", Biometrics, 38, 963-974.
"SAS Systems for Mixed Models", SAS Institute.
for Repeated Measures Data", Biometrics, 46, 673-687.
Parametrizations for Variance-Covariance Matrices", Statistics and Computing, 6, 289-296.
in S and S-PLUS", Springer.
S-plus", 2nd Edition, Springer-Verlag.
参见----------See Also----------
nlmeControl, nlme.nlsList, nlmeObject, nlsList, nlmeStruct, pdClasses, reStruct, varFunc, corClasses, varClasses
nlmeControl,nlme.nlsList,nlmeObject,nlsList,nlmeStruct,pdClasses,reStruct,varFunc,corClasses,varClasses
举例----------Examples----------
fm1 <- nlme(height ~ SSasymp(age, Asym, R0, lrc),
data = Loblolly,
fixed = Asym + R0 + lrc ~ 1,
random = Asym ~ 1,
start = c(Asym = 103, R0 = -8.5, lrc = -3.3))
summary(fm1)
fm2 <- update(fm1, random = pdDiag(Asym + lrc ~ 1))
summary(fm2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|