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

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

[复制链接]
发表于 2012-2-16 20:07:38 | 显示全部楼层 |阅读模式
smoothCon(mgcv)
smoothCon()所属R语言包:mgcv

                                        Prediction/Construction wrapper functions for GAM smooth terms
                                         自由亚齐运动平稳条款的预测/建设包装功能

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

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

Wrapper functions for construction of and prediction from smooth terms in a GAM. The purpose of the wrappers is to allow user-transparant re-parameterization of smooth terms, in order to allow identifiability constraints to be absorbed into the parameterization of each term, if required. The routine also handles "by" variables and construction of identifiability constraints automatically,  although this behaviour can be over-ridden.
包装功能的建设和预测在自由亚齐运动的顺利条款。包装的目的是为了让用户transparant顺利重新参数化,为了让被吸收到每学期的参数辨识的制约,如果需要的话。例行还处理“,”变量和约束自动辨识建设,虽然这种行为可以覆盖。


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


smoothCon(object,data,knots,absorb.cons=FALSE,
          scale.penalty=TRUE,n=nrow(data),dataX=NULL,
          null.space.penalty=FALSE,sparse.cons=0)
PredictMat(object,data,n=nrow(data))



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

参数:object
is a smooth specification object or a smooth object.
是一个平稳的规范对象或光滑的对象。


参数:data
A data frame, model frame or list containing the values of the  (named) covariates at which the smooth term is to be  evaluated. If it's a list then n must be supplied.
一帧数据,模型的框架或列表,其中包含的值(命名)协变量平稳长期进行评估。如果它是一个列表,然后n必须提供。


参数:knots
An optional data frame supplying any knot locations to be supplied for basis construction.
提供一个可选的数据框的基础建设提供任何结的位置。


参数:absorb.cons
Set to TRUE in order to have identifiability constraints absorbed into the basis.
设置为TRUE为了辨识的限制,吸收的基础。


参数:scale.penalty
should the penalty coefficient matrix be scaled to have approximately the same "size" as the inner product of the terms model matrix with itself? This can improve the performance of gamm fitting.
应罚款的系数矩阵可以扩展到与自己的计算模型矩阵内积有大致相同的大小?这可以提高性能gamm装修。


参数:n
number of values for each covariate, or if a covariate is a matrix,  the number of rows in that matrix: must be supplied explicitly if data is a list.  
数量为每个协变量的值,如果协变量是一个矩阵,矩阵中的行数:必须提供明确data如果是一个列表。


参数:dataX
Sometimes the basis should be set up using data in data, but the model matrix should be constructed with another set of data provided in dataX — n is assumed to  be the same for both. Facilitates smooth id's.
有时的基础应建立在data使用数据,但应构建模型矩阵,与另一组提供的数据dataX - n被认为是两个相同的。有利于顺利的id。


参数:null.space.penalty
Should an extra penalty be added to the smooth which will penalize the  components of the smooth in the penalty null space: provides a way of penalizing terms out of the model altogether.
应该被添加到一个额外的罚款,顺利将惩罚罚款空空间的顺利组件:提供了一个惩罚的模型完全。


参数:sparse.cons
If 0 then default sum to zero constraints are used. If 1 then one coefficient is set to zero as constraint for sparse smooths. If 2 then sparse coefficient sum to zero  constraints are used for sparse smooths. None of these options has an effect if the smooth supplies its own  constriant.
如果0然后默认的总和为零约束。如果1然后设置一个系数为零的稀疏约束平滑。如果2然后稀疏系数总和为零约束用于稀疏平滑。这些选项都没有效果,如果顺利的提供自己的constriant。


Details

详情----------Details----------

These wrapper functions exist to allow smooths specified using smooth.construct and Predict.matrix method functions to be re-parameterized so that identifiability constraints are no longer required in fitting. This is done in a user transparent manner, but is typically of no importance in use of GAMs. The routine's  also handle by variables and will create default identifiability  constraints.
这些包装函数的存在使得平滑指定使用smooth.construct和Predict.matrix方法,使辨识约束在装修不再需要进行重新参数化的功能。这是在用户透明的方式,但通常是没有使用GAMS的重要性。例程的处理by变量,将创建默认辨识约束。

If a user defined smooth constructor handles by variables itself, then its  returned smooth object should contain an object by.done. If this does not exist  then smoothCon will use the default code. Similarly if a user defined Predict.matrix  method handles by variables internally then the returned matrix should have a  "by.done" attribute.
如果一个用户定义的顺利构造处理by变量本身,则其返回的顺利对象应包含的对象by.done。如果不存在,那么smoothCon将使用默认的代码。同样,如果一个用户定义的Predict.matrix方法处理by变量内部,然后返回的矩阵应该有一个"by.done"属性。

Default centering constraints, that terms should sum to zero over the covariates, are produced unless  the smooth constructor includes a matrix C of constraints. To have no constraints (in which case  you had better have a full rank penalty!) the matrix C should have no rows. There is an option to  use centering constraint that generate no, or limited infil, if the smoother has a sparse model matrix.
默认为核心的约束,该条款应总和为零的协变量,是顺利的构造,除非包括矩阵C约束。有没有限制(在这种情况下,你最好有一个完整的排名罚款!)矩阵C应该没有任何行。有一个选项,以使用为核心的约束,没有产生,或有限的浸润,如果顺畅,有稀疏的模型矩阵。

smoothCon returns a list of smooths because factor by variables result in multiple copies  of a smooth, each multiplied by the dummy variable associated with one factor level. smoothCon modifies  the smooth object labels in the presence of by variables, to ensure that they are unique, it also stores  the level of a by variable factor associated with a smooth, for later use by PredictMat.
smoothCon返回一个列表平滑,因为因素by多个副本平稳,乘以一个因子水平的哑变量的每个变量的结果。 smoothCon修改by变量存在的顺利对象的标签,以确保它们是唯一的,它也顺利相关的可变因素,以备后用<X存储水平>

The parameterization used by gam can be controlled via gam.control.
gam使用的参数,可以通过gam.control控制。


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

From smoothCon a list of smooth objects returned by the appropriate smooth.construct method function. If constraints are to be absorbed then the objects will have  attributes "qrc" and "nCons". "nCons" is the number of constraints. "qrc" is usually the qr decomposition of the constraint matrix (returned by qr), but if it is a single positive integer it is the index of the  coefficient to set to zero, and if it is a negative number then this indicates that  the parameters are to sum to zero.
从smoothCon列表smooth通过适当的smooth.construct方法函数返回的对象。如果约束是被吸收的对象将有属性"qrc"和"nCons"。 "nCons"人数的限制。 "qrc"通常是约束矩阵的QR分解(qr返回),但如果它是一个正整数,它是指数系数设置为零,如果它是一个负号码,然后这表明参数的总和为零。

For predictMat a matrix which will map the parameters associated with the smooth to the vector of values of the smooth evaluated at the covariate values given in object.
predictMat这将映射到向量在object协值评估值的顺利平稳的相关参数矩阵。


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


Simon N. Wood <a href="mailto:simon.wood@r-project.org">simon.wood@r-project.org</a>



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



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

gam.control,
gam.control

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-24 19:26 , Processed in 0.023279 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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