radfit(vegan)
radfit()所属R语言包:vegan
Rank – Abundance or Dominance / Diversity Models
排名 - 丰度或显性/多样性模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Functions construct rank – abundance or dominance / diversity or Whittaker plots and fit brokenstick, pre-emption, log-Normal, Zipf and Zipf-Mandelbrot models of species abundance.
的功能构造排名 - 丰富的显性/的多样性或惠特克图和合适的brokenstick的,先发制人,对数正态分布,齐普夫和齐普夫-曼德尔布罗植物物种丰富度模型。
用法----------Usage----------
## S3 method for class 'data.frame'
radfit(df, ...)
## S3 method for class 'radfit.frame'
plot(x, order.by, BIC = FALSE, model, legend = TRUE,
as.table = TRUE, ...)
## Default S3 method:[默认方法]
radfit(x, ...)
## S3 method for class 'radfit'
plot(x, BIC = FALSE, legend = TRUE, ...)
radlattice(x, BIC = FALSE, ...)
rad.null(x, family=poisson, ...)
rad.preempt(x, family = poisson, ...)
rad.lognormal(x, family = poisson, ...)
rad.zipf(x, family = poisson, ...)
rad.zipfbrot(x, family = poisson, ...)
## S3 method for class 'radline'
plot(x, xlab = "Rank", ylab = "Abundance", type = "b", ...)
## S3 method for class 'radline'
lines(x, ...)
## S3 method for class 'radline'
points(x, ...)
as.rad(x)
## S3 method for class 'rad'
plot(x, xlab = "Rank", ylab = "Abundance", log = "y", ...)
参数----------Arguments----------
参数:df
Data frame where sites are rows and species are columns.
数据框的网站行和物种的列。
参数:x
A vector giving species abundances in a site, or an object to be plotted.
一个向量给在现场的物种丰度,还是要绘制的对象。
参数:order.by
A vector used for ordering sites in plots.
一个矢量,用于订购网站的图。
参数:BIC
Use Bayesian Information Criterion, BIC, instead of Akaike's AIC. The penalty for a parameter is k = log(S) where S is the number of species, whereas AIC uses k = 2.
使用贝叶斯信息准则,BIC,而不是Akaike的AIC。参数的刑罚是k = log(S)其中S是物种的数量,而AIC使用k = 2。
参数:model
Show only the specified model. If missing, AIC is used to select the model. The model names (which can be abbreviated) are Preemption, Lognormal, Veiled.LN, Zipf, Mandelbrot.
只显示指定的模型。如果缺少,AIC用于选择模型。的型号名称(可略)Preemption,Lognormal,Veiled.LN,Zipf,Mandelbrot。
参数:legend
Add legend of line colours.
传说中的线条颜色。
参数:as.table
Arrange panels starting from upper left corner (passed to xyplot).
排列面板,从左上角传递给xyplot开始。
参数:family
Error distribution (passed to glm). All alternatives accepting link = "log" in family can be used, although not all make sense.
错误分布(传递到glm)。所有的替代品接受link = "log"的family可以使用,但并非所有有意义的。
参数:xlab,ylab
Labels for x and y axes.
x和y轴的标签。
参数:type
Type of the plot, "b" for plotting both observed points and fitted lines, "p" for only points, "l" for only fitted lines, and "n" for only setting the frame.
的图类型,"b"绘制两个观测点的拟合线,"p"只点,"l"只拟合线,和"n"只设置框。
参数:log
Use logarithmic scale for given axis. The default log =" y" gives the traditional plot in community ecology where the pre-emption model is a straight line, and with log = "xy" Zipf model is a straight line. With log = "" both axes are in the original arithmetic scale.
使用给定的轴为对数刻度。默认log =" y"给社会生态的传统图的优先购买权模型是一条直线,并与log = "xy"齐夫模型是一条直线。随着log = ""两个轴是在原来的算术规模。
参数:...
Other parameters to functions.
其他函数的参数。
Details
详细信息----------Details----------
Rank – Abundance Dominance (RAD) or Dominance/Diversity plots (Whittaker 1965) display logarithmic species abundances against species rank order. These plots are supposed to be effective in analysing types of abundance distributions in communities. These functions fit some of the most popular models mainly following Wilson (1991). Function as.rad constructs observed RAD data. Functions rad.XXXX (where XXXX is a name) fit the individual models, and function radfit fits all models. The argument of the function radfit can be either a vector for a single community or a data frame where each row represents a distinct community. All these functions have their own plot functions. When the argument is a data frame, plot uses Lattice graphics, and other plot functions use ordinary graphics. The ordinary graphics functions return invisibly an ordiplot object for observed points, and function identify.ordiplot can be used to label selected species. The most complete control of graphics can be achieved with rad.XXXX methods which have points and lines functions to add observed values and fitted models into existing graphs. Alternatively, radlattice uses Lattice graphics to display each radfit model in a separate panel together with their AIC or BIC values.
排名 - 丰度优势(RAD)或显性/多样性图(惠特克1965年)显示数种丰度对物种的排名顺序。这些图都应该在社区的丰度分布类型的分析是有效的。这些功能适合一些最流行的款式主要有以下威尔逊(1991)。函数as.rad构造观察到的RAD数据。功能rad.XXXX(其中XXXX是出了名)适合个别车型,函数radfit适合所有型号。的参数的功能radfit的可以是一个向量,一个社区或一个数据框,每一行代表一个独特的社区。所有这些功能都有自己的plot功能。如果参数是一个数据框,plot使用Lattice图形和其他plot功能,使用普通的图形。不可见的普通的图形函数返回ordiplot对象为观测点,函数identify.ordiplot可以用来标记选定物种。 rad.XXXX有points和lines函数观测值与拟合模型添加到现有的图形的方法,可以实现最完整的图形控制。另外,radlattice使用Lattice图形显示每一个radfit模型在一个单独的面板,连同他们的AIC或BIC值。
Function rad.null fits a brokenstick model where the expected abundance of species at rank r is a[r] = J/S sum(from x=r to S) 1/x (Pielou 1975), where J is the total number of individuals (site total) and S is the total number of species in the community. This gives a Null model where the individuals are randomly distributed among observed species, and there are no fitted parameters. Function rad.preempt fits the niche preemption model, a.k.a. geometric series or Motomura model, where the expected abundance a of species at rank r is a[r] = J*alpha*(1-alpha)^(r-1). The only estimated parameter is the preemption coefficient α which gives the decay rate of abundance per rank. The niche preemption model is a straight line in a RAD plot. Function rad.lognormal fits a log-Normal model which assumes that the logarithmic abundances are distributed Normally, or a[r] = exp(log(mu) + log(sigma) * N), where N is a Normal deviate. Function rad.zipf fits the Zipf model a[r] = J*p1*r^gamma where p1 is the fitted proportion of the most abundant species, and γ is a decay coefficient. The Zipf – Mandelbrot model (rad.zipfbrot) adds one parameter: a[r] = J*c*(r+beta)^gamma after which p1 of the Zipf model changes into a meaningless scaling constant c. There are grand narratives about ecological mechanisms behind each model (Wilson 1991), but several alternative and contrasting mechanisms can produce similar models and a good fit does not imply a specific mechanism.
函数rad.null适合一个brokenstick,模型中预期的物种丰富度在排名r是a[r] = J/S sum(from x=r to S) 1/x(均匀度,1975年),其中J是个体总数(现场总)和S是社会总种数的。这给出了一个空的模型,其中个人观察到的物种之间是随机分布的,并且还有没有拟合参数。 rad.preempt适合的利基抢占模型,也就是几何级数或本村模型,预期的丰度a种在排名r是a[r] = J*alpha*(1-alpha)^(r-1)的功能。只是估计的参数是抢占系数α提供了丰富每级的衰减率。利基抢占模型在RAD曲线是一条直线。函数rad.lognormal符合对数正态模型,即假设对数丰度分布通常情况下,或a[r] = exp(log(mu) + log(sigma) * N)N是一个正常的偏离。功能rad.zipf符合齐普夫模型,a[r] = J*p1*r^gamma其中p1是拟合比例最丰富的物种,γ是一个衰减系数。齐夫 - 曼德尔布罗模型(rad.zipfbrot)添加一个参数:a[r] = J*c*(r+beta)^gamma后,p1的的齐普夫模型变成一个毫无意义的缩放常数c。每个模型(威尔逊1991年)的生态背后的机制是宏大叙事,但几种可供选择和对比的机制可以产生类似的模型和一个不错的选择,并不意味着一个具体的机制。
Log-Normal and Zipf models are generalized linear models (glm) with logarithmic link function. Zipf-Mandelbrot adds one nonlinear parameter to the Zipf model, and is fitted using nlm for the nonlinear parameter and estimating other parameters and log-Likelihood with glm. Pre-emption model is fitted as purely nonlinear model. There are no estimated parameters in the Null model. The default family is poisson which is appropriate only for genuine counts (integers), but other families that accept link = "log" can be used. Family Gamma may be appropriate for abundance data, such as cover. The “best” model is selected by AIC. Therefore “quasi” families such as quasipoisson cannot be used: they do not have AIC nor log-Likelihood needed in non-linear models.
对数正态和齐普夫模型是广义线性模型(glm)对数的连结功能。齐夫 - 曼德尔布罗增加一个非线性参数的齐普夫模型,并配备使用nlm的非线性参数和其他参数和对数似然估计glm。优先购买权模型拟合纯粹的非线性模型。有没有空模型的参数估计。默认family是poisson“这是只适用于真正的计数(整数),但其他家庭,接受link = "log"可以使用。家庭Gamma可能是适当的丰度数据,如盖。 “最佳”模型选择AIC。因此,“准”的家庭,如quasipoisson不能使用,他们没有AIC也不需要对数似然非线性模型。
值----------Value----------
Function rad.XXXX will return an object of class radline, which is constructed to resemble results of glm and has many (but not all) of its components, even when only nlm was used in fitting. At least the following glm methods can be applied to the result: fitted, residuals.glm with alternatives "deviance" (default), "pearson", "response", function coef, AIC, extractAIC, and deviance. Function radfit applied to a vector will return an object of class radfit with item y for the constructed RAD, item family for the error distribution, and item models containing each radline object as an item. In addition, there are special AIC, coef and fitted implementations for radfit results. When applied to a data frame radfit will return an object of class radfit.frame which is a list of radfit objects; function summary can be used to display the results for individual radfit objects. The functions are still preliminary, and the items in the radline objects may change.
功能rad.XXXX将返回一个对象类radline,这是构建类似于glm的结果,有很多(但不是全部),其成分,即使只有nlm使用接头。至少有以下glm方法可以应用到的结果是:fitted,residuals.glm使用替代品的"deviance"(默认),"pearson","response" ,功能coef,AIC,extractAIC和deviance。功能radfit应用到一个向量将返回一个对象类radfit项y的构建RAD,项目family的误差分布,以及项目models 包含每一个radline对象的作为一个项目。此外,还有一些特殊的AIC,coef和fitted实现radfit结果。当施加到一个数据框radfit将返回一个对象的类radfit.frame是radfit对象列表;函数summary可以用来显示的结果为个别 radfit对象。的功能仍是初步的,,和radline对象中的项目可能会改变。
注意----------Note----------
The RAD models are usually fitted for proportions instead of original abundances. However, nothing in these models seems to require division of abundances by site totals, and original observations are used in these functions. If you wish to use proportions, you must standardize your data by site totals, e.g. with decostand and use appropriate family such as Gamma.
RAD模型通常配备的比例,而不是原来的丰度。然而,似乎没有在这些模型中,要求部门网站总数的丰度,原始观测中使用这些功能。如果你想使用比例,你必须通过网站总数标准化你的数据,例如与decostand和使用适当的family如Gamma。
The lognormal model is fitted in a standard way, but I do think this is not quite correct – at least it is not equivalent to fitting Normal density to log abundances like originally suggested (Preston 1948).
对数正态模型被安装在一个标准的方式,但我认为这是不完全正确的 - 至少它不等于配件的正常密度记录像最初建议的丰度(普雷斯顿1948年)。
Some models may fail. In particular, estimation of the Zipf-Mandelbrot model is difficult. If the fitting fails, NA is returned.
有些型号可能会失败。特别是,估计的齐普夫曼德尔布罗模型是困难的。如果配件出现故障,NA返回。
Wilson (1991) defined preemption model as a[r] = J*p1*(1 - alpha)^(r-1), where p1 is the fitted proportion of the first species. However, parameter p1 is completely defined by α since the fitted proportions must add to one, and therefore I handle preemption as a one-parameter model.
威尔逊(1991)定义的抢占模型a[r] = J*p1*(1 - alpha)^(r-1),其中p1是拟合的第一个物种的比例。然而,参数p1完全定义的α以来的合身的比例必须添加到一个,所以我作为一个参数模型处理抢占。
Veiled log-Normal model was included in earlier releases of this function, but it was removed because it was flawed: an implicit veil line also appears in the ordinary log-Normal. The latest release version with rad.veil was 1.6-10.
高冠对数正态模型,包括在早期版本中此功能,但它被删除,因为它是有缺陷的:隐的面纱线也出现在普通的对数正态分布。最新版本的rad.veil1.6-10。
(作者)----------Author(s)----------
Jari Oksanen
参考文献----------References----------
species. Ecology 29, 254–283.
communities. Science 147, 250–260.
curves. Journal of Vegetation Science 2, 35–46.
参见----------See Also----------
fisherfit and prestonfit. An alternative approach is to use qqnorm or qqplot with any distribution. For controlling graphics: Lattice,
fisherfit和prestonfit。另一种方法是使用qqnorm或qqplot任何分布的。为了控制图形:Lattice,
实例----------Examples----------
data(BCI)
mod <- rad.lognormal(BCI[5,])
mod
plot(mod)
mod <- radfit(BCI[1,])
## Standard plot overlaid for all models[#标准曲线叠加的所有型号]
## Pre-emption model is a line[#优先购买权的模型是一个线]
plot(mod)
## log for both axes: Zipf model is a line[#记录中的两个坐标轴:齐夫模型是一个线]
plot(mod, log = "xy")
## Lattice graphics separately for each model[#点阵图形,分别为每个模型]
radlattice(mod)
# Take a subset of BCI to save time and nerves[的一个子集,以节省时间和神经的BCI]
mod <- radfit(BCI[3:5,])
mod
plot(mod, pch=".")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|