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

R语言 scam包 smooth.construct.mdcv.smooth.spec()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 22:39:03 | 显示全部楼层 |阅读模式
smooth.construct.mdcv.smooth.spec(scam)
smooth.construct.mdcv.smooth.spec()所属R语言包:scam

                                        Constructor for monotone decreasing and concave P-splines in SCAMs
                                         构造函数单调递减,凹P-样条诈骗

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

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

This is a special method function for creating smooths subject to both monotone decreasing and concavity constraints which is built by  the mgcv constructor function for smooth terms, smooth.construct.  It is constructed using mixed constrained P-splines. This smooth is specified via model terms such as  s(x,k,bs="mdcv",m=2),  where k denotes the basis dimension and m+1 is the order of the B-spline basis.
这是一种特殊的方法,用于创建平滑功能单调递减的,凹的限制是建立在mgcv的构造函数的光滑条款,smooth.construct。使用混合约束P-样条。这种平稳的规定,通过模型计算,如s(x,k,bs="mdcv",m=2),这里k为基础尺寸和m+1是B样条基的顺序。


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


smooth.construct.mdcv.smooth.spec(object, data, knots)



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

参数:object
A smooth specification object, generated by an s term in a GAM formula.  
光滑的规范对象,产生的s术语一个GAM公式中。


参数:data
A data frame or list containing the data required by this term, with names given by object$term. The by variable is the last element.
一个数据框或列表,其中包含这个词所需要的数据,的名字的object$term。 by变量的最后一个元素。


参数:knots
An optional list containing the knots supplied for basis setup.   If it is NULL then the knot locations are generated automatically.
一个可选的列表,其中包含基础设置中提供的疙瘩。如果是NULL然后结位置自动生成。


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

An object of class "mdcv.smooth".
对象的类"mdcv.smooth"。


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



Natalya Pya <nat.pya@gmail.com>




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



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

smooth.construct.mpi.smooth.spec,  smooth.construct.mpd.smooth.spec,  smooth.construct.cx.smooth.spec,  smooth.construct.cv.smooth.spec,  smooth.construct.mdcx.smooth.spec,  smooth.construct.micx.smooth.spec,  smooth.construct.micv.smooth.spec
smooth.construct.mpi.smooth.spec,smooth.construct.mpd.smooth.spec,smooth.construct.cx.smooth.spec,smooth.construct.cv.smooth.spec,smooth.construct.mdcx.smooth.spec,smooth.construct.micx.smooth.spec,smooth.construct.micv.smooth.spec


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


  ## Not run: [#不运行:]
## Monotone decreasing and concave P-splines example [#单调递减,凹P-样条曲线的例子]
  ## simulating data...[#模拟数据...]
   set.seed(2)
   n <- 100
   x <- sort(runif(n))
   f <- -x^4
   y <- f+rnorm(n)*0.10
   dat <- data.frame(x=x,y=y)
## fit model ...[#拟合模型...]
   b <- scam(y~s(x,k=15,bs="mdcv",m=2),family=gaussian(link="identity"),data=dat)

# UNCONSTRAINED FIT *****************[无约束FIT *****************]
   b1 <- scam(y~s(x,k=15,bs="ps",m=2),family=gaussian(link="identity"),data=dat)

## plot results ...[#图...]
   plot(x,y,xlab="x",ylab="y")
   lines(x,f)          ## the true function[#真正的功能]
   lines(x,b$fitted.values,col=2) ## mixed constrained fit [#混合约束适合]
   lines(x,b1$fitted.values,col=3) ## unconstrained fit [#不受约束的契合]
  
## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-14 18:47 , Processed in 0.027904 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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