Learn R Programming

strat (version 0.1)

srank: Ranking strata.

Description

Ranking strata according to the average percentile rank of members in each stratum.

Usage

srank(outcome, strata, weights = NULL, group = NULL)

Arguments

outcome
A numeric vector of outcome.
strata
A vector of length(outcome) indicating strata membership. The elements are coerced to factors by factor.
weights
An optional vector of weights.
group
An optional grouping factor.

Value

An object of class srank. .

Examples

Run this code
strata_info <- with(cpsmarch2015, srank(income, big_class,
 weights = weight, group = education))
print(strata_info, digits = 3)

Run the code above in your browser using DataLab