Learn R Programming

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

weights (version 1.0.1)

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). NOTE: Weighted partial correlation calculations pulled to address a bug.

Copy Link

Version

Install

install.packages('weights')

Monthly Downloads

9,059

Version

1.0.1

License

GPL (>= 2)

Maintainer

Josh Pasek

Last Published

February 12th, 2020

Functions in weights (1.0.1)

wtd.t.test

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

Weighted Histograms
wtd.cors

Produces weighted correlations quickly using C.
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
nalevs

Recode variables to 0-1 scale
wtd.cor

rd

Round Numbers To Text With No Leading Zero
starmaker

Produce stars from p values for tables.
stdz

Standardizes any numerical vector, with weights.
wpct

Provides a weighted table of percentages for any variable.
anes04

Demographic Data From 2004 American National Election Studies (ANES)
wtd.chi.sq

Produces weighted chi-squared tests.
dummify

Separate a factor into separate dummy variables for each level.