Learn R Programming

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

RCPA3 (version 1.2.1)

Data and Functions for R Companion to Political Analysis 3rd Ed

Description

Bundles the datasets and functions featured in Philip H. Pollock and Barry C. Edwards, "An R Companion to Political Analysis, 3rd Edition," Thousand Oaks, CA: Sage Publications.

Copy Link

Version

Install

install.packages('RCPA3')

Monthly Downloads

564

Version

1.2.1

License

CC0

Maintainer

Barry Edwards

Last Published

January 15th, 2024

Functions in RCPA3 (1.2.1)

histC

Creates histogram to show distribution of interval (numeric) variable's values
graph.info.functions

Reference information on graphics parameters, like colors, line types, plotting characters
lambda

Calculates Lambda, a measure of association for a cross-tabulation.
logregC

Logistic regression analysis with options for weighted observations, odds ratio reports, model fit statistics, and plots of residuals
describeC

Generates table of descriptive statistics for one or more variables in a dataset
freqC

Reports the frequency distribution of dataset variable with table and bar chart
logregR2

Logistic regression model fit statistics
inverse.logit

Converts linear predictor to probability
fit.svyglm

Calculates model fit statistics for a svyglm linear regression model
printC

Prints table of results to a .html file in local working directory
getC

Imports common dataset file types into R environment
random.names

Generates random sample of nationally representative surnames
sortC

Sorts dataset observations by user-defined criteria to return case-level information
sampdistC

Plots probability and cumulative density functions (PDFs and CDFs) of sample statistics
regC

Linear regression analysis (OLS regression), with options for weighted observations, diagnostic tests, and plots of residuals
states

States dataset for R Companion to Political Analysis, Third Edition
nes

NES dataset for R Companion to Political Analysis, Third Edition
widgetFactory

An interactive game to practice using R functions.
welcome

Welcomes new users to package with basic information, option to reset user's working environment
world

World dataset for R Companion to Political Analysis, Third Edition
pchisqC

Compares full v. reduced logistic regression models with Chi-Squared test
pass.thru.functions

Imported Functions Made Available to Package Users
orci

Translate logistic regression coefficients into odds ratios with confidence interval
wtd.cor

Calculates Correlation Coefficient Between Two Numeric Variables Makes use of the wtd.cor function, part of the weights package.
testpropsC

Tests the difference between two sample proportions, or difference between sample proportion and hypothesized value, with options for weighted observations, confidence intervals
transformC

Returns new variables by transforming existing dataset variables (e.g. dummy variables, standardized variables, rank orders)
testmeansC

One and two-sample difference of means tests (t-tests) with confidence intervals.
wtd.quantile

Finds the Quantile Values of Variable With Option for Weights
wtd.kurtosis

Generates Kurtosis Statistic with Option to Weight Observations
tablesomersDC

Calculates the Somers' d measure of association for a cross-tabulation.
wtd.mode

Find Mode of Variable with Option to Weight Observations
wtd.var

Calculates Variance of Variable With Option for Weights
wtd.skewness

Calculates Skewness of Numeric Variable with Option to Weight Observations
wtd.sd

Calculates Standard Deviation of Variable With Option for Weights
wtd.median

Find Median of Variable with Option to Weight Observations
wtd.hist

Creates a Histogram Showing Distribution of Variable Values With Option for Weights Makes use of the wtd.hist function, part of the weights package.
wtd.mean

Calculates Mean of Variable With Option for Weights
ch6ex

Dataset for Chapter 6 Exercises, An R Companion to Political Analysis, Third Edition
boxplotC

Generates box plots to compare interval-level dependent variable's distribution across categories of independent variable.
CIprop

Confidence intervals of a dataset variable's sample proportions in table and figure
compmeansC

Mean comparison analysis function, makes controlled comparisons, generates plots, performs ANOVA
CImean

Confidence interval of a dataset variable's sample mean in table and figure
correlateC

Correlation analysis for two or more numeric variables, with options for scatterplots, weighted observations, and inferential statistics.
crosstabC

Cross-tabulation analysis, option for weighting observations, makes controlled comparisons, generates plots, performs Chi-Square test, measures strength of association
CramersV

Calculates Cramer's V
debate

Debate Experiment dataset for R Companion to Political Analysis, Third Edition
deprecated.functions

Deprecated functions (and how to still use them)