Description Usage Arguments Value See Also Examples
A weighted median of the ratios y/x determines the slope of a regression through the origin.
1 | weighted_median_ratio(x, y = NULL, w, na.rm = FALSE)
|
x |
a numeric vector (explanatory variable) |
y |
a numeric vector (response variable) |
w |
a numeric vector of (optional) weights |
na.rm |
a logical value indicating whether rows with |
a vector with two components: intercept and slope
line
, weighted_line
,
weighted_median_line
1 2 3 | x <- c(1,2,4,5)
y <- c(1,0,5,2)
weighted_median_ratio(y~x, w = rep(1, length(y)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.