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

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

[复制链接]
发表于 2012-10-1 15:28:24 | 显示全部楼层 |阅读模式
cao.control(VGAM)
cao.control()所属R语言包:VGAM

                                         Control Function for RR-VGAMs (CAO)
                                         控制功能为RR-VGAMs(曹)

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

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

Algorithmic constants and parameters for a constrained additive ordination (CAO), by fitting a reduced-rank vector generalized additive model (RR-VGAM), are set using this function. This is the control function for cao.
算法的常数和参数的约束添加剂协调(CAO),通过拟合降秩向量广义相加模型(RR-VGAM)的设置使用此功能。这是控制功能cao。


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


cao.control(Rank = 1, all.knots = FALSE, criterion = "deviance", Cinit=NULL,
            Crow1positive=TRUE, epsilon = 1.0e-05, Etamat.colmax = 10,
            GradientFunction=FALSE, iKvector = 0.1, iShape = 0.1,
            Norrr = ~ 1, SmallNo = 5.0e-13, Use.Init.Poisson.QO=TRUE,
            Bestof = if (length(Cinit)) 1 else 10, maxitl = 10,
            imethod = 1, bf.epsilon = 1.0e-7, bf.maxit = 10,
            Maxit.optim = 250, optim.maxit = 20, SD.sitescores = 1.0,
            SD.Cinit = 0.02, trace = TRUE, df1.nl = 2.5, df2.nl = 2.5,
            spar1 = 0, spar2 = 0, ...)



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

参数:Rank
The numerical rank R of the model, i.e., the number of latent variables.  Currently only Rank=1 is implemented.  
数值秩R的模式,即潜变量的数量。目前只有Rank=1的实施。


参数:all.knots
Logical indicating if all distinct points of the smoothing variables are to be used as knots.  Assigning the value FALSE means fewer knots are chosen when the number of distinct points is large, meaning less computational expense. See vgam.control for details.  
逻辑表示,如果所有的不同的点的平滑变量被用来作为结。分配的价值FALSE意味着更少节时选择不同的点的数量是大的,这意味着更少的计算费用。见vgam.control的详细信息。


参数:criterion
Convergence criterion. Currently, only one is supported: the deviance is minimized.  
收敛标准。目前,只有一个支持:的越轨最小。


参数:Cinit
Optional initial C matrix which may speed up convergence.  
可选的初始C矩阵这可能会加速收敛。


参数:Crow1positive
Logical vector of length Rank (recycled if necessary): are the elements of the first row of C positive?  For example, if Rank is 4, then specifying Crow1positive=c(FALSE,     TRUE) will force C[1,1] and C[1,3] to be negative, and C[1,2] and C[1,4] to be positive.  
逻辑向量,长度为Rank(再循环:如果必要的话),是C阳性的第一行中的元素?例如,如果Rank是4,然后指定Crow1positive=c(FALSE,     TRUE)将迫使C [1,1]和C [1,3]是消极的,和C [1,2]和C [1,图4是正的。


参数:epsilon
Positive numeric. Used to test for convergence for GLMs fitted in FORTRAN.  Larger values mean a loosening of the convergence criterion.   
正数值。用于收敛GLMS安装在FORTRAN测试。值越大,意味着松动的收敛准则。


参数:Etamat.colmax
Positive integer, no smaller than Rank.  Controls the amount of memory used by .Init.Poisson.QO().  It is the maximum number of columns allowed for the pseudo-response and its weights. In general, the larger the value, the better the initial value. Used only if Use.Init.Poisson.QO=TRUE.  
正整数,不小于Rank。控制使用的内存量的.Init.Poisson.QO()。是允许为伪响应及其权重的列的最大数目。在一般情况下,该值越大,更好的初始值。用只有Use.Init.Poisson.QO=TRUE。


参数:GradientFunction
Logical. Whether optim's argument gr is used or not, i.e., to compute gradient values.  Used only if FastAlgorithm is TRUE.  Currently, this argument must be set to FALSE.  
逻辑。无论optim的说法gr使用与否,即,计算梯度值。使用,只有FastAlgorithm是TRUE。目前,该参数必须设置为FALSE。


参数:iKvector, iShape
See qrrvglm.control.  
见qrrvglm.control。


参数:Norrr
Formula giving terms that are not to be included in the reduced-rank regression (or formation of the latent variables). The default is to omit the intercept term from the latent variables. Currently, only Norrr = ~ 1 is implemented.  
公式给的条款,是不包括在降秩回归(或形成的潜变量)。默认情况下是忽略截距项的潜在变量。目前,仅是Norrr = ~ 1实施。


参数:SmallNo
Positive numeric between .Machine$double.eps and 0.0001. Used to avoid under- or over-flow in the IRLS algorithm.   
正数之间.Machine$double.eps和0.0001。用于避免在IRLS算法不足或过度流动。


参数:Use.Init.Poisson.QO
Logical. If TRUE then the function .Init.Poisson.QO is used to obtain initial values for the canonical coefficients C. If FALSE then random numbers are used instead.  
逻辑。如果TRUE则该函数.Init.Poisson.QO被用来获取为规范的系数C的初始值,如果FALSE然后随机数被代替。


参数:Bestof
Integer. The best of Bestof models fitted is returned. This argument helps guard against local solutions by (hopefully) finding the global solution from many fits. The argument works only when the function generates its own initial value for C, i.e., when C are not passed in as initial values. The default is only a convenient minimal number and users are urged to increase this value.  
整数。 Bestof车型配备最好的返回。此参数有助于防止对本地解决方案(希望)发现许多适合全球性的解决方案。只有当函数生成自己的初始值C,即C不被通过作为初始值的参数。默认情况下是一种既方便最小的数目和用户应增加该值。


参数:maxitl
Positive integer. Maximum number of Newton-Raphson/Fisher-scoring/local-scoring iterations allowed.  
正整数。最大数迭代的Newton-Raphson/Fisher-scoring/local-scoring。


参数:imethod
See qrrvglm.control.  
见qrrvglm.control。


参数:bf.epsilon
Positive numeric. Tolerance used by the modified vector backfitting algorithm for testing convergence.  
正数值。修改后的向量回切测试算法收敛公差。


参数:bf.maxit
Positive integer. Number of backfitting iterations allowed in the compiled code.  
正整数。号码的回切的迭代允许在编译后的代码。


参数:Maxit.optim
Positive integer. Number of iterations given to the function optim at each of the optim.maxit iterations.  
正整数。给函数的迭代数目optim在每个optim.maxit迭代。


参数:optim.maxit
Positive integer. Number of times optim is invoked.   
正整数。次optim数被调用。


参数:SD.sitescores
Numeric. Standard deviation of the initial values of the site scores, which are generated from a normal distribution. Used when Use.Init.Poisson.QO is FALSE.  
数字。的站点的分数,所产生的正常分布的初始值的标准偏差。使用时Use.Init.Poisson.QO是FALSE。


参数:SD.Cinit
Standard deviation of the initial values for the elements of C. These are normally distributed with mean zero. This argument is used only if Use.Init.Poisson.QO = FALSE.     
C.这些元素的初始值的标准偏差的正态分布的均值为零。这种说法是只有Use.Init.Poisson.QO = FALSE。


参数:trace
Logical indicating if output should be produced for each iteration. Having the value TRUE is a good idea for large data sets.  
逻辑表明,如果输出应为每个迭代。具有的价值TRUE的大型数据集是一个好主意。


参数:df1.nl, df2.nl
Numeric and non-negative, recycled to length S. Nonlinear degrees of freedom for smooths of the first and second latent variables. A value of 0 means the smooth is linear.  Roughly, a value between 1.0 and 2.0 often has the approximate flexibility of a quadratic. The user should not assign too large a value to this argument, e.g., the value 4.0 is probably too high.  The argument df1.nl is ignored if spar1 is assigned a positive value or values. Ditto for df2.nl.  
数字和非负,循环长度S.的非线性的自由度平滑的第一和第二潜变量。值为0表示是线性的顺利。粗略地说,1.0和2.0之间的值通常具有的二次近似灵活性。用户不应该指定值过大,这样的说法,例如,值4.0是可能过高。 df1.nl如果被分配了一个积极的价值或价值被忽略的参数spar1。同上,为df2.nl。


参数:spar1, spar2
Numeric and non-negative, recycled to length S. Smoothing parameters of the smooths of the first and second latent variables. The larger the value, the more smooth (less wiggly) the fitted curves. These arguments are an alternative to specifying df1.nl and df2.nl.  A value 0 (the default) for spar1 means that df1.nl is used. Ditto for spar2. The values are on a scaled version of the latent variables. See Green and Silverman (1994) for more information.  
数字和非负,循环长度S.平滑参数的平滑处理的第一和第二潜变量。该值越大,越光滑(减波浪)的拟合曲线。这些参数是替代df1.nl和df2.nl。值0(默认值)spar1意味着df1.nl使用的。同上,为spar2。这些数值是潜变量上的缩放版本。看到绿色和Silverman(1994)的更多信息。


参数:...
Ignored at present.  
目前被忽略。


Details

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

Many of these arguments are identical to qrrvglm.control. Here, R is the Rank, M is the number of additive predictors, and S is the number of responses (species). Thus M=S for binomial and Poisson responses, and M=2S for the negative binomial and 2-parameter gamma distributions.
这些参数是相同qrrvglm.control。在这里,R是Rank,M是多少的添加剂的预测,和S的响应数(种)。因此M=S二项分布和泊松反应的为,和M=2S为负二项分布和参数伽玛分布的。

Allowing the smooths too much flexibility means the CAO optimization problem becomes more difficult to solve. This is because the number of local solutions increases as the nonlinearity of the smooths increases. In situations of high nonlinearity, many initial values should be used, so that Bestof should be assigned a larger value. In general, there should be a reasonable value of df1.nl somewhere between 0 and about 3 for most data sets.
允许平滑太多的灵活性,意味着中航油的优化问题变得更加难以解决。这是因为本地的解决方案的数目增加的非线性平滑增加。在高非线性的情况下,可以使用许多初始值,使Bestof应指定一个较大的值。在一般情况下,应该有一个合理的值df1.nl介于0和大约3为大多数的数据集。


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

A list with the components corresponding to its arguments, after some basic error checking.
列表给它的参数相对应的部件后,一些基本的错误检查。


注意----------Note----------

The argument df1.nl can be inputted in the format c(spp1=2,   spp2=3, 2.5), say, meaning the default value is 2.5, but two species have alternative values.
参数df1.nl可以输入的格式c(spp1=2,   spp2=3, 2.5)说,这意味着默认值是2.5,但两个物种有替代值。

If spar1=0 and df1.nl=0 then this represents fitting linear functions (CLO). Currently, this is handled in the awkward manner of setting df1.nl to be a small positive value, so that the smooth is almost linear but not quite. A proper fix to this special case should done in the short future.
如果spar1=0和df1.nl=0那么,这代表拟合的线性函数(CLO)。目前,该设置df1.nl是一个小的正数,以便顺利几乎是线性的,但不是很尴尬的方式处理。一个适当的修正,以这种特殊情况下,应在短期的未来。


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


T. W. Yee



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

Constrained additive ordination. Ecology, 87, 203–213.
Nonparametric Regression and Generalized Linear Models: A Roughness Penalty Approach, London: Chapman & Hall.

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

cao.
cao。


实例----------Examples----------


hspider[,1:6] = scale(hspider[,1:6]) # Standardized environmental vars[标准化的环境瓦尔]
set.seed(123)
ap1 = cao(cbind(Pardlugu, Pardmont, Pardnigr, Pardpull, Zoraspin) ~
         WaterCon + BareSand + FallTwig +
         CoveMoss + CoveHerb + ReflLux,
         family = poissonff, data = hspider,
         df1.nl = c(Zoraspin=2.3, 2.1),
         Bestof = 10, Crow1positive = FALSE)
sort(ap1@misc$deviance.Bestof) # A history of all the iterations[历史上所有的迭代]

Coef(ap1)

par(mfrow=c(2,3)) # All or most of the curves are unimodal; some are[的全部或大部分的曲线是单峰的,有些是]
plot(ap1, lcol = "blue") # quite symmetric. Hence a CQO model should be ok[相当对称的。因此,一个的CQO模型应该是确定的]

par(mfrow=c(1,1), las=1)
index = 1:ncol(ap1@y)  # lvplot is jagged because only 28 sites[lvplot是锯齿状的,因为只有28个]
lvplot(ap1, lcol = index, pcol = index, y=TRUE)

trplot(ap1, label=TRUE, col=index)
abline(a = 0, b = 1, lty = 2)

persp(ap1, label=TRUE, col=1:4)

## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 22:27 , Processed in 0.036539 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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