Learn R Programming

weights (version 1.0.4)

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 estimates from interaction terms in regressions (and multiply imputed regressions) both with and without weights. NOTE: Weighted partial correlation calculations pulled to address a bug.

Copy Link

Version

Install

install.packages('weights')

Monthly Downloads

6,837

Version

1.0.4

License

GPL (>= 2)

Maintainer

Josh Pasek

Last Published

June 10th, 2021

Functions in weights (1.0.4)

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.
wtd.chi.sq

Produces weighted chi-squared tests.
wtd.cor

wtd.t.test

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

Recode variables to 0-1 scale
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.
anes04

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

Produces weighted correlations quickly using C.
wtd.hist

Weighted Histograms