Learn R Programming

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

SciencesPo (version 1.3.7)

A Tool Set for Analyzing Political Behavior Data

Description

Provides miscellaneous functions for carrying out political behaviour analysis, including measures of political fragmentation, seats allocation, and graphical demonstrations.

Copy Link

Version

Install

install.packages('SciencesPo')

Monthly Downloads

120

Version

1.3.7

License

GPL (>= 2)

Maintainer

Daniel Marcelino

Last Published

August 13th, 2015

Functions in SciencesPo (1.3.7)

error.bar

Add Error Bars on the Graph
SciencesPo

A Tool Set For Analyzing Political Behavior Data
fillup

Identify columns with at least one NA value and fill with the mean value
geary

Geary's test for normality
NAasMissing

NA to Missing
countNAs

Count NA values
anscombe.glynn

Anscombe-Glynn test of kurtosis
se

Calculates the Standard Error
mc

Generate Markov Chains
politicalDiversity

Political Diversity Indices politicalDiversity is used to analyze political diversity in a unity or across them. It provides methods to estimate the Effective Number of Parties as well as other diversity measures.
bootstrap

Method for Bootstrap
add

Method for adding things.
crosstable

Cross-tabulation
mishkin92

Mishkin's (1992) Data
cgreene76

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

Dirichlet distribution
binomcdf

Binomial cumulative distribution function
mc.plot

Plot Markov Chains
fill.forward

fill NA by previous cell value (fill forward)
nerlove63

Marc Nerlove's (1963) data
gallagher

Gallagher index
jensen.shannon

Jensen-Shannon Distance
freq

Frequency table
levy.flight

Simulates a Levy Walk
tabulate

Tabulate
var.order

Move variable order in a data.frame
rand.imput

Random Imputation
cv

Pearson's Coefficient of Variation
dummy

Generate dummy variables
ggFootnote

Add Footnote to a ggplot Object
paired

Paired Data
compute

Aggregate a numeric variable
outliers

Detect Outliers
trim

Trim white spaces
rownames2col

Rownames to column
permutate

Create k random permutations of a vector
pause

Pause
stukel

Stukel's test of the logistic link
view

View random n elements of an object.
weather

NY Weather 1995-2014
dHondt

Method D'Hondt
galton

Galton's Family Data on Human Stature.
as.roman

Converts integer into its Roman Numeral equivalent
unnest

Unnest a Nested List
psum

Parallel sum
scale_fill_pub

Scale colors for ggplot graphs
categories

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

Method for Roc Analysis
farina

Farina index
ellipses

Draw ellipses
%nin%

Find Matching (or Non-Matching) Elements
james.stein

James-Stein shrunken estimates
rename

Method for renaming
flag

Flag duplicated observations
ggMultiplot

Multiple ggplot objects
kurtosis

Compute the Kurtosis
ggplotArrange

Arrange multiple ggplot objects
normalize

Unity-based normalization
quotize

Add quotation marks
allocation

Seat allocation and its ordering
adjResiduals

Adjusted Residuals
build

Method for building things
swatson93

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

Titanic
sheston91

The Penn World Table
joinLists

Join a list of data frames
rdirichlet

Dirichlet distribution
bhodrick93

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

Turnout Data
z.scores

Compute z-scores
as.percent

Converts to percentiles
odds.ratio

Odds Ratio
mode

Calculate the Mode
cox.shugart

Cox-Shugart measure of proportionality
lookup

Lookup
database

Wrapper for dbConnect
fillin

Filling in missing values fillin replaces missing values with existing observations from other variable or data frame.
winsorize

Winsorized Mean
rounded

Round numbers with no leading zero
gini.simpson

Gini Simpson Index
nobs

Method for the number of observations
describe

Statistical description
normalcdf

Normal Cumulative Distribution
rectangularize

Make a data.frame Rectangular by fill in missing records
us2012

US Presidential Election Opinion Polls
theme_pub

Themes for ggplot graphs
vif

Variance Inflation Factor
ltaylor96

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

D'Agostino test of skewness
factorize

Conditionally convert vectors to factors
wtd.var

Weighted Variance
commas2dots

Replace commas by dots
lijphart

Lijphart index of proportionality
qm

Quote strings
watch

Watch For Changes in a Data Object
reverseLevels

Reverse the levels of a factor.
bonett.seier

Bonett-Seier test of Geary's kurtosis
detach.all

Detach all data frame from the search path
formatNumbers

Format numeric digits
footnote

Generate a footnote for graphs Generate a footnote for graphs
destring

Factors to numeric
nearest

Find the Nearest Value
frac

Fractional part of a numeric vector.
true.median

Calculates the true median
shift

Shifts elements of a vector left or right by N positions (Lag or Lead).
fade

Add transparency
griliches76

Griliches's (1976) Data
nPermutate

Calculate number of permutations taking repeated elements into consideration
invnormal

Inverse Cumulative Standard Normal Distribution
matching

Matching
normalpdf

Normal probability density function
scale_colour_pub

Scale colors for ggplot graphs
package

Load packages
skewness

Compute the Skewness
ssex

Same Sex Marriage Public Opinion Data
smallAsMissing

Recode very small levels into Missing values
tobaccovote

Tobacco Lobbying Data
rle2data.frame

Converts rle object to data.frame
regionSignificance

Computes the region significance
hamilton

The Hamilton method of apportionment
anderson.darling

Anderson-Darling test for normality
ci

Confidence Intervals
dbTempTable

Creates a temporary table in the database
jackknife

Resamples Data Using the Jackknife Method
jarque.bera

Jarque-Bera test for normality
johnson.neyman

Johnson-Neyman Regression
modify

Modify data elements by their position
peek

Show Observations Randomly Drawn from the Data
read.zTree

Reads zTree output files
binompdf

Binomial probability density function
detail

Method to Produce Descriptive Statistics Summary
lilliefors

Lilliefors (Kolmogorov-Smirnov) test for normality
grofman

Grofman index
nearestPosition

Find Location of the Nearest Value
draw.norm

Shades Normal Distribuion
recode

Method for recoding
svTransform

Transform dependent variable
%>%

Chain operator
rand.block

Create Block-randomized designs