predict.bSpline(splines)
predict.bSpline()所属R语言包:splines
Evaluate a Spline at New Values of x
评估x的新值样条
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The predict methods for the classes that inherit from the virtual classes bSpline and polySpline are used to evaluate the spline or its derivatives. The plot method for a spline object first evaluates predict with the x argument missing, then plots the resulting xyVector with
predict从虚拟类继承的类的方法bSpline和polySpline被用来评估样条或其衍生物。 plot样条线对象的方法首先计算predictx参数缺少,然后绘制导致xyVector
用法----------Usage----------
## S3 method for class 'bSpline'
predict(object, x, nseg=50, deriv=0, ...)
## S3 method for class 'nbSpline'
predict(object, x, nseg=50, deriv=0, ...)
## S3 method for class 'pbSpline'
predict(object, x, nseg=50, deriv=0, ...)
## S3 method for class 'npolySpline'
predict(object, x, nseg=50, deriv=0, ...)
## S3 method for class 'ppolySpline'
predict(object, x, nseg=50, deriv=0, ...)
参数----------Arguments----------
参数:object
An object that inherits from the bSpline or the polySpline class.
对象bSpline或polySpline类继承的。
参数:x
A numeric vector of x values at which to evaluate the spline. If this argument is missing a suitable set of x values is generated as a sequence of nseq segments spanning the range of the knots.
x价值评估的样条的一个数字向量。如果这种说法是缺少一套合适的x值生成作为nseq跨越海里的范围段的序列。
参数:nseg
A positive integer giving the number of segments in a set of equally-spaced x values spanning the range of the knots in object. This value is only used if x is missing.
一个正整数,在一组间距相等的段数:x值object跨越海里的范围。此值仅用于x如果缺少。
参数:deriv
An integer between 0 and splineOrder(object) - 1 specifying the derivative to evaluate.
整数介于0和splineOrder(object) - 1指定的衍生工具,以评估。
参数:...
further arguments passed to or from other methods.
通过进一步的论据或其他方法。
值----------Value----------
an xyVector with components
xyVector组件
参数:x
the supplied or inferred numeric vector of x values
提供或推断出的数字向量x值
参数:y
the value of the spline (or its deriv'th derivative) at the x vector
在deriv向量样条线的价值(或它的x阶导数)
作者(S)----------Author(s)----------
Douglas Bates and Bill Venables
参见----------See Also----------
xyVector, interpSpline, periodicSpline
xyVector,interpSpline,periodicSpline
举例----------Examples----------
require(graphics); require(stats)
ispl <- interpSpline( weight ~ height, women )
opar <- par(mfrow = c(2, 2), las = 1)
plot(predict(ispl, nseg = 201), # plots over the range of the knots[图多海里的范围]
main = "Original data with interpolating spline", type = "l",
xlab = "height", ylab = "weight")
points(women$height, women$weight, col = 4)
plot(predict(ispl, nseg = 201, deriv = 1),
main = "First derivative of interpolating spline", type = "l",
xlab = "height", ylab = "weight")
plot(predict(ispl, nseg = 201, deriv = 2),
main = "Second derivative of interpolating spline", type = "l",
xlab = "height", ylab = "weight")
plot(predict(ispl, nseg = 401, deriv = 3),
main = "Third derivative of interpolating spline", type = "l",
xlab = "height", ylab = "weight")
par(opar)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|