isoreg(stats)
isoreg()所属R语言包:stats
Isotonic / Monotone Regression
等渗/单调回归
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute the isotonic (monotonely increasing nonparametric) least squares regression which is piecewise constant.
计算等渗(monotonely增加非参数)的最小二乘回归是分段常数。
用法----------Usage----------
isoreg(x, y = NULL)
参数----------Arguments----------
参数:x, y
coordinate vectors of the regression points. Alternatively a single plotting structure can be specified: see xy.coords.
协调向量回归点。或者指定一个单一的绘图结构可以看到xy.coords。
Details
详情----------Details----------
The algorithm determines the convex minorant m(x) of the cumulative data (i.e., cumsum(y)) which is piecewise linear and the result is m'(x), a step function with level changes at locations where the convex m(x) touches the cumulative data polygon and changes slope.<br> as.stepfun() returns a stepfun object which can be more parsimonious.
该算法确定凸minorant累计数据(即,m(x))是分段线性的,其结果是cumsum(y)水平的变化,在地方凸步功能m'(x) m(x)倒是累计数据多边形和变化斜率。参考as.stepfun()返回一个stepfun对象可以是更简洁。
值----------Value----------
isoreg() returns an object of class isoreg which is basically a list with components
isoreg()类isoreg返回的对象,这基本上是一个组件列表
参数:x
original (constructed) abscissa values x.
原(建)横坐标值x。
参数:y
corresponding y values.
对应的y值。
参数:yf
fitted values corresponding to ordered x values.
有序的x值对应的拟合值。
参数:yc
cumulative y values corresponding to ordered x values.
累计y值对应的有序的x值。
参数:iKnots
integer vector giving indices where the fitted curve jumps, i.e., where the convex minorant has kinks.
整数向量给指数拟合曲线的跳跃,即凸minorant有扭结。
参数:isOrd
logical indicating if original x values were ordered increasingly already.
逻辑表明,如果原来的X值越来越多已被勒令。
参数:ord
if(!isOrd): integer permutation order(x) of original x.
if(!isOrd):整数置换原来order(x)x。
参数:call
the call to isoreg() used.
callisoreg()使用。
注意----------Note----------
The code should be improved to accept weights additionally and solve the corresponding weighted least squares problem.<br> "Patches are welcome!"
提高代码应接受重量此外,解决相应的加权最小二乘问题。参考“补丁欢迎!”
参考文献----------References----------
Statistical inference under order restrictions; Wiley, London.
Order Restricted Statistical Inference; Wiley, New York.
参见----------See Also----------
the plotting method plot.isoreg with more examples; isoMDS() from the MASS package internally uses isotonic regression.
绘图方法plot.isoreg更多的例子; isoMDS()MASS包内部使用等渗回归。
举例----------Examples----------
require(graphics)
(ir <- isoreg(c(1,0,4,3,3,5,4,2,0)))
plot(ir, plot.type = "row")
(ir3 <- isoreg(y3 <- c(1,0,4,3,3,5,4,2, 3)))# last "3", not "0"[最后的“3”,而不是“0”]
(fi3 <- as.stepfun(ir3))
(ir4 <- isoreg(1:10, y4 <- c(5, 9, 1:2, 5:8, 3, 8)))
cat(sprintf("R^2 = %.2f\n",
1 - sum(residuals(ir4)^2) / ((10-1)*var(y4))))
## If you are interested in the knots alone :[#如果你有兴趣在结单:]
with(ir4, cbind(iKnots, yf[iKnots]))
## Example of unordered x[] with ties:[#示例无序X []与关系:]
x <- sample((0:30)/8)
y <- exp(x)
x. <- round(x) # ties![联系!]
plot(m <- isoreg(x., y))
stopifnot(all.equal(with(m, yf[iKnots]),
as.vector(tapply(y, x., mean))))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|