srank {strat}R Documentation

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.

raw

a data frame consisting of complete cases of all inputs.

summary

a data frame of stratum-specific information, including name, population share, and average percentile rank.

Examples

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

[Package strat version 0.1 Index]