Description Usage Arguments Details Value Examples
Takes in variable and finds median, works with sampling weights
1 | wtd.median(x, weights = NULL)
|
x |
A variable |
weights |
Sampling weights of variable (optional) |
Makes use of the wtd.quantile function, part of the Hmisc package
Returns the median value of the variable
1 2 3 | library(poliscidata)
wtd.median(nes$budget_deficit_x, nes$wt)
|
[1] "FavStrng"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.