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

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

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

                                         Fitting Unconstrained Quadratic Ordination (UQO)
                                         配件约束的二次排序(UQO)

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

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

An unconstrained quadratic ordination (UQO) (equivalently, noncanonical Gaussian ordination) model is fitted using the  quadratic unconstrained vector generalized linear model (QU-VGLM) framework. In this documentation, M is the number of linear predictors or species.
一个无约束的二次协调(UQO)(等价地,非经典的高斯协调)使用二次无约束向量广义线性模型(QU-VGLM)框架模型拟合。在本文档中,M是的线性预测或物种的数量。


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


uqo(formula, family, data = list(), weights = NULL, subset = NULL,
    na.action = na.fail, etastart = NULL, mustart = NULL,
    coefstart = NULL, control = uqo.control(...), offset = NULL,
    method = "uqo.fit", model = FALSE, x.arg = TRUE, y.arg = TRUE,
    contrasts = NULL, constraints = NULL, extra = NULL,
    qr.arg = FALSE, ...)



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

参数:formula
a symbolic description of the model to be fit. Since there is no x_2 vector by definition, the RHS of the formula has all terms belonging to the x_1 vector.  
一个象征性的模型来描述是合适的。由于没有x_2向量的定义,公式右边的所有条款属于x_1矢量。


参数:family
a function of class "vglmff" describing what statistical model is to be fitted. Currently two families are supported: Poisson and binomial.  
一类的函数"vglmff"描述统计模型是被安装。目前,两个家庭的支持:泊松分布和二项式。


参数:data
an optional data frame containing the variables in the model. By default the variables are taken from environment(formula), typically the environment from which uqo is called.  
一个可选的数据框包含在模型中的变量。默认情况下,变量的environment(formula),通常是uqo被称为环境。


参数:weights
an optional vector or matrix of (prior) weights  to be used in the fitting process. This argument should not be used.  
在嵌合过程中要使用的可选的(现有)的权重向量或矩阵。不应该使用这个参数。


参数:subset
an optional logical vector specifying a subset of observations to  be used in the fitting process.  
一个可选的逻辑矢量指定的装配过程中可以使用的观测值的一个子集。


参数:na.action
a function which indicates what should happen when the data contain NAs.  The default is set by the na.action setting of options, and is na.fail if that is unset. The “factory-fresh” default is na.omit.  
一个函数,它表示当数据包含NA的,应该发生什么。默认设置是由na.action的options,是na.fail,如果是没有设置的。 “出厂时的默认是na.omit。


参数:etastart
starting values for the linear predictors. It is a M-column matrix. If M = 1 then it may be a vector.  
开始的线性预测值。这是一个M列的矩阵。如果M = 1然后它可能是一个矢量。


参数:mustart
starting values for the  fitted values. It can be a vector or a matrix.  Some family functions do not make use of this argument.  
拟合值的初始值。它可以是一个矢量或矩阵。有些家庭功能不使用这种说法。


参数:coefstart
starting values for the coefficient vector.  
的系数向量的初始值。


参数:control
a list of parameters for controlling the fitting process.  See uqo.control for details.  
的参数,用于控制的嵌合过程的列表。见uqo.control的详细信息。


参数:offset
a vector or M-column matrix of offset values. This argument should not be used.  
一个向量或M的列矩阵的偏移值。不应该使用这个参数。


参数:method
the method to be used in fitting the model. The default (and presently only) method uqo.fit uses iteratively reweighted least squares (IRLS).  
该方法被用于拟合模型。默认情况下,(目前)的方法uqo.fit使用迭代加权最小二乘(IRLS)。


参数:model
a logical value indicating whether the model frame should be assigned in the model slot.  
一个逻辑值,该值指示是否应该被分配在model插槽的模型框架。


参数:x.arg, y.arg
logical values indicating whether the model matrix and response matrix used in the fitting process should be assigned in the x and y slots. Note the model matrix is the LM model matrix.  
逻辑值模型是否在装修过程中使用的矩阵和响应矩阵应分配在x和y槽。请注意的的模型矩阵是LM模型矩阵。


参数:contrasts
an optional list. See the contrasts.arg of model.matrix.default.  
可选列表。请参阅contrasts.argmodel.matrix.default。


参数:constraints
an optional list  of constraint matrices. This argument should not be used.  
约束矩阵的可选列表。不应该使用这个参数。


参数:extra
an optional list with any extra information that   might be needed by the family function.   
任何额外的信息可能需要的家庭功能的可选列表。


参数:qr.arg
logical value indicating whether the slot qr, which returns the QR decomposition of the VLM model matrix, is returned on the object. This argument should not be set TRUE.  
逻辑值,该值指示该时隙是否qr,它返回的的VLM模型矩阵的QR分解,则返回的对象。这个论点不应该设置TRUE。


参数:...
further arguments passed into uqo.control.  
进一步的参数传递到uqo.control。


Details

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

Unconstrained quadratic ordination models fit symmetric bell-shaped response curves/surfaces to response data, but the latent variables are largely free parameters and are not constrained to be linear combinations of the environmental variables.  This poses a difficult optimization problem.  The current algorithm is very simple and will often fail (even for Rank = 1) but hopefully this will be improved in the future.
无约束的二次协调的模式适合对称的钟形响应曲线/曲面响应数据,但潜变量基本上是免费的参数,并没有约束的环境变量的线性组合。这就带来了一个困难的优化问题。目前的算法非常简单,往往会失败(即使是Rank = 1),但希望这在未来会有所改善。

The central formula is given by
由中央式由下式给出

where x_1 is a vector (usually just a 1 for an intercept), nu is a R-vector of latent variables, e_m is a vector of 0s but with a 1 in the mth position. The eta are a vector of linear/additive predictors, e.g., the mth element is eta_m =   log(E[Y_m]) for the mth species.  The matrices B_1, A, and D_m are estimated from the data, i.e., contain the regression coefficients. Also, nu is estimated. The tolerance matrices satisfy T_s =   -(0.5 D_s^(-1).  Many important UQO details are directly related to arguments in uqo.control; see also cqo and qrrvglm.control.
x_1是一个向量(通常只有1对截距),nu是R的潜变量的向量,e_m是一个矢量的0,但与1在m个位置。 eta是一个向量的线性/添加剂的预测,例如,m个元素是eta_m =   log(E[Y_m])的m个物种。 B_1,A和D_m估计的数据,即包含的回归系数矩阵。此外,nu估计。的耐受性矩阵满足T_s =   -(0.5 D_s^(-1)。许多重要UQO的细节直接相关的参数在uqo.control;也见cqo和qrrvglm.control。

Currently, only Poisson and binomial VGAM family functions are implemented for this function, and dispersion parameters for these are assumed known.  Thus the Poisson is catered for by poissonff, and the binomial by binomialff. Those beginning with "quasi" have dispersion parameters that are estimated for each species, hence will give an error message here.
目前,只有泊松分布和二项式VGAM家庭功能的实现此功能,和分散这些参数的假设已知的。因此,泊松照顾对的poissonff,和二项式binomialff的。那些开始与"quasi"有的分散估计的参数,每一个物种,因此在这里会给出一个错误信息。“


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

An object of class "uqo" (this may change to "quvglm" in the future).
类的一个对象"uqo"(这可能会改变,以"quvglm"在未来)。


警告----------Warning ----------

Local solutions are not uncommon when fitting UQO models.  To increase the chances of obtaining the global solution, set ITolerances = TRUE or EqualTolerances = TRUE and increase the value of the argument Bestof in uqo.control. For reproducibility of the results, it pays to set a different random number seed before calling uqo (the function set.seed does this).
本地解决方案的情况并不少见装修时UQO模型。要增加成功的机会获得全球性的解决方案,设置ITolerances = TRUE或EqualTolerances = TRUE,增加值的参数Bestofuqo.control。对于重复性的结果,它支付给不同的随机数种子,然后再调用uqo(函数set.seed)。

The function uqo is very sensitive to initial values, and there is a lot of room for improvement here.
函数uqo为初始值,是非常敏感的,在这里有很多改进的余地。

UQO is computationally expensive.  It pays to keep the rank to no more than 2, and 1 is much preferred over 2. The data needs to conform closely to the statistical model.
UQO在计算上是昂贵的。它支付给保持等级不超过2个,且1被多超过2,优选。该数据需要密切吻合的统计模型。

Currently there is a bug with the argument Crow1positive in uqo.control. This argument might be interpreted as controlling the sign of the first site score, but currently this is not done.
目前有一种错误的论点Crow1positive中uqo.control。此参数可能会被解释为控制的第一个站点得分的迹象,但目前没有这样做。


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

The site scores are centered. When R>1, they are uncorrelated and should be unique up to a rotation.
该网站得分居中。当R>1,它们是不相关的,应该是唯一的旋转。

The argument Bestof in uqo.control controls the number of models fitted (each uses different starting values) to the data. This argument is important because convergence may be to a local solution rather than the global solution. Using more starting values increases the chances of finding the global solution. Local solutions arise because the optimization problem is highly nonlinear.
参数Bestofuqo.control控制的车型配备的数量(每个使用不同的初始值)的数据。“这种说法是很重要的,因为收敛可能是一个本地解决方案,而不是全球性的解决方案。使用更多的初始值增加的机会,寻找全球性解决方案。本地解决方案的出现,是因为优化问题是高度非线性的。

In the example below, a CQO model is fitted and used for providing initial values for a UQO model.
在下面的例子中,一个CQO模型装配和用于提供初始值为UQO模型。


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


Thomas W. Yee



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

A new technique for maximum-likelihood canonical Gaussian ordination. Ecological Monographs, 74, 685–701.
Constrained additive ordination. Ecology, 87, 203–213.

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

uqo.control, cqo, qrrvglm.control, rcqo,  poissonff, binomialff, Coef.uqo, lvplot.uqo, persp.uqo, trplot.uqo, vcov.uqo, set.seed, hspider.
uqo.control,cqo,qrrvglm.control,rcqo,poissonff,binomialff,Coef.uqo,lvplot.uqo,persp.uqo,trplot.uqo,vcov.uqo,set.seed,hspider。


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


set.seed(123)  # This leads to the global solution[这将导致全球性的解决方案]
hspider[,1:6] = scale(hspider[,1:6]) # Standardized environmental vars[标准化的环境瓦尔]
p1 = cqo(cbind(Alopacce, Alopcune, Alopfabr, Arctlute, Arctperi,
               Auloalbi, Pardlugu, Pardmont, Pardnigr, Pardpull,
               Trocterr, Zoraspin) ~
         WaterCon + BareSand + FallTwig + CoveMoss + CoveHerb + ReflLux,
         ITolerances = TRUE, fam = poissonff, data = hspider,
         Crow1positive = TRUE, Bestof=3, trace = FALSE)
if (deviance(p1) > 1589.0) stop("suboptimal fit obtained")

set.seed(111)
up1 = uqo(cbind(Alopacce, Alopcune, Alopfabr, Arctlute, Arctperi,
                Auloalbi, Pardlugu, Pardmont, Pardnigr, Pardpull,
                Trocterr, Zoraspin) ~ 1,
          family = poissonff, data = hspider,
          ITolerances = TRUE,
          Crow1positive = TRUE, lvstart = -lv(p1))
if (deviance(up1) > 1310.0) stop("suboptimal fit obtained")

nos = ncol(up1@y) # Number of species[种数]
clr = (1nos+1))[-7]  # to omit yellow[省略黄色]
lvplot(up1, las = 1, y = TRUE, pch = 1:nos, scol = clr, lcol = clr,
       pcol = clr, llty = 1:nos, llwd=2)
legend(x=2, y = 135, colnames(up1@y), col = clr, lty = 1:nos,
       lwd=2, merge = FALSE, ncol = 1, x.inter=4.0, bty = "l", cex = 0.9)

# Compare the site scores between the two models[两种模式之间的比较#]
plot(lv(p1), lv(up1), xlim = c(-3,4), ylim = c(-3,4), las = 1)
abline(a = 0, b=-1, lty=2, col = "blue", xpd = FALSE)
cor(lv(p1, ITol = TRUE), lv(up1))

# Another comparison between the constrained and unconstrained models[另一个约束和无约束模型之间的比较]
# The signs are not right so they are similar when reflected about 0 [征兆都没有的权利,使他们有类似反映约0时,]
par(mfrow = c(2,1))
persp(up1, main = "Red/Blue are the constrained/unconstrained models",
      label = TRUE, col = "blue", las = 1)
persp(p1, add = FALSE, col = "red")
pchisq(deviance(p1) - deviance(up1), df=52-30, lower.tail = FALSE)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 11:31 , Processed in 0.021624 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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