sm.surface3d(sm)
sm.surface3d()所属R语言包:sm
Adding a regression surface to an rgl plot.
添加表面的RGL图的一个回归。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function adds a regression surface, defined by a matrix of heights at a regular grid of values of two covariates, to an rgl plot. Missing values can be accommodated.
此函数添加一个规则的网格的两个协变量的值,由一个矩阵的高度定义的回归表面,rgl图。遗漏值可以得到满足。
用法----------Usage----------
sm.surface3d(eval.points, surf, scaling,
col = "green", col.mesh = "black",
alpha = 0.7, alpha.mesh = 1, lit = TRUE, ...)
参数----------Arguments----------
参数:eval.points
a two-column matrix defining the marginal grids of covariate values.
一个两列的矩阵定义的边际网协变量的值。
参数:surf
a matrix of heights corresponding to the grid of covariate values. NAs are allowed.
的高度相对应的协变量值的网格,一个矩阵。 NAS的允许。
参数:scaling
a function to define the scaling for the rgl plot. This function is returned by an initial call to rp.plot3d in the rpanel package.
一个函数来定义缩放rgl图。 rp.plot3drpanel包的初始调用这个函数返回的。
参数:col
the colour of the surface. If col is set to a single value, this is replicated across the two components. However, a matrix of values corresponding to the entries of surf can also be supplied.
的表面的颜色。如果col设置为一个单一的值,这两个组件之间复制。然而,一个矩阵的值对应的条目surf还可以供给。
参数:col.mesh
the colour of the surface mesh. If col.mesh is set to a single value, this is replicated across the two components. However, a matrix of values corresponding to the entries of surf can also be supplied.
表面网格的颜色。如果col.mesh设置为一个单一的值,这两个组件之间复制。然而,一个矩阵的值对应的条目surf还可以供给。
参数:alpha
the transparency of the filled triangles defining the surface. Setting this to 0 will remove the filled triangles from the plot.
限定的表面的填充的三角形的透明度。设置为0,从图中删除填充的三角形。
参数:alpha.mesh
the transparency of the lines drawn across the regular grid of covariate values. Setting this to 0 will remove the lines from the plot.
横跨协变量值的规则的网格绘制的线条的透明度。设置为0,将删除线的图。
参数:lit
a logical variable which controls whether the rgl plot is lit or not.
一个逻辑变量控制是否rgl图点亮或不。
参数:...
other optional parameters which are passed to material3d in the rgl package. </table>
其他可选的参数传递给material3drgl包。 </ TABLE>
Details
详细信息----------Details----------
the principal motivation for this function is that is can handle missing data in regression surfaces. In particular, it can be used to plot the results of applying sm.regression. In addition, the function can be used to build up more complex plots by adding successive surfaces.
此功能的主要动机是可以处理缺失数据的回归表面。特别是,它可以用来施加sm.regression绘制的结果。此外,该函数可以被用来建立通过添加的连续表面的更复杂的图。
值----------Value----------
a vector of length 2 containing the ids of the filled surface and lines aded to the rgl plot.
的长度为2的向量包含填充的表面和线adedrgl图的id。
副作用----------Side Effects----------
a surface is added to the rgl plot.
一个表面被添加到rgl图。
参见----------See Also----------
sm.regression
sm.regression
实例----------Examples----------
provide.data(trawl)
Zone93 <- (Year == 1 & Zone == 1)
Position <- cbind(Longitude - 143, Latitude)
model1 <- sm.regression(Position[Zone93,], Score1[Zone93],
h= c(0.1, 0.1), display = "rgl", xlab="Longitude - 143")
model2 <- sm.regression(Position[Zone93,], Score1[Zone93],
h= c(0.2, 0.2), display = "none")
sm.surface3d(model2$eval.points, model2$est, model1$scaling, col = "red")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|