wtd.mode {poliscidata}R Documentation

Find Mode of Variable

Description

Takes in variable and finds mode, works with sampling weights

Usage

wtd.mode(x, weights = NULL)

Arguments

x

A variable

weights

Sampling weights of variable (optional)

Details

Makes use of the freq function, part of the descr package

Value

Returns the modal value of the variable

Examples

   library(poliscidata)
   
   wtd.mode(gss$zodiac, gss$wtss)

[Package poliscidata version 2.3.0 Index]