powered by
slope : linear regression slope
slope
slope_p : linear regression slope and p-value
slope_p
slope_mk : mann kendall Sen's slope and p-value
slope_mk
slope_sen : same as slope_mk, but with no p-value
slope_sen
slope_boot: bootstrap slope and p-value
slope_boot
slope_sen(y, x = NULL)slope(y, x, ...)slope_p(y, x, fast = TRUE)slope_sen_r(y, x = seq_along(y), ...)slope_mk(y, x = NULL, ...)slope_boot(y, x = NULL, slope_FUN = slope, times = 100, alpha = 0.1, seed, ...)
slope(y, x, ...)
slope_p(y, x, fast = TRUE)
slope_sen_r(y, x = seq_along(y), ...)
slope_mk(y, x = NULL, ...)
slope_boot(y, x = NULL, slope_FUN = slope, times = 100, alpha = 0.1, seed, ...)
slope : linear regression coefficient
pvalue : p-value <= 0.05`` means that corresponding slope` is significant.
pvalue
p-value <= 0.05`` means that corresponding
sd : Std. Error
sd
Std. Error
For slope_boot, slope is estimated in many times. The lower, mean, upper and standard deviation (sd) are returned.
vector of observations of length n, or a matrix with n rows.
vector of predictor of length n, or a matrix with n rows.
ignored.
Boolean. If true, stats::.lm.fit() will be used, which is 10x faster than stats::lm().
stats::.lm.fit()
stats::lm()
one of slope(), slope_p(), slope_mk()
slope()
slope_p()
slope_mk()
The number of bootstrap replicates.
significant level, defalt 0.1
a single value, interpreted as an integer, or NULL (see ‘Details’).
NULL
y <- c(4.81, 4.17, 4.41, 3.59, 5.87, 3.83, 6.03, 4.89, 4.32, 4.69) r <- slope(y) r_p <- slope_p(y) r_mk <- slope_mk(y) r_boot <- slope_boot(y)
Run the code above in your browser using DataLab