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

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

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

                                         Latent Variable Plot for QO models
                                         QO的潜变量图为模型

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

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

Produces an ordination diagram (latent variable plot) for quadratic ordination (QO) models.  For rank-1 models, the x-axis is the first ordination/constrained/canonical axis.  For rank-2 models, the x- and y-axis are the first and second ordination axes respectively.
产生的二次协调模型(QO)排序图(潜变量图)。对于排名-1型号,x轴为第一协调/约束/规范化轴。对于秩2款中,x轴和y轴分别是在第一和第二排序轴。


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


lvplot.qrrvglm(object, varlvI = FALSE, reference = NULL,
    add = FALSE, plot.it = TRUE,
    rug = TRUE, y = FALSE, type = c("fitted.values", "predictors"),
    xlab = paste("Latent Variable", if (Rank == 1) "" else " 1", sep = ""),
    ylab = if (Rank == 1) switch(type, predictors = "Predictors",
    fitted.values = "Fitted values") else "Latent Variable 2",
    pcex = par()$cex, pcol = par()$col, pch = par()$pch,
    llty = par()$lty, lcol = par()$col, llwd = par()$lwd,
    label.arg = FALSE, adj.arg = -0.1,
    ellipse = 0.95, Absolute = FALSE,
    elty = par()$lty, ecol = par()$col, elwd = par()$lwd, egrid = 200,
    chull.arg = FALSE, clty = 2, ccol = par()$col, clwd = par()$lwd,
    cpch = "   ",
    C = FALSE, OriginC = c("origin", "mean"),
    Clty = par()$lty, Ccol = par()$col, Clwd = par()$lwd,
    Ccex = par()$cex, Cadj.arg = -0.1, stretchC = 1,
    sites = FALSE, spch = NULL, scol = par()$col, scex = par()$cex,
    sfont = par()$font, check.ok = TRUE, ...)



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

参数:object
A CQO or UQO object.  
一个的CQO或UQO对象。


参数:varlvI
Logical that is fed into Coef.qrrvglm.   
逻辑被送入Coef.qrrvglm。


参数:reference
Integer or character that is fed into Coef.qrrvglm.  
整数或字符,被送入Coef.qrrvglm。


参数:add
Logical. Add to an existing plot? If FALSE, a new plot is made.  
逻辑。添加到现有图?如果FALSE,一个新的绘图。


参数:plot.it
Logical. Plot it?  
逻辑。图呢?


参数:rug
Logical. If TRUE, a rug plot is plotted at the foot of the plot (applies to rank-1 models only). These values are jittered to expose ties.  
逻辑。如果TRUE,在地毯图绘制在脚下的图(只适用于等级1款)。这些值抖动暴露的关系。


参数:y
Logical. If TRUE, the responses will be plotted (applies only to rank-1 models and if type="fitted.values".)  
逻辑。如果TRUE,将被绘制的反应(仅适用于等级1款,如果type="fitted.values"。)


参数:type
Either "fitted.values" or "predictors", specifies whether the y-axis is on the response or eta-scales respectively.  
是"fitted.values"或"predictors",指定是否在y轴是分别响应或η-尺度。


参数:xlab
Caption for the x-axis. See par.  
首领的x轴。见par。


参数:ylab
Caption for the y-axis. See par.  
首领为y轴。见par。


参数:pcex
Character expansion of the points. Here, for rank-1 models, points are the response y data.  For rank-2 models, points are the optima. See the cex argument in par.  
字符扩展之分。在这里,排名-1型号,点的响应y数据。对于排名-2型,点的最优解。 cex在par参数。


参数:pcol
Color of the points.  See the col argument in par.  
的各点的颜色。 col在par参数。


参数:pch
Either an integer specifying a symbol or a single character to be used as the default in plotting points. See par. The pch argument can be of length M, the number of species.  
无论是一个整数,指定一个符号或一个单一的字符被用来作为默认情况下,在绘制点。见par。 pch参数的长度M,物种的数量。


参数:llty
Line type. Rank-1 models only. See the lty argument of par.  
线路类型。等级1机型。请参阅ltypar参数。


参数:lcol
Line color. Rank-1 models only. See the col argument of par.  
线的颜色。等级1机型。请参阅colpar参数。


参数:llwd
Line width. Rank-1 models only. See the lwd argument of par.  
线条宽度。等级1机型。请参阅lwdpar参数。


参数:label.arg
Logical. Label the optima and C?  (applies only to rank-2 models only).  
逻辑。标签的最优解和C? (仅适用于秩2)。


参数:adj.arg
Justification of text strings for labelling the optima (applies only to rank-2 models only).  See the adj argument of par.  
理由的文本字符串标记的最优解(仅适用于职级只有2种型号)。请参阅adjpar参数。


参数:ellipse
Numerical, of length 0 or 1 (applies only to rank-2 models only). If Absolute is TRUE then ellipse should be assigned a value that is used for the elliptical contouring. If Absolute is FALSE then ellipse should be assigned a value between 0 and 1, for example, setting ellipse=0.9 means an ellipse with contour = 90% of the maximum will be plotted about each optimum. If ellipse is a negative value, then the function checks that the model is an equal-tolerances model and varlvI=FALSE, and if so, plots circles with radius -ellipse. For example, setting ellipse=-1 will result in circular contours that have unit radius (in latent variable units).  If ellipse is NULL or FALSE then no ellipse is drawn around the optima.  
数值,长度为0或1(仅适用于排名只有2种型号)。 Absolute如果是TRUE然后ellipse应指定一个值,用于为椭圆轮廓。如果Absolute是FALSE然后ellipse应该被分配在0和1之间的值,例如,设置ellipse=0.9是指一个椭圆形轮廓= 90%的最大绘制有关各最佳。如果ellipse是一个负值,那么该函数检查的模式是平等公差模型和varlvI=FALSE,如果是的话,图圆半径-ellipse的。例如,设置ellipse=-1将导致在圆形的轮廓半径为(潜变量单位)。如果ellipse是NULL或FALSE,没有椭圆周围绘制的最优解。


参数:Absolute
Logical. If TRUE, the contours corresponding to ellipse  are on an absolute scale. If FALSE, the contours corresponding to ellipse  are on a relative scale.   
逻辑。如果TRUE,对应的轮廓ellipse是一个绝对规模上。如果FALSE,对应的轮廓ellipse的相对规模。


参数:elty
Line type of the ellipses.  See the lty argument of par.  
的椭圆型线。请参阅ltypar参数。


参数:ecol
Line color of the ellipses. See the col argument of par.  
椭圆形的线条颜色。请参阅colpar参数。


参数:elwd
Line width of the ellipses. See the lwd argument of par.  
椭圆的线宽度。请参阅lwdpar参数。


参数:egrid
Numerical. Line resolution of the ellipses. Choosing a larger value will result in smoother ellipses. Useful when ellipses are large.   
数值。椭圆形的线分辨率。选择一个较大的值会产生更平滑的椭圆形。有用的椭圆大。


参数:chull.arg
Logical. Add a convex hull around the site scores?  
逻辑。添加一个凸包在工地附近的分数吗?


参数:clty
Line type of the convex hull.  See the lty argument of par.  
直线型的凸包。请参阅ltypar参数。


参数:ccol
Line color of the convex hull. See the col argument of par.  
线条颜色的凸包。请参阅colpar参数。


参数:clwd
Line width of the convex hull. See the lwd argument of par.  
线宽度的凸包。请参阅lwdpar参数。


参数:cpch
Character to be plotted at the intersection points of  the convex hull. Having white spaces means that site labels are not obscured there.  See the pch argument of par.  
在交叉点的凸包要绘制的字符。有空格,意味着该网站的标签没有被遮盖住。请参阅pchpar参数。


参数:C
Logical. Add C (represented by arrows emanating from OriginC) to the plot?  
逻辑。将C(箭头源于OriginC)的图吗?


参数:OriginC
Character or numeric. Where the arrows representing C emanate from.  If character, it must be one of the choices given. By default the first is chosen. The value "origin" means c(0,0). The value "mean" means  the sample mean of the latent variables (centroid).  Alternatively, the user may specify a numerical vector of length 2.  
字符或数字。箭头代表C散发出在哪里。如果字符,它必须是一个给定的选择。默认情况下,首先是选择。值"origin"是指:c(0,0)。值"mean"是指潜变量(心)的样本均值。可替代地,用户可以指定一个长度为2的数值向量。


参数:Clty
Line type of the arrows representing C.  See the lty argument of par.  
线的箭头代表C.请参阅ltypar参数的类型。


参数:Ccol
Line color of the arrows representing C. See the col argument of par.  
线颜色的箭头代表C.请参阅colpar参数。


参数:Clwd
Line width of the arrows representing C. See the lwd argument of par.  
C.请参阅lwdpar参数的箭头代表的线宽度。


参数:Ccex
Numeric. Character expansion of the labelling of C. See the cex argument of par.  
数字。字符扩展的标签C.cexpar参数。


参数:Cadj.arg
  Justification of text strings when labelling C. See the adj argument of par.  
当标签的文本字符串的理由C.请参阅adjpar参数。


参数:stretchC
Numerical. Stretching factor for C. Instead of using C, stretchC *  C is used.  
数值。拉伸系数为C.而不是使用C,stretchC * C使用。


参数:sites
Logical. Add the site scores (aka latent variable values, nu's) to the plot? (applies only to rank-2 models only).  
逻辑。 #(又名潜变量的值,γ)的图吗? (仅适用于秩2)。


参数:spch
Plotting character of the site scores. The default value of NULL means the row labels of the data frame are used. They often are the site numbers. See the pch argument of par.  
绘制字符的网站得分。的默认值NULL是指行标签的数据框被使用。他们往往是网站。请参阅pchpar参数。


参数:scol
Color of the site scores.  See the col argument of par.  
颜色的站点分数。请参阅colpar参数。


参数:scex
Character expansion of the site scores. See the cex argument of par.  
字符扩展的网站得分。请参阅cexpar参数。


参数:sfont
Font used for the site scores. See the font argument of par.  
使用的字体的站点的分数。请参阅fontpar参数。


参数:check.ok
Logical. Whether a check is performed to see that Norrr = ~ 1 was used. It doesn't make sense to have a latent variable plot unless this is so.  
逻辑。是否执行一个检查看到Norrr = ~ 1使用。它没有任何意义,除非是这样的话,有一个潜变量的图。


参数:...
Arguments passed into the plot function when setting up the entire plot. Useful arguments here include xlim and ylim.  
到plot函数传递参数时,设立了整个图。有用的参数包括:xlim和ylim。


Details

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

This function only works for rank-1 and rank-2 QRR-VGLMs with argument Norrr = ~ 1.
此功能只适用于等级1和等级2 QRR VGLMs与参数Norrr = ~ 1。

For unequal-tolerances models, the latent variable axes can be rotated so that at least one of the tolerance matrices is diagonal; see Coef.qrrvglm for details.
对于不等公差模型,潜变量轴可以旋转,使得中的至少一个的公差矩阵是对角的,请参阅Coef.qrrvglm的详细信息,。

Arguments beginning with “p” correspond to the points e.g., pcex and pcol correspond to the size and color of the points. Such “p” arguments should be vectors of length 1, or n, the number of sites.  For the rank-2 model, arguments beginning with “p” correspond to the optima.
“p”对应的点开始的参数,例如,pcex和pcol对应的点的大小和颜色。这种“p”参数应该是长度为1的向量,或n,网站的数量。对于排名-2型,参数开始“p”对应的最优解。


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

Returns a matrix of latent variables (site scores) regardless of whether a plot was produced or not.
返回潜变量的矩阵(现场分数)无论是否图或不。


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

Interpretation of a latent variable plot (CQO diagram) is potentially very misleading in terms of distances if (i) the tolerance matrices of the species are unequal and (ii) the contours of these tolerance matrices are not included in the ordination diagram.
解释的一个潜变量图(CQO图)可能是非常具误导性的距离,倘(i)的耐受性矩阵的品种是不平等及(ii)不包括在这些公差矩阵的轮廓在排序图。


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

A species which does not have an optimum will not have an ellipse drawn even if requested, i.e., if its tolerance matrix is not positive-definite.
绘制一个椭圆即使提出要求,即,如果它的耐受性矩阵是正定的,不会有没有一个最佳的物种。

Plotting C gives a visual display of the weights (loadings) of each of the variables used in the linear combination defining each latent variable.
绘图C给出在限定每个潜变量的线性组合中的每一个所使用的变量的权重(负荷)的可视化显示。

The arguments elty, ecol and elwd, may be replaced in the future by llty, lcol and llwd, respectively.
的参数elty,ecol和elwd,可能会在未来代替llty,lcol和llwd,分别。

For rank-1 models, a similar function to this one is perspqrrvglm.  It plots the fitted values on a more fine grid rather than at the actual site scores here.  The result is a collection of smooth bell-shaped curves. However, it has the weakness that the plot is more divorced from the data; the user thinks it is the truth without an appreciation of the statistical variability in the estimates.
对于排名-1型号,一个类似的功能,这一个是perspqrrvglm。图的拟合值更细的网格上,而不是在这里工地的实际分数。其结果是一个光滑的钟形曲线的集合。但是,它有弱点,该图是脱离的数据,用户认为这是事实,没有升值的统计变异的估计。

In the example below, the data comes from an equal-tolerances model. The species' tolerance matrices are all the identity matrix, and the optimums are at (0,0), (1,1) and (-2,0) for species 1, 2, 3 respectively.
在下面的例子中,数据来自等于公差模型。该物种的公差矩阵是单位矩阵,和的最佳值是在(0,0),(1,1)和(-2,0)的物种1,2,3分别。


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


Thomas W. Yee



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

A new technique for maximum-likelihood canonical Gaussian ordination. Ecological Monographs, 74, 685–701.

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

lvplot, perspqrrvglm, Coef.qrrvglm, par, cqo.
lvplot,perspqrrvglm,Coef.qrrvglm,par,cqo。


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


set.seed(123)
nn = 200
cdat = data.frame(x2 = rnorm(nn),   # Has mean 0 (needed when ITol=TRUE)[的平均值为0(需要当ITol = TRUE)]
                  x3 = rnorm(nn),   # Has mean 0 (needed when ITol=TRUE)[的平均值为0(需要当ITol = TRUE)]
                  x4 = rnorm(nn))   # Has mean 0 (needed when ITol=TRUE)[的平均值为0(需要当ITol = TRUE)]
cdat = transform(cdat, lv1 =  x2 + x3 - 2*x4,
                       lv2 = -x2 + x3 + 0*x4)
# Nb. lv2 is weakly correlated with lv1[铌。是弱相关LV1 LV2]
cdat = transform(cdat, lambda1 = exp(6 - 0.5 * (lv1-0)^2 - 0.5 * (lv2-0)^2),
                       lambda2 = exp(5 - 0.5 * (lv1-1)^2 - 0.5 * (lv2-1)^2),
                       lambda3 = exp(5 - 0.5 * (lv1+2)^2 - 0.5 * (lv2-0)^2))
cdat = transform(cdat, spp1 = rpois(nn, lambda1),
                       spp2 = rpois(nn, lambda2),
                       spp3 = rpois(nn, lambda3))
set.seed(111)
# vvv p2 = cqo(cbind(spp1,spp2,spp3) ~ x2 + x3 + x4, poissonff, [VVV P2 = cqo(CBIND(SPP1,SPP2的,spp3)~X2 + X3 + X4,poissonff,]
# vvv          data = cdat,[“VVV数据= CDAT,]
# vvv          Rank=2, ITolerances=TRUE,[VVV等级= 2,ITolerances = TRUE,]
# vvv          Crow1positive=c(TRUE,FALSE))   # deviance = 505.81[VVV Crow1positive = C(TRUE,FALSE))偏差= 505.81]
# vvv if (deviance(p2) > 506) stop("suboptimal fit obtained")[的VVV如果(偏差(P2)> 506),停止(“获得的最理想的适合”)]
# vvv sort(p2@misc$deviance.Bestof)  # A history of the fits[的VVV排序(P2 @杂项$ deviance.Bestof)的历史拟合]
# vvv Coef(p2)[VVV系数系数(p2)的]

## Not run: [#不运行:]
lvplot(p2, sites=TRUE, spch="*", scol="darkgreen", scex=1.5,
       chull=TRUE, label=TRUE, Absolute=TRUE, ellipse=140,
       adj=-0.5, pcol="blue", pcex=1.3, las=1,
       C=TRUE, Cadj=c(-.3,-.3,1), Clwd=2, Ccex=1.4, Ccol="red",
       main=paste("Contours at Abundance=140 with",
                  "convex hull of the site scores"))
## End(Not run)[#(不执行)]
# vvv var(lv(p2)) # A diagonal matrix, i.e., uncorrelated latent variables[VVV VAR(LV(P2))#A的对角矩阵,即不相关的潜变量]
# vvv var(lv(p2, varlvI=TRUE)) # Identity matrix[VVV VAR(LV(P2,varlvI = TRUE))的单位矩阵]
# vvv Tol(p2)[,,1:2] # Identity matrix[[1:2]#身份矩阵VVV容差(P2)]
# vvv Tol(p2, varlvI=TRUE)[,,1:2] # A diagonal matrix[VVV TOL(P2,varlvI = TRUE)[1:2]#A的对角矩阵]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 15:49 , Processed in 0.021316 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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