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

R语言 mgcv包 gam.control()函数中文帮助文档(中英文对照)

  [复制链接]
发表于 2012-9-23 10:24:29 | 显示全部楼层 |阅读模式
gam.control(mgcv)
gam.control()所属R语言包:mgcv

                                        Setting GAM fitting defaults
                                         设置GAM配件默认

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

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

This is an internal function of package mgcv which allows  control of the numerical options for fitting a GAM.  Typically users will want to modify the defaults if model fitting fails to converge, or if the warnings are generated which suggest a  loss of numerical stability during fitting.  To change the default choise of fitting method, see gam arguments method and optimizer.
这是一个内部函数,包mgcv的数值选项,它允许控制装置GAM。通常,用户将需要修改的默认值,如果模型拟合收敛失败,或者产生的警告建议在装修损失的数值稳定性。要更改默认的choise的拟合方法,请参阅gam参数method和optimizer。


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


gam.control(irls.reg=0.0,epsilon = 1e-06, maxit = 100,
            mgcv.tol=1e-7,mgcv.half=15, trace = FALSE,
            rank.tol=.Machine$double.eps^0.5,
            nlm=list(),optim=list(),newton=list(),
            outerPIsteps=0,idLinksBases=TRUE,scalePenalty=TRUE,
            keepData=FALSE)



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

参数:irls.reg
For most models this should be 0. The iteratively re-weighted least squares method by which GAMs are fitted  can fail to converge in some circumstances. For example, data with many zeroes can cause  problems in a model with a log link, because a mean of zero corresponds to an infinite range of linear predictor  values. Such convergence problems are caused by a fundamental lack of identifiability, but do not show up as  lack of identifiability in the penalized linear model problems that have to be solved at each stage of iteration. In such circumstances it is possible to apply a ridge regression penalty to the model to impose identifiability, and  irls.reg is the size of the penalty.  
对于大多数型号,这应该是0。迭代重加权最小二乘方法,通过它的GAMS都配在某些情况下可能无法收敛。例如,有许多的零的数据可以用一个log连结在一个模型中会导致问题,因为零平均值对应于一个无限的范围内的线性预测值。这样的衔接问题是由于缺乏基本的可识别性,但并不表明缺乏可辨识惩罚的线性模型的问题,必须解决在每个阶段的迭代。在这种情况下,它是可能的应用岭回归处罚,征收可识别的模型,和irls.reg的大小的罚款。


参数:epsilon
This is used for judging conversion of the GLM IRLS loop in gam.fit or gam.fit3.
这是用来判断在gam.fit或gam.fit3的GLM IRLS循环转换。


参数:maxit
Maximum number of IRLS iterations to perform.
IRLS迭代来执行的最大数量。


参数:mgcv.tol
The convergence tolerance parameter to use in GCV/UBRE optimization.
收敛公差参数,使用GCV / UBRE优化。


参数:mgcv.half
If a step of  the GCV/UBRE optimization method leads  to a worse GCV/UBRE score, then the step length is halved. This is the number of halvings to try before giving up.
如果GCV / UBRE优化方法的步骤导致更坏的丙氧鸟苷(GCV)/ UBRE得分,然后步长被减半。这是在放弃之前的halvings尝试。


参数:trace
Set this to TRUE to turn on diagnostic output.
这TRUE打开诊断输出。


参数:rank.tol
The tolerance used to estimate the rank of the fitting problem.
的公差估计排名的拟合问题。


参数:nlm
list of control parameters to pass to nlm if this is used for outer estimation of smoothing parameters (not default). See details.
控制参数列表传递给nlm“”如果这是用于外估计的平滑参数(默认)。查看详细信息。


参数:optim
list of control parameters to pass to optim if this is used for outer estimation of smoothing parameters (not default). See details.
控制参数列表传递给optim“”如果这是用于外估计的平滑参数(默认)。查看详细信息。


参数:newton
list of control parameters to pass to default Newton optimizer used for outer estimation of log smoothing parameters. See details.
控制参数列表传递给缺省的牛顿优化器使用的log平滑参数估计外。查看详细信息。


参数:outerPIsteps
The number of performance interation steps used to initialize outer iteration.
用于初始化外部循环的性能交互作用的步骤。


参数:idLinksBases
If smooth terms have their smoothing parameters linked via  the id mechanism (see s), should they also have the same  bases. Set this to FALSE only if you are sure you know what you are doing  (you should almost surely set scalePenalty to FALSE as well in this  case).
如果顺利通过id机制(见s),他们应该也有相同的基相连的平滑参数。设置为FALSE,“只有当你确定你知道你在做什么(几乎可以肯定,你应该设置scalePenalty到FALSE,以及在这种情况下)。


参数:scalePenalty
gamm is somewhat sensitive to the absolute scaling  of the penalty matrices of a smooth relative to its model matrix. This option rescales  the penalty matrices to accomodate this problem. Probably should be set to FALSE  if you are linking smoothing parameters but have set idLinkBases to FALSE.
gamm是有点敏感的罚款矩阵模型矩阵的平稳相对于绝对的比例。此选项可重新调整的处罚矩阵,以适应这个问题。应该设置成FALSE如果您链接的平滑参数,但设置idLinkBases到FALSE。


参数:keepData
Should a copy of the original data argument be kept in the gam  object? Strict compatibility with class glm would keep it, but it wastes space to do so.  
应该保持原data参数的副本在gam对象?严格的兼容性与类glm保持它,但它浪费空间,这样做。


Details

详细信息----------Details----------

Outer iteration using newton is controlled by the list newton with the following elements: conv.tol (default 1e-6) is the relative convergence tolerance; maxNstep is the maximum length allowed for an element of the Newton search direction (default 5); maxSstep is the maximum length allowed for an element of the steepest descent direction (only used if Newton fails - default 2); maxHalf is the maximum number of step halvings to permit before giving up (default 30).
外部循环使用newton控制列表中newton包含下列元素:conv.tol(默认是1e-6)是相对收敛性,“maxNstep是允许的最大长度元素的Newton搜索方向(默认为5),“maxSstep是允许的最大长度为元素的最速下降方向(仅用于如果牛顿失败 - 默认是2); maxHalf是最大的允许在放弃之前(默认为30)步骤halvings数。

If outer iteration using nlm is used for fitting, then the control list nlm stores control arguments for calls to routine nlm. The list has the following named elements: (i) ndigit is the number of significant digits in the GCV/UBRE score - by default this is worked out from epsilon; (ii) gradtol is the tolerance used to judge convergence of the gradient of the GCV/UBRE score to zero - by default set to 10*epsilon; (iii) stepmax is the maximum allowable log smoothing parameter step - defaults to 2; (iv) steptol is the minimum allowable step length - defaults to 1e-4; (v) iterlim is the maximum number of optimization steps allowed - defaults to 200; (vi) check.analyticals indicates whether the built in exact derivative calculations should be checked numerically - defaults to FALSE. Any of these which are not supplied and named in the list are set to their default values.
如果外部循环使用nlm是用于装修,然后控制列表nlm存储控制参数调用常规nlm。列表中有以下内容:(一)ndigit的数量显着位数的GCV / UBRE得分的 - 默认情况下,这是从epsilon;(二)gradtol的宽容是用来判断收敛的GCV / UBRE得分的零梯度 - 默认情况下设置为10*epsilon;(三)stepmax是允许的最大log平滑参数步骤 - 默认为2; (四)steptol是允许的最小步长 - 默认为1E-4(V)iterlim的最大数量是允许的优化步骤 - 默认为200;(六)check.analyticals是否建立在精确的导数计算,应检查数字 - 默认为FALSE。任何不提供这些列表中的姓被设置为它们的默认值。

Outer iteration using optim is controlled using list optim, which currently has one element: factr which takes default value 1e7.
外部循环使用optim控制使用列表optim,目前有一个元素:factr默认值1E7。


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


Simon N. Wood <a href="mailto:simon.wood@r-project.org">simon.wood@r-project.org</a>



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

and marginal likelihood estimation of semiparametric generalized linear  models. Journal of the Royal Statistical Society (B) 73(1):3-36
generalized additive models. J. Amer. Statist. Ass.99:673-686.


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

gam, gam.fit, glm.control
gam,gam.fit,glm.control

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-13 07:21 , Processed in 0.026379 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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