wtd.median: Find Median of Variable

Description Usage Arguments Details Value Examples

View source: R/wtd.median.r

Description

Takes in variable and finds median, works with sampling weights

Usage

1

Arguments

x

A variable

weights

Sampling weights of variable (optional)

Details

Makes use of the wtd.quantile function, part of the Hmisc package

Value

Returns the median value of the variable

Examples

1
2
3
   library(poliscidata)
   
   wtd.median(nes$budget_deficit_x, nes$wt)

Example output

[1] "FavStrng"

poliscidata documentation built on July 8, 2020, 6:23 p.m.