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

R语言:smooth.terms()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 21:54:56 | 显示全部楼层 |阅读模式
smooth.terms(mgcv)
smooth.terms()所属R语言包:mgcv

                                        Smooth terms in GAM
                                         自由亚齐运动平稳条款

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

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

Smooth terms are specified in a gam formula using s and te terms.  Various smooth classes are available, for different modelling tasks, and users can add smooth classes  (see user.defined.smooth). What defines a smooth class is the basis used to represent  the smooth function and quadratic penalty (or multiple  penalties) used to penalize  the basis coefficients in order to control the degree of smoothness. Smooth classes are  invoked directly by s terms, or as building blocks for tensor product smoothing  via te terms (only smooth classes with single penalties can be used in tensor products). The smooths built into the mgcv package are all based one way or another on low rank versions of splines. For the full rank  versions see Wahba (1990).
使用gam和s条款顺利条款中指定一个te公式。顺利类是各种不同的建模任务,用户可以添加平滑类(见user.defined.smooth)。定义了一个平稳类是用来表示惩罚的基础系数,以控制平滑度光滑函数和二次罚款(或多个处罚)的基础。顺利类直接调用s条款,或张量积块通过te条款(可以在张产品使用单处罚顺利类),平滑的建设。在平滑到mgcv包建花键的低阶版本都基于这种或那种方式。为满秩的版本看到Wahba(1990年)。

Note that smooths can be used rather flexibly in gam models. In particular the linear predictor of the GAM can  depend on (a discrete approximation to) any linear functional of a smooth term, using by variables and the  "summation convention" explained in linear.functional.terms.
请注意,平滑可用于gam模型非常灵活。特别是可以依靠的自由亚齐运动的线性预测(离散近似)任何线性平稳长期的功能,使用by变量和“求和公约”在linear.functional.terms解释。

The single penalty built in smooth classes are summarized as follows
归纳如下顺利类建单处罚




Thin plate regression splines bs="tp". These are low rank isotropic smoothers of any number of covariates. By isotropic is  meant that rotation of the covariate co-ordinate system will not change the result of smoothing. By low rank is meant  that they have far fewer coefficients than there are data to smooth. They are reduced rank versions of the thin plate splines and use the thin plate spline penalty. They are the default smooth for s terms because there is a defined sense in which they are the optimal smoother of any given basis dimension/rank (Wood, 2003). Thin plate regression splines do not have "knots"  (at least not in any conventional sense): a truncated eigen-decomposition is used to achieve the rank reduction.  See tprs for further details.
薄板回归样条bs="tp"。这些都是低级别的任何数量的协变量各向同性平滑。由各向同性意味着协统筹制度的旋转不会改变平滑的结果。由低级别意味着他们少得多的系数比有数据平滑。他们减少薄板样条的排名版本和使用薄板样条罚款。他们默认为s条款的顺利,因为有他们的任何给定的基础上更顺畅的最佳尺寸/等级(木,2003年)定义的意义。薄板回归样条没有“节”(至少不会在任何传统意义上的):用于截断的特征分解,以达到降级。看到tprs作进一步的细节。

bs="ts" is as "tp" but with a small ridge penalty added to the smoothing penalty, so that the whole term can be
bs="ts"是"tp"但与小岭添加到平滑罚款的罚款,可以使整个任期




Duchon splines bs="ds". These generalize thin plate splines. In particular, for any given number of covariates they  allow lower orders of derivative in the penalty than thin plate splines (and hence a smaller null space). See Duchon.spline for further details.
duchon样条bs="ds"。这些概括薄板样条。尤其是对于任何给定数量的协变量,它们允许在罚下衍生的订单比薄板样条线(因此一个较小的空空间)。看到Duchon.spline作进一步的细节。




Cubic regression splines bs="cr".  These have a cubic spline basis defined by a modest sized  set of knots spread evenly through the  covariate values. They are penalized by the conventional intergrated square second derivative cubic spline penalty.  For details see cubic.regression.spline and e.g. Wood (2006a).
三次回归样条bs="cr"。其中有三次样条的基础上,通过协值均匀扩散的集结规模不大的定义。他们是由传统的整合 - 平方米二阶导数的三次样条刑罚处罚。有关详细信息,请参阅cubic.regression.spline“例如木(2006A)。

bs="cs" specifies a shrinkage version of "cr".
bs="cs"指定"cr"的收缩版本。

bs="cc" specifies a cyclic cubic regression splines (see cyclic.cubic.spline). i.e. a penalized cubic regression splines whose ends match, up to second
bs="cc"指定一个循环三次回归样条线(见cyclic.cubic.spline)。即1受罚三次回归样条曲线的两端匹配,上升到第二




Splines on the sphere bs="sos". These are two dimensional splines on a sphere. Arguments are latitude and longitude, and they are  the analogue of thin plate splines for the sphere. Useful for data sampled over a large portion of the globe,
样条上球体bs="sos"。这是两个领域的三维样条。论据是经度和纬度,他们是球体的薄板样条模拟。有用的采样数据超过了全球的大部分,




P-splines bs="ps".  These are P-splines as proposed by Eilers and Marx (1996). They combine a B-spline basis, with a discrete penalty on the basis coefficients, and any sane combination of penalty and basis order is allowed. Although this penalty has no exact interpretation in terms of function shape, in the way that the derivative penalties do, P-splines perform almost as well as conventional splines in many standard applications, and can perform better in particular cases where it is advantageous to mix different orders of basis and penalty.
的P-样条bs="ps"。这些都是艾勒斯和马克思(1996)提出的P-样条。他们结合了B样条的基础上,用离散的基础上,系数罚款,并允许任何罚款和基础秩序的健全结合。虽然这个点球衍生刑罚执行的方式,在函数的形状方面没有确切的解释,P  - 样条执行以及传统的样条在许多标准的应用,以及在特殊情况下可以进行更好的地方,它有利于混合不同的基础和罚款的订单。

bs="cp" gives a cyclic version of a P-spline (see cyclic.p.spline).
bs="cp"给出了一个P样条(见cyclic.p.spline)的循环。




Random effects bs="re". These are parametric terms penalized by a ridge penalty (i.e. the identity matrix). When such a smooth has multiple arguments  then it represents the parametric interaction of these arguments, with the coefficients penalized by a ridge penalty. The ridge penalty is equivalent to an  assumption that the coefficients are i.i.d. normal random effects. See smooth.construct.re.smooth.spec. Note that random effect terms are not suitable
随机效应bs="re"。这是由脊罚款(即单位矩阵)惩罚参数术语。这样顺利当有多个参数,那么它代表的相互作用参数,这些参数由一垄罚款处罚的系数。山脊的罚款相当于一个系数是独立同分布的假设正常的随机效应。看到smooth.construct.re.smooth.spec。需要注意的是随机效应的条件不适合




Markov Random Fields bs="mrf". These are popular when space is split up into discrete contiguous  geographic units (districts of a town, for example). In this case a simple smoothing penalty is constructed
马尔可夫随机场bs="mrf"。这些空间被分成离散连续的地理单元(镇区域,例如)时,很受欢迎。在这种情况下,构建一个简单的平滑罚款

Broadly speaking the default penalized thin plate regression splines tend to give the best MSE performance,  but they are a little slower to set up than the other bases. The knot based penalized cubic regression splines (with derivative based penalties) usually come next in MSE performance, with the P-splines doing  just a little worse. However the P-splines are useful in non-standard situations.
一般来说默认处罚薄板回归样条倾向于给的MSE性能最好的,但他们是慢一点比其他基地成立。根据结处罚立方米回归样条(与衍生基于罚则)通常下的P-样条做一点点差,在MSE性能。然而,在P-样条曲线是在非标准的情况下非常有用。

All the preceding classes (and any user defined smooths with single penalties) may be used as marginal  bases for tensor product smooths specified via te terms, except for "re" terms. Tensor  product smooths are smooth functions  of several variables where the basis is built up from tensor products of bases for smooths of fewer (usually one)  variable(s) (marginal bases). The multiple penalties for these smooths are produced automatically from the penalties of the marginal smooths. Wood (2006b) give the general recipe for this construction.
所有前款类(以及任何用户定义的单处罚平滑)可能被用来作为边际基地,通过te条款中指定的张量积平滑,除外"re"条款。张量积平滑光滑函数的基础建张产品基地为少(通常是一个)变量(S)(边际基地)平滑的几个变量。这些平滑的多个处罚自动产生边缘平滑的惩罚。伍德(2006B)给一般配方这方面的建设。

Tensor product smooths often perform better than isotropic smooths when the covariates of a smooth are not naturally on the same scale, so that their relative scaling is arbitrary. For example, if smoothing with repect to time and  distance, an isotropic smoother will give very different results if the units are cm and minutes compared to if the units are  metres and seconds: a tensor product smooth will  give the same  answer in both cases (see te for an example of this). Note that tensor product terms are knot based, and the  thin plate splines seem to offer no advantage over cubic or P-splines as  marginal bases.
张量积平滑往往更好地执行比各向同性平滑平稳协变量时没有同等规模的自然,使他们的相对比例是任意的。例如,如果平滑。56时间和距离,各向同性平滑会非常不同的结果,如果单位是厘米,相比分钟,如果单位是米和秒:张量的产品顺利将给予同样的答案,在这两种情况下(看到te这样的一个例子)。注意:张量积计算结的基础上,和薄板样条似乎提供不超过三次或边际基地的P-样条的优势。

Some further specialist smoothers that are not suitable for use in tensor products are also available.
还提供一些进一步的专业不适合张产品使用的平滑。




Adaptive smoothers bs="ad"
自适应平滑bs="ad"

Univariate and bivariate adaptive smooths are available (see adaptive.smooth).  These are appropriate when the degree of smoothing should itself vary with the covariates to be smoothed, and the  data contain sufficient information to be able to estimate the appropriate variation. Because this flexibility is  achieved by splitting the penalty into several "basis penalties" these terms are not suitable as components of tensor  product smooths, and are not supported by gamm.
单因素和二元自适应平滑(见adaptive.smooth)。这些都是适当时的平滑度平滑的协变量不同,数据包含足够的信息能够估计相应的变化。因为这种灵活性达到分裂成几个这些条款的基础上,处罚“的刑罚是不适合作为张量积平滑的组成部分,而不是由gamm支持。




Factor smooth interactions bs="fs"
因素的顺利交互bs="fs"

Smooth factor interactions are often produced using by variables (see gam.models), but a special smoother class (see factor.smooth.interaction) is available for the case in which a smooth is required at each of a large number of factor levels (for example a smooth for each patient in a study), and each smooth should have the same smoothing parameter. The "fs" smoothers are set up to be efficient when used with gamm, and have penalties on each null sapce component (i.e. they are fully "random effects").
平滑因子的相互作用,往往会产生使用by变量(见gam.models),而是一个特殊的平滑类(见factor.smooth.interaction)可以顺利在每一个需要的情况下大量的因子水平(例如,为每个患者在研究顺利),每个顺利,应该有相同的平滑参数。设立的"fs"平滑是有效的使用gamm,对每个空sapce组件(也就是说,它们是完全“随机效应”)的处罚。


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



Simon Wood <simon.wood@r-project.org>




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

Statistical Science, 11(2):89-121



generalized additive mixed models. Biometrics 62(4):1025-1036

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

s, te, tprs, cubic.regression.spline,
s,te,tprs,cubic.regression.spline


举例----------Examples----------


## see examples for gam and gamm[#看到GAM和GAMM的例子]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 10:28 , Processed in 0.051794 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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