seasonTrend(wq)
seasonTrend()所属R语言包:wq
Determine seasonal trends
确定季节性趋势
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Find the trend for each season of a time series (matrix or vector) and indicates statistical significance.
查找的趋势对每个季节的以时间序列(矩阵或向量),并表示统计学意义。
用法----------Usage----------
seasonTrend(x, first, last, type = c("slope", "slope.pct"),
method = c("mk", "lin"), plot = FALSE, xlab = NULL,
ylab = NULL, miss = FALSE, legend = FALSE, ...)
参数----------Arguments----------
参数:x
Time series vector, or time series matrix with column names.
时间序列矢量,或时间序列矩阵与列名。
参数:first
First year of desired time interval. Will be adjusted if less than start of series.
第一年所需的时间间隔。如果小于开始的系列将调整。
参数:last
Last year of desired time interval. Will be adjusted if more than end of series.
所需的时间间隔的最后一年。将进行调整,如果超过底系列。
参数:type
Type of trend, either in original units per year, or percent per year.
类型化的趋势,无论是在原单位,每年或%的速度增长。
参数:method
'mk' for Mann-Kendall (Theil-Sen slope), and 'lin' for linear regression (linear slope).
“MK”进行Mann-Kendall突变(的泰尔森坡),“林”的线性回归直线的斜率。
参数:plot
If TRUE, a plot is generated; otherwise the results are listed.
如果TRUE,有一个图是,否则结果列。
参数:xlab
Optional x-axis label.
可选的X轴标签。
参数:ylab
Optional y-axis label.
可选的Y轴标签。
参数:miss
If TRUE, trends with insufficient data.
如果TRUE,发展趋势,没有足够的数据。
参数:legend
If TRUE, a legend is included.
如果TRUE,包含一个传奇。
参数:...
Further parameters to pass to the plotting function.
进一步的参数传递给绘图功能。
Details
详细信息----------Details----------
The slope estimate and its significance are calculated for each season and time series. If type = "slope.pct", the slopes are multiplied by 100 and divided by the overall mean (not the median, which can be zero even in cases where a trend estimate is useful). If method = 'mk'. the Theil-Sen slope is calculated with the Mann-Kendall test of significance. Otherwise, linear regression is used to determine the slope and significance.
计算为每个季节和时间系列的斜率估计及其意义。如果type = "slope.pct",在斜坡被乘以100并除以整体平均(未中位数的趋势估计是有用的情况下,即使是在,它可以是零)。如果method = 'mk'。泰尔森斜率计算Mann-Kendall检验的意义。否则,使用线性回归分析,以确定的斜率及意义。
If plot = TRUE, each time series is represented by a box plot showing the trend for each season. The fill colour of the box indicates whether the trend is significant or not (the legend is optional). When method = 'mk', the proportion of slopes joining the first and last fifths of the data is calculated. If this value is 0.5 or more, the corresponding trends can be omitted by setting miss = TRUE; the trend results may not be a good representation of the entire period and a different time window should be considered.
如果plot = TRUE,每个时间序列表示的箱线图显示每个赛季的趋势。填充颜色的方块表示的趋势是显着的,或是否(传说是可选的)。当method = 'mk',斜坡的比例加入的第一个和最后一个五分之二的数据计算。如果这个值是0.5或以上,相应的趋势是可以省略通过设置miss = TRUE;趋势的结果可能不能很好地代表整个期间,应考虑不同的时间窗口。
Parameters can be passed to the plotting function, in particular, to facet_wrap in ggplot2. The most useful parameters here are ncol (or nrow), which determines the number of columns (or rows) of plots, and scales, which can be set to "free_x" to allow the x-axis to change for each time series.
可以将参数传递到绘图功能,尤其是到facet_wrapggplot2。这里最有用的参数是ncol(nrow),这就决定了数列(或行)的图,和scales,可以设置"free_x"的以允许的x-轴旋转以改变每个时间序列。
值----------Value----------
A data frame with the following fields:
一个数据框具有以下字段:
参数:trend
Theil-Sen slope in original units per year, or percent per year.
的泰尔森坡每年在原单位或个百分点。
参数:p
p-value for the trend according to the Mann-Kendall test.
的趋势,根据Mann-Kendall检验的p-值。
参数:missing
Proportion of slopes joining first and last fifths of the data that are missing.
加入第一个和最后一个五分之二的数据丢失的斜坡的比例。
参数:season
Season number.
季号。
参数:tsname
Name of time series.
的时间序列的名称。
参见----------See Also----------
mannKen, plotSeason, facet_wrap
mannKen,plotSeason,facet_wrap
实例----------Examples----------
x <- sfbayChla
seasonTrend(x, first=1978, last=2009, ncol = 4, plot = TRUE, legend = TRUE)
seasonTrend(x, type = 'slope.pct')
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|