poly(stats)
poly()所属R语言包:stats
Compute Orthogonal Polynomials
计算正交多项式
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Returns or evaluates orthogonal polynomials of degree 1 to degree over the specified set of points x. These are all orthogonal to the constant polynomial of degree 0. Alternatively, evaluate raw polynomials.
返回或评估1度的正交多项式degree在指定集合点x。这些都是正交度为0的常数多项式。另外,评估原材料的多项式。
用法----------Usage----------
poly(x, ..., degree = 1, coefs = NULL, raw = FALSE)
polym(..., degree = 1, raw = FALSE)
## S3 method for class 'poly'
predict(object, newdata, ...)
参数----------Arguments----------
参数:x, newdata
a numeric vector at which to evaluate the polynomial. x can also be a matrix. Missing values are not allowed in x.
一个数值向量,在评估的多项式。 x也可以是一个矩阵。遗漏值是不允许在x。
参数:degree
the degree of the polynomial. Must be less than the number of unique points.
多项式的程度。必须小于独特的点的数量。
参数:coefs
for prediction, coefficients from a previous fit.
预测,从先前的拟合系数。
参数:raw
if true, use raw and not orthogonal polynomials.
如果属实,使用的原材料和不正交多项式。
参数:object
an object inheriting from class "poly", normally the result of a call to poly with a single vector argument.
一个对象类继承"poly",通常以poly用一个向量的参数调用的结果。
参数:...
poly, polym: further vectors.<br> predict.poly: arguments to be passed to or from other methods.
poly, polym:进一步向量参考predict.poly:要传递给或其他方法的参数。
Details
详情----------Details----------
Although formally degree should be named (as it follows ...), an unnamed second argument of length 1 will be interpreted as the degree.
虽然正式degree应该被命名为(如下...),一位不愿透露姓名的长度为1的第二个参数将被解释为程度。
The orthogonal polynomial is summarized by the coefficients, which can be used to evaluate it via the three-term recursion given in Kennedy & Gentle (1980, pp. 343–4), and used in the predict part of the code.
总结正交多项式系数,可用于通过在肯尼迪和温和的三个长期递归(1980年,第343-4页),以评估它和predict的一部分使用代码。
值----------Value----------
For poly with a single vector argument:<br> A matrix with rows corresponding to points in x and columns corresponding to the degree, with attributes "degree" specifying the degrees of the columns and (unless raw = TRUE) "coefs" which contains the centering and normalization constants used in constructing the orthogonal polynomials. The matrix has given class c("poly", "matrix").
poly一个向量参数:参考矩阵对应在x和列相应的学位点与行的属性,的"degree"指定的列度(除非raw = TRUE)"coefs"其中包含的定心和规范化建设的正交多项式在使用的常数。矩阵类c("poly", "matrix")。
Other cases of poly and polym, and predict.poly: a matrix.
poly和polym,predict.poly:矩阵的其他情形。
注意----------Note----------
This routine is intended for statistical purposes such as contr.poly: it does not attempt to orthogonalize to machine accuracy.
此例程用于统计用途,如contr.poly:它并不试图正交化机床精度。
参考文献----------References----------
Statistical Models in S. Wadsworth & Brooks/Cole.
Statistical Computing Marcel Dekker.
参见----------See Also----------
contr.poly.
contr.poly。
cars for an example of polynomial regression.
cars多项式回归的一个例子。
举例----------Examples----------
od <- options(digits=3) # avoid too much visual clutter[避免过多的视觉混乱]
(z <- poly(1:10, 3))
predict(z, seq(2, 4, 0.5))
zapsmall(poly(seq(4, 6, 0.5), 3, coefs = attr(z, "coefs")))
zapsmall(polym(1:4, c(1, 4:6), degree=3)) # or just poly()[或只是聚()]
zapsmall(poly(cbind(1:4, c(1, 4:6)), degree=3))
options(od)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|