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

R语言:smoothEnds()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 18:55:06 | 显示全部楼层 |阅读模式
smoothEnds(stats)
smoothEnds()所属R语言包:stats

                                        End Points Smoothing (for Running Medians)
                                         终点平滑(运行中位数)

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

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

Smooth end points of a vector y using subsequently smaller medians and Tukey's end point rule at the very end. (of odd span),
矢量y随后较小的中位数和Tukey的终点规则,在最后顺利结束点。 (奇数跨度)


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


smoothEnds(y, k = 3)



参数----------Arguments----------

参数:y
dependent variable to be smoothed (vector).
平滑因变量(向量)。


参数:k
width of largest median window; must be odd.
最大的中位数窗口的宽度;必须是奇数。


Details

详情----------Details----------

smoothEnds is used to only do the "end point smoothing", i.e., change at most the observations closer to the beginning/end than half the window k.  The first and last value are computed using Tukey's end point rule, i.e., sm[1] = median(y[1], sm[2], 3*sm[2] - 2*sm[3]).
smoothEnds只做终点平滑“,即改变大多数意见超过一半的窗口k接近的开始/结束。第一个和最后一个值计算使用终点Tukey的规则,即sm[1] = median(y[1], sm[2], 3*sm[2] - 2*sm[3])。


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

vector of smoothed values, the same length as y.
矢量平滑值,为y的长度相同。


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


Martin Maechler



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

Exploratory Data Analysis, Addison.
ABC of EDA (Applications, Basics, and Computing of Exploratory Data Analysis); Duxbury.

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

runmed(*, endrule = "median") which calls smoothEnds().
runmed(*, endrule = "median")要求smoothEnds()。


举例----------Examples----------


require(graphics)

y <- ys <- (-20:20)^2
y [c(1,10,21,41)] <-  c(100, 30, 400, 470)
s7k <- runmed(y,7, endrule = "keep")
s7. <- runmed(y,7, endrule = "const")
s7m <- runmed(y,7)
col3 <- c("midnightblue","blue","steelblue")
plot(y, main = "Running Medians -- runmed(*, k=7, end.rule = X)")
lines(ys, col = "light gray")
matlines(cbind(s7k,s7.,s7m), lwd= 1.5, lty = 1, col = col3)
legend(1,470, paste("endrule",c("keep","constant","median"),sep=" = "),
       col = col3, lwd = 1.5, lty = 1)

stopifnot(identical(s7m, smoothEnds(s7k, 7)))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-4 23:32 , Processed in 0.020624 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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