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

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

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

                                         Fit and Plot Smooth Surfaces of Variables on Ordination.
                                         安装并绘制光滑的表面上排序的变量。

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

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

Function ordisurf fits a smooth surface for given variable and plots the result on ordination diagram.
函数ordisurf符合表面光滑的给定变量排序图上绘制的结果。


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


## Default S3 method:[默认方法]
ordisurf(x, y, choices=c(1, 2), knots=10, family="gaussian", col="red",
     thinplate = TRUE, add = FALSE, display = "sites",
     w = weights(x), main, nlevels = 10, levels, labcex = 0.6,
     bubble = FALSE, cex = 1, select = FALSE, method = "GCV.Cp",
     gamma = 1, plot = TRUE, ...)

## S3 method for class 'formula'[类formula的方法]
ordisurf(formula, data, ...)

## S3 method for class 'ordisurf'
calibrate(object, newdata, ...)

## S3 method for class 'ordisurf'
plot(x, what = c("contour","persp","gam"),
     add = FALSE, bubble = FALSE, col = "red", cex = 1,
     nlevels = 10, levels, labcex = 0.6, ...)



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

参数:x
For ordisurf an ordination configuration, either a matrix or a result known by scores. For plot.ordisurf and object of class "ordisurf" as returned by ordisurf.
对于ordisurf的协调配置,无论是的矩阵或因知道scores。 plot.ordisurf和类的对象"ordisurf"返回的ordisurf。


参数:y
Variable to be plotted.  
变量被绘制。


参数:choices
Ordination axes.  
排序轴。


参数:knots
Number of initial knots in gam (one more than degrees of freedom). If knots = 0 or knots = 1  the function will fit a linear trend surface, and if knots = 2 the function  will fit a quadratic trend surface instead of a smooth surface.   
在gam(比自由度)的初步结。如果knots = 0或knots = 1函数将适合的线性趋势表面,并如果knots = 2函数将适合二次趋势面,而不是一个光滑的表面。


参数:family
Error distribution in  gam.  
误差分布在gam。


参数:col
Colour of contours.  
颜色的轮廓。


参数:thinplate
Use thinplate splines in gam.
使用thinplate样条在gam。


参数:add
Add contours on an existing diagram or draw a new plot.  
添加的轮廓在现有的图或绘制一个新的图。


参数:display
Type of scores known by scores: typically "sites" for ordinary site scores or "lc" for linear combination scores.
类型的scores:典型的“网站”,普通网站分数或“LC”的线性组合分数分数。


参数:w
Prior weights on the data. Concerns mainly cca and decorana results which have nonconstant weights.
上的数据之前的重量。主要涉及cca和decorana结果有非常数的权重。


参数:main
The main title for the plot, or as default the name of plotted variable in a new plot.
为图的主标题,或作为默认的名称绘制变量在一个新的图。


参数:nlevels, levels
Either a vector of levels for which contours are drawn, or suggested number of contours in nlevels if levels are not supplied.
无论是矢量levels的轮廓绘制,或建议的等值线数目nlevels如果levels不提供。


参数:labcex
Label size in contours.  Setting this zero will suppress labels.
标签尺寸的轮廓。设置零抑制的标签,。


参数:bubble
Use “bubble plot” for points, or vary the point diameter by the value of the plotted variable. If bubble is numeric, its value is used for the maximum symbol size (as in cex), or if bubble = TRUE, the value of cex gives the maximum. The minimum size will always be cex = 0.4.  The option only has an effect if add = FALSE.
使用“气泡图”的点或不同点直径的值绘制变量。如果bubble是数字,使用它的值的最大符号的大小(如cex),或者如果bubble = TRUE,cex给出了最大。最小尺寸将永远是cex = 0.4。该选项只有一个效果,如果add = FALSE。


参数:cex
Character expansion of plotting symbols.
绘制符号的字符扩展。


参数:select
Logical; specify gam argument "select". If this is TRUE then gam can add an extra  penalty to each term so that it can be penalized to zero. This means that the smoothing parameter estimation that is part of fitting can completely remove terms from the model. If the corresponding smoothing parameter is estimated as zero then the extra penalty has no effect.
逻辑指定gam参数"select"。如果这是TRUE然后gam可以添加一个额外的处罚,以每学期,以便它可以被扣分零。这意味着平滑参数估计是拟合的一部分的,可以完全除去从模型中的条款。如果相应的平滑参数估计值为零,那么额外的罚款没有任何效果。


参数:method
character; the smoothing parameter estimation method. Options allowed are: "GCV.Cp" uses GCV for models with unknown scale parameter and Mallows' Cp/UBRE/AIC for models with known scale; "GACV.Cp" as for "GCV.Cp" but uses GACV (Generalised Approximate CV) instead of GCV; "REML" and "ML" use restricted maximum likelihood or maximum likelihood estimation for both known and unknown scale; and "P-REML" and "P-ML" use REML or ML estimation but use a Pearson estimate of the scale.
字符的平滑参数估计方法。选项允许的:"GCV.Cp"使用GCV模型与未知的尺度参数和锦葵“的CP / UBRE号/ AIC的模型与已知的规模;"GACV.Cp"为"GCV.Cp",但使用GACV(广义近似CV ),而不是GCV,“"REML"和"ML"使用受限制的已知和未知的规模最大似然或最大似然估计; "P-REML"和"P-ML"使用REML或者ML估计,但使用一个Pearson估计的规模。


参数:gamma
Multiplier to inflate model degrees of freedom in GCV or UBRE/AIC score by. This effectively places an extra penalty on complex models. An oft used value if gamma = 1.4.
乘数,充气模型自由度在的GCV和UBRE / AIC得分。复杂的模型,这将有效地把一个额外的处罚。一个经常使用的值,如果gamma = 1.4。


参数:plot
logical; should any plotting be done by ordisurf? Useful if all you want is the fitted response surface model.
逻辑,任何图通过ordisurf?有用的,如果你想要的是拟合的响应面模型。


参数:formula, data
Alternative definition of the fitted model as x ~ y, or left-hand side is the ordination x and right-hand side the single fitted continuous variable y. The variable y must be in the working environment or in the data frame or environment given by data. All other arguments of are passed to the default method.
另一种定义是协调x ~ y和右手侧装单连续变量xy,或左边的拟合模型。变量y必须在工作环境中或在数据框或环境的data。所有其他的参数被传递到默认的方法。


参数:object
An ordisurf result object.
ordisurf的结果对象。


参数:newdata
Coordinates in two-dimensional ordination for new points.
中的坐标的新点的二维协调。


参数:what
character; what type of plot to produce. "contour" produces a contour plot of the response surface, see contour for details. "persp" produces a perspective plot of the same, see persp for details. "gam" plots the fitted GAM model, an object that inherits from class "gam" returned by ordisurf, see plot.gam.  
性格;什么类型的图。 "contour"产生响应面的等高线图,看到contour的详细信息。 "persp"产生相同的透视图,请参阅persp的详细信息。 "gam"GAM模型的拟合图,从类继承的对象"gam"返回ordisurf,看到plot.gam。


参数:...
Other parameters passed to gam, or to the graphical functions. See Note below for exceptions.
其他参数传递给gam,或图形化的功能。注意下面的异常。


Details

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

Function ordisurf fits a smooth surface using thinplate splines (Wood 2003) in gam, and uses predict.gam to find fitted values in a regular grid. The smooth surface can be fitted with an extra penalty that allows the entire smoother to be penalized back to 0 degrees of freedom, effectively removing the term from the model (see Marra & Wood, 2011). The addition of this extra penalty is invoked by setting argument select to TRUE. The function plots the fitted contours with convex hull of data points either over an existing ordination diagram or draws a new plot. If select ==   TRUE and the smooth is effectively penalised out of the model, no contours will be plotted.
函数ordisurf适合光滑的表面使用thinplate样条曲线(木)gam,并使用predict.gam规则的网格拟合值。光滑的表面可以配备一个额外的惩罚,使整个平滑,被处罚的自由返回到0度,有效地消除了术语从模型(见马拉律师事务所,2011)。除了这些额外的处罚调用通过设置参数selectTRUE。函数曲线的拟合等高线的数据点的凸包在现有的排序图,或者绘制新的图形。如果select ==   TRUE和顺利有效地处罚的模型,没有将绘制轮廓。

gam determines the degree of smoothness for the fitted response surface during model fitting. Argument method controls how gam performs this smoothness selection. See gam for details of the available options. Using "REML" or "ML" yields p-values for smooths with the best coverage properties if such things matter to you.
gam决定在模型拟合的拟合响应面的光滑程度。参数method控制如何gam执行此平滑的选择。见gam的可用选项的详细信息。使用"REML"或"ML"收益率的p值平滑的覆盖性能最好的,如果这样的事情对你重要。

The function uses scores to extract ordination scores, and x can be any result object known by that function.
该功能使用了scores提取协调分数,和x可以由该函数对象的任何结果。

User can supply a vector of prior weights w. If the ordination object has weights, these will be used. In practise this means that the row totals are used as weights with cca or decorana results. If you do not like this, but want to give equal weights to all sites, you should set w = NULL. The behaviour is consistent with envfit. For complete accordance with constrained cca, you should set display = "lc" (and possibly scaling = 2).
用户可以提供前的权重向量的w。如果协调对象的权重,这些将被使用。在实践中,这意味着该行总计cca或decorana结果作为权重。如果你不喜欢这个,但要给予相同的权重,所有的网站,你应该设置w = NULL。与envfit的行为是一致的。完全按照具有约束cca,你应该设置display = "lc"(也可能是scaling = 2)。

Function calibrate returns the fitted values of the response variable. The newdata must be coordinates of points for which the fitted values are desired. The function is based on predict.gam and will pass extra arguments to that function.
功能calibrate返回的响应变量的拟合值。 newdata必须是所需的拟合值的点的坐标。该功能是基于predict.gam和额外的参数传递给该函数。


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

Function is usually called for its side effect of drawing the contour plot. The function returns the result object of class "ordisurf" that inherits from gam used internally to fit the surface, but adds an item grid that contains the data for the grid surface. The item grid has elements x and y which are vectors of axis coordinates, and element z that is a matrix of fitted values for contour. The values outside the convex hull of observed points are NA in z. The gam component of the result can be used for further analysis like predicting new values (see predict.gam).
通常被称为它的副作用绘制等高线图的功能。函数返回的结果对象的类"ordisurf",继承自gam内部使用,以适应面的,但增加了一个项目,grid,它包含的数据网格表面。项目grid的元素x和y,轴坐标向量,和元素z这是一个矩阵的拟合值contour。外观测点的凸包的值是的NAz。 gam组件可以用于进一步的分析的结果的类似预测新的值(见predict.gam)。


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

The default is to use thinplate splines.  These make sense in ordination as they have equal smoothing in all directions and are rotation invariant.
默认情况下是使用thinplate样条曲线。这使得在协调感,因为他们在各个方向上具有相同的平滑旋转不变。

Graphical arguments supplied to plot.ordisurf are passed on to the underlying plotting functions, contour, persp, and plot.gam. The exception to this is that arguments col and cex can not currently be passed to plot.gam because of a bug in the way that function evaluates arguments when arranging the plot.
图形参数plot.ordisurf被传递到底层的绘图功能,contour,persp,plot.gam。唯一的例外是,参数col和cex目前尚无法传递给plot.gam,因为一个错误的方式,函数计算参数时,安排的图。

A work-around is to call plot.gam directly on the result of a call to ordisurf. See the Examples for an illustration of this.  
一个解决办法是调用“plot.gam直接调用ordisurf的结果。见的例子说明了这一点。


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


Dave Roberts, Jari Oksanen and Gavin L. Simpson



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

generalized additive models. Comput. Stat. Data Analysis 55, 2372–2387.
J. R. Statist. Soc. B 65, 95–114.

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

For basic routines gam, and scores. Function  envfit provides a more traditional and compact
对于基本套路gam和scores。函数envfit提供了一个更传统的和紧凑


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


data(varespec)
data(varechem)
vare.dist <- vegdist(varespec)
vare.mds <- monoMDS(vare.dist)
with(varechem, ordisurf(vare.mds, Baresoil, bubble = 5))

## as above but with extra penalties on smooth terms:[#同上,但在光滑的额外处罚:]
with(varechem, ordisurf(vare.mds, Baresoil, bubble = 5, col = "blue",
                        add = TRUE, select = TRUE))

## Cover of Cladina arbuscula[#覆盖Cladina arbuscula上]
fit <- with(varespec, ordisurf(vare.mds, Cla.arb, family=quasipoisson))
## Get fitted values[#拟合值]
calibrate(fit)

## Plot method[#绘制方法]
plot(fit, what = "contour")

## Plotting the "gam" object[#绘制的“自由亚齐运动”的对象]
plot(fit, what = "gam") ## 'col' and 'cex' not passed on[#关口和CEX“没有通过]
## or via plot.gam directly[#,或通过plot.gam直接]
plot.gam(fit, cex = 2, pch = 1, col = "blue")
## 'col' effects all objects drawn...[#col的效果绘制的对象...]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-27 04:15 , Processed in 0.040287 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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