Learn R Programming

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

SciencesPo (version 1.3.9)

A Tool Set for Analyzing Political Behavior Data

Description

Provides functions for analyzing political behavior data, including measures of political fragmentation, seat apportionment, and graphical demonstrations.

Copy Link

Version

Install

install.packages('SciencesPo')

Monthly Downloads

139

Version

1.3.9

License

GPL (>= 2)

Last Published

January 23rd, 2016

Functions in SciencesPo (1.3.9)

%>%

Chain operator
Presidents

The Measure of US Presidents
cronbach

Cronbach's Alpha for a matrix or data frame
Frequency

Frequency Table
cathedrals

Cathedrals
Mode

Calculate the Mode
calc.CC

Pearson's Contingency Coefficient for Tables
circularSampling

Circular Systematic Sampling
bootstrap

Method for Bootstrapping
dummy

Generate dummy variables
cox.shugart

Cox-Shugart Measure of Proportionality
crosstable

Cross-tabulation
dot.plot

Dot Plot
highestAverages

Highest Averages Methods of Allocating Seats Proportionally
categories

Extraction of categorical values as a preprocessing step for making dummy variables
bhodrick93

Bekaert's and Hodrick's (1993) Data
galton

Galton's Family Data on Human Stature.
atkinson

Atkinson Index of Inequality
Bush

Approval Ratings for President George W. Bush
SciencesPo

A Tool Set For Analyzing Political Behavior Data
describe

Statistical description
largestRemainders

Largest Remainders Methods of Allocating Seats Proportionally
circularReplicatedSampling

Replicated Circular-Systematic Sampling
butterfly

The Butterfly Curve
nerlove63

Marc Nerlove's (1963) data
bar.plot

Plot a barplot with ggplot2
css

Corrected Sum of Squares
fte_color_pal

Extended fivethirtyeight.com color palette
gallagher

Gallagher Index
cgreene76

Christensen's and Greene's (1976) Data
permutate

Create k random permutations of a vector
levy.flight

Simulates a Levy Walk
binomcdf

Binomial cumulative distribution function
lorenz

The Lorenz Curve
ltaylor96

Lothian's and Taylor's (1996) Data Set
rounded

Round Numbers Without Leading Zeros
clear

Clear Memory of All Objects
pause

Pause
normalize

Unity-based normalization
detail

Method to Produce Descriptive Statistics Summary
herfindahl

Herfindahl Index of Concentration
psum

The Missing R Parallel Sum
converter

Unit Converter
normalcdf

Normal Cumulative Distribution
stratified

Stratified Sampling
rdirichlet

Dirichlet distribution
themes_data

Palette data for the themes used by package
trim

Trim white spaces
outliers

Detect Outliers
binompdf

Binomial probability density function
destring

Factors to numeric
aad-class

An S4 Class to Average Absolute Deviation
scale_colour_fte

fivethirtyeight.com color scales
scale_colour_pub

Publication color scales.
Units

Measurement System Units
geom_foot

Add Footnote to a ggplot Object
paired

Paired Data
dotfy

Replace commas by dots
database

Wrapper for dbConnect
hamilton

The Hamilton Method of Allocating Seats Proportionally
draw.norm

Shades Normal Distribuion
svTransform

Transform dependent variable
calc.UC

The Uncertainty Coefficient
dHondt

The D'Hondt Method of Allocating Seats Proportionally
has.domain

Find WWW Domains
plotTitleSubtitle

Add Title and Subtitle to a ggplot Object
fade

Add transparency
dbTempTable

Creates a temporary table in the database
invnormal

Inverse Cumulative Standard Normal Distribution
normalpdf

Normal probability density function
freq

Simple Frequency Table
parties_color_pal

Color Palettes for Political Organizations (discrete)
pub_color_pal

Color Palettes for Publication (discrete)
bartels.rank

Bartels Rank Test of Randomness
stukel

Stukel's test of the logistic link
griliches76

Griliches's (1976) Data
lilliefors

Lilliefors (Kolmogorov-Smirnov) test for normality
jensen.shannon

Jensen-Shannon Distance
agostino

D'Agostino test of skewness
anscombe.glynn

Anscombe-Glynn test of kurtosis
geary

Geary's test for normality
johnson.neyman

Johnson-Neyman Regression
calc.Phi

The Phi Coefficient for 2 x 2 Tables
anderson.darling

Anderson-Darling test for normality
calc.TT

Tschuprow's T for Tables
calc.LR

Likelihood Ratio Test (G test) for Tables
bonett.seier

Bonett-Seier test of Geary's kurtosis
calc.CV

Cramer's V Coefficient for Tables
james.stein

James-Stein shrunken estimates
sampleSize

Simple Sample Size for Surveys
tabstat

Table With Summary Statistics
aad

Average Absolute Deviation
replicatedSampling

Replicated Simple Random Sample (SRS)
samplePower

Calculate and plot power of a sample
twins

Burt's twin data
inv.cox.shugart

Inverse Cox-Shugart Measure of Proportionality
gini

Weighted Gini Index
gini.simpson

Gini-Simpson Index
untable

Untable
se

Calculates the Standard Error of the Mean
meanFromRange

Estimates Mean and Standard Deviation from the Median and the Range
lijphart

Lijphart Index of Proportionality
sturges

Calculate breaks
ucss

Uncorrected Sum of Squares
winsorize

Winsorized Mean
theme_fte

Themes for ggplot2 Graphs
lm2eqn

Linear model to equation style
politicalDiversity

Political Diversity Indices
insert.row

Add new row to dataframe
jackknife

Resamples Data Using the Jackknife Method
linearReplicatedSampling

Replicated-Systematic Random Sampling
recode

Recode or Replace Values With New Values
turnout

Turnout Data
marriage

Same Sex Marriage Public Opinion Data
voronoi

Voronoi diagram
timeplot

Make the ggplot2 version of TS plots
mishkin92

Mishkin's (1992) Data
stdkurtosis

Standard Error of Kurtosis
randomImput

Simple Random Imputation
kurtosis

Compute the Kurtosis
wtd.var

Weighted Variance
titanic

Titanic
vif

Variance Inflation Factor
runExample

Examples from the SciencesPo Package
star

Returns significance level.
words

Word frequencies from Mosteller and Wallace
scale_colour_parties

Political Parties Color Scales
theme_blank

Create a Completely Empty Theme
sheston91

The Penn World Table
theme_pub

The Default Theme
blockRandomizedDesign

Create Block-randomized designs
ci

An S4 Class to Confidence Intervals
cv

Pearson's Coefficient of Variation
flag

Add an "id" Variable to a Dataset
ddirichlet

Dirichlet distribution
grofman

Grofman Index
farina

Farina Index
jarque.bera

Jarque-Bera test for normality
linearSampling

Linear Systematic Sampling
pie.plot

Creates a pie chart using ggplot2.
safe.chars

Convert All Factor Columns to Character Columns
skewness

Compute the Skewness
textwrap

Insert line breaks in long strings
read.zTree

Reads zTree output files
swatson93

Stock's and Watson's (1993) Data.
rosenbluth

Rosenbluth Index of Concentration
stdskewness

Standard Error of Skewness