Learn R Programming

⚠️There's a newer version (1.0.4) of this package.Take me there.

weights (version 0.85)

Weighting and Weighted Statistics

Description

Provides a variety of functions for producing simple weighted statistics, such as weighted Pearson's correlations, partial correlations, Chi-Squared statistics, histograms, and t-tests. Also now includes some software for quickly recoding survey data and plotting point estimates from interaction terms in regressions (and multiply imputed regressions). Future versions of the package will be more closely integrated with "anesrake" and additional weighting tools and will provide the option to find weighting benchmarks and weight data using a variety of methodologies. NOTE: Weighted partial correlation calculations temporarily pulled to address a bug.

Copy Link

Version

Install

install.packages('weights')

Monthly Downloads

9,059

Version

0.85

License

GPL-2

Maintainer

Josh Pasek

Last Published

February 12th, 2016

Functions in weights (0.85)

wpct

Provides a weighted table of percentages for any variable.
plotwtdinteraction

Functions to Identify and Plot Predicted Probabilities As Well As Two- and Three-Way Interactions From Regressions With or Without Weights and Standard Errors
dummify

Separate a factor into separate dummy variables for each level.
wtd.cor

wtd.cors

Produces weighted correlations quickly using C.
wtd.chi.sq

Produces weighted chi-squared tests.
stdz

Standardizes any numerical vector, with weights.
nalevs

Recode variables to 0-1 scale
wtd.hist

Weighted Histograms
anes04

Demographic Data From 2004 American National Election Studies (ANES)
rd

Round Numbers To Text With No Leading Zero
starmaker

Produce stars from p values for tables.
wtd.t.test

Produces weighted Student's t-tests with standard errors and significance.