Package strat. November 23, 2016

Similar documents
Package ECctmc. May 1, 2018

Package datasets.load

Package validara. October 19, 2017

Package readobj. November 2, 2017

Package ramcmc. May 29, 2018

Package fastdummies. January 8, 2018

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package bigreadr. R topics documented: August 13, Version Date Title Read Large Text Files

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package iccbeta. January 28, 2019

Package mdftracks. February 6, 2017

Package robotstxt. November 12, 2017

Package geogrid. August 19, 2018

Package sfc. August 29, 2016

Package apastyle. March 29, 2017

Package clipr. June 23, 2018

Package wrswor. R topics documented: February 2, Type Package

Package semver. January 6, 2017

Package ompr. November 18, 2017

Package spark. July 21, 2017

Package ibm. August 29, 2016

Package readxl. April 18, 2017

Package SimilaR. June 21, 2018

Package rtext. January 23, 2019

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package SEMrushR. November 3, 2018

Package farver. November 20, 2018

Package postgistools

Package deductive. June 2, 2017

Package jstree. October 24, 2017

Package QCAtools. January 3, 2017

Package dbx. July 5, 2018

Package coga. May 8, 2018

Package kirby21.base

Package hyphenatr. August 29, 2016

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package queuecomputer

Package messaging. May 27, 2018

Package reval. May 26, 2015

Package combiter. December 4, 2017

Package fst. December 18, 2017

Package jdx. R topics documented: January 9, Type Package Title 'Java' Data Exchange for 'R' and 'rjava'

Package splithalf. March 17, 2018

Package MatchIt. April 18, 2017

Package triebeard. August 29, 2016

Package elmnnrcpp. July 21, 2018

Package fbroc. August 29, 2016

Package available. November 17, 2017

Package censusapi. August 19, 2018

Package AhoCorasickTrie

Package optimus. March 24, 2017

Package bisect. April 16, 2018

Package TVsMiss. April 5, 2018

Package regexselect. R topics documented: September 22, Version Date Title Regular Expressions in 'shiny' Select Lists

Package lexrankr. December 13, 2017

Package glcm. August 29, 2016

Package kdtools. April 26, 2018

Package milr. June 8, 2017

Package eply. April 6, 2018

Package gtrendsr. October 19, 2017

Package raker. October 10, 2017

Package IATScore. January 10, 2018

Package ecoseries. R topics documented: September 27, 2017

Package modmarg. R topics documented:

Package samplesizecmh

Package GetITRData. October 22, 2017

Package Numero. November 24, 2018

Package slickr. March 6, 2018

Package fastrtext. December 10, 2017

Package gtrendsr. August 4, 2018

Package manet. September 19, 2017

Package fst. June 7, 2018

Package NFP. November 21, 2016

Package ClusterBootstrap

Package repec. August 31, 2018

Package nmslibr. April 14, 2018

Package nngeo. September 29, 2018

Package rsppfp. November 20, 2018

Package tidyselect. October 11, 2018

Package canvasxpress

Package goodpractice

Package estprod. May 2, 2018

Package PCADSC. April 19, 2017

Package crochet. January 8, 2018

Package tidyimpute. March 5, 2018

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package rprojroot. January 3, Title Finding Files in Project Subdirectories Version 1.3-2

Package jpmesh. December 4, 2017

Package librarian. R topics documented:

Package OLScurve. August 29, 2016

Package TrafficBDE. March 1, 2018

Package bife. May 7, 2017

Package PedCNV. February 19, 2015

Package braqca. February 23, 2018

Package utilsipea. November 13, 2017

Package purrrlyr. R topics documented: May 13, Title Tools at the Intersection of 'purrr' and 'dplyr' Version 0.0.2

Package rbraries. April 18, 2018

Package RaPKod. February 5, 2018

Package Mondrian. R topics documented: March 4, Type Package

Transcription:

Type Package Package strat November 23, 2016 Title An Implementation of the Stratification Index Version 0.1 An implementation of the stratification index proposed by Zhou (2012) <DOI:10.1177/0081175012452207>. The package provides two functions, srank, which returns stratum-specific information, including population share and average percentile rank; and strat, which returns the stratification index and its approximate standard error. When a grouping factor is specified, strat also provides a detailed decomposition of the overall stratification into between-group and within-group components. Depends R (>= 3.3.1), Imports Hmisc (>= 4.0-0), Rcpp, stats LinkingTo Rcpp, RcppArmadillo License GPL (>= 3) LazyData TRUE RoxygenNote 5.0.1 Suggests testthat URL https://github.com/xiangzhou09/strat BugReports https://github.com/xiangzhou09/strat/issues NeedsCompilation yes Author Xiang Zhou [aut, cre] Maintainer Xiang Zhou <xiang_zhou@fas.harvard.edu> Repository CRAN Date/Publication 2016-11-23 01:26:06 R topics documented: cpsmarch2015........................................ 2 print.srank.......................................... 2 1

2 print.srank print.strat.......................................... 3 srank............................................. 3 strat............................................. 4 Index 6 cpsmarch2015 A Subset of March CPS 2015 Sample Format A dataset containing income, big class, microclass, and education of 14,358 male respondents from March CPS 2015 cpsmarch2015 A data frame with 14358 rows and 5 variables: income personal market income, in US dollars big_class big class membership micro_class microclass membership education educational attainment weight sampling weight given by CPS print.srank Print an object of class srank Print an object of class srank ## S3 method for class 'srank' print(x, digits = 3,...) x digits An object of class srank the number of significant digits to use when printing... further arguments passed to or from other methods

print.strat 3 print.strat Print an object of class strat Print an object of class strat ## S3 method for class 'strat' print(x, digits = 3,...) x digits An object of class strat the number of significant digits to use when printing... further arguments passed to or from other methods srank Ranking strata. Ranking strata according to the average percentile rank of members in each stratum. srank(outcome, strata, weights = NULL, group = NULL) outcome strata weights group A numeric vector of outcome. A vector of length(outcome) indicating strata membership. The elements are coerced to factors by factor. An optional vector of weights. An optional grouping factor. Value An object of class srank. raw summary a data frame consisting of complete cases of all inputs. a data frame of stratum-specific information, including name, population share, and average percentile rank.

4 strat Examples strata_info <- with(cpsmarch2015, srank(income, big_class, weights = weight, group = education)) print(strata_info, digits = 3) strat Stratification index. strat computes the stratification index proposed in Zhou (2012). When group is specified, it also returns between-group and within-group components of the overall stratification. strat(outcome, strata, weights = NULL, ordered = FALSE, group = NULL) outcome strata weights ordered group A numeric vector of outcome. A vector of length(outcome) indicating strata membership. The elements are coerced to factors by factor. An optional vector of weights. Logical. If TRUE strata are pre-ordered ascendingly. An optional grouping factor. If specified, strat also returns between-group and within-group components of the overall stratification. Value An object of class strat. overall strata_info decomposition within_group a vector of two, giving computed stratification index and approximate standard error. a data frame of stratum-specific information, including name, population share, and average percentile rank. between-group and within-group components of the overall stratification. within-group indices of stratification by group. References Zhou, Xiang. 2012. "A Nonparametric Index of Stratification." Sociological Methodology, 42(1): 365-389.

strat 5 Examples s <- with(cpsmarch2015, strat(income, big_class, weights = weight, group = education)) print(s, digits = 4) print(s$strata_info, digits = 4) print(s$within_group, digits = 4)

Index Topic datasets cpsmarch2015, 2 cpsmarch2015, 2 factor, 3, 4 print.srank, 2 print.strat, 3 srank, 3 strat, 4 6