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

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

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

                                        Tensor product smoothing constructor for a bivariate function monotone increasing in the first covariate
                                         在第一协的张量积的平滑构造一个二元函数的单调增加

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

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

This is a special method function for creating tensor product bivariate smooths monotone increasing in the first covariate which is built by  the mgcv constructor function for smooth terms, smooth.construct.  It is constructed from a pair of single penalty marginal smooths. This tensor product is specified by model terms such as s(x1,x2,k=c(q1,q2),bs="tesmi1",m=2),  where the basis for the second marginal smooth is specified in the second element of bs.
这是一个特殊的方法,建立张量积二元函数平滑单调递增在第一的协变量是建立在mgcv的构造函数的光滑条款,smooth.construct。这是构建从对单节罚边缘平滑。张量积指定的模型如s(x1,x2,k=c(q1,q2),bs="tesmi1",m=2),第二边缘光滑的基础中指定的第二个元素bs。


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


smooth.construct.tesmi1.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 values of the elements of object$term, with names given by object$term.
一个数据框或列表,其中包含的值的元素object$term,的名字的object$term。


参数:knots
An optional list containing the knots corresponding to object$term.  If it is NULL then the knot locations are generated automatically.
一个可选的列表,其中包含对应的结object$term。如果是NULL然后结位置自动生成。


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

An object of class "tesmi1.smooth". In addition to the usual  elements of a smooth class documented under smooth.construct of the mgcv library,  this object contains:
对象的类"tesmi1.smooth"。除了通常的记录下顺利类元素smooth.constructmgcv图书馆,此对象包含:


参数:p.ident
A vector of 0's and 1's for model parameter identification:  1's indicate parameters which will be exponentiated, 0's - otherwise.
0和1的模型参数识别的矢量:1表示这将是指数化的参数,0  - 否则。


参数:Zc
A matrix of identifiability constraints.
矩阵的可识别性约束。


参数:margin.class
The class of the second unconstrained marginal smooth.
不受约束的边缘平滑的第二类。


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



Natalya Pya <nat.pya@gmail.com>




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



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

smooth.construct.tesmi2.smooth.spec
smooth.construct.tesmi2.smooth.spec


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


  ## Not run: [#不运行:]
## tensor product `tesmi1' example [#张量积tesmi1“的例子]
  ## simulating data...[#模拟数据...]
   set.seed(2)
   n <- 30
   x1 <- sort(runif(n)*4-1)
   x2 <- sort(runif(n))
   f1 <- matrix(0,n,n)
   for (i in 1:n) for (j in 1:n)
       { f1[i,j] <- exp(4*x1[i])/(1+exp(4*x1[i]))+2*sin(pi*x2[j])}
   f <- as.vector(t(f1))
   y <- f+rnorm(length(f))*0.1
   x11 <-  matrix(0,n,n)
   x11[,1:n] <- x1
   x11 <- as.vector(t(x11))
   x22 <- rep(x2,n)
   dat <- list(x1=x11,x2=x22,y=y)
## fit model ...[#拟合模型...]
   b <- scam(y~s(x1,x2,k=c(10,10),bs="tesmi1",m=2),
            family=gaussian(link="identity"), data=dat,sp=NULL)
## plot results ...[#图...]
   par(mfrow=c(2,2))
   plot(b,se=TRUE)
   plot(b,pers=TRUE,theta = 30, phi = 40)
   plot(y,b$fitted.values,xlab="Simulated data",ylab="Fitted data")

## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-14 12:29 , Processed in 0.026508 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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