clean_data: Clean Bawsalah data for analysis

Description Usage Arguments

Description

Clean Bawsalah data for analysis

Usage

1
2
3
4
5
clean_data(keep_legis = 1, use_subset = FALSE,
  subset_party = c("Bloc Al Horra", "Mouvement Nidaa Tounes"),
  use_both = FALSE, refleg = "ARP_Bochra Belhaj Hamida", legis = 1,
  use_vb = FALSE, use_nas = FALSE, to_run = 3, sample_it = FALSE,
  sample_amt = 50)

Arguments

keep_legis

Number of legislator votes required to keep them in the dataset

use_subset

TRUE/FALSE Use only a subset of the dataset?

use_both

TRUE/FALSE Should both the ANC and ARP datasets be combined?

refleg

Character string name of reference legislator

legis

Which legislator to use if use_both==FALSE. Options are 1 for ARP and 2 for ANC

use_vb

TRUE/FALSE Whether to use variational bayesian inference from the Rstan package. It is quicker but less accurate.

use_nas

TRUE/FALSE For ordinal data, whether absences should be coded as a separate category (TRUE) or coded as NA (FALSE)

to_run

Which of the datasets to use in the analysis. Put 1 for binary yes/no, 2 for binary yes/no v. abstain, 3 for ordinal

sample_it

Whether to use a sample of the dataset for analysis. Useful for testing models.

sample_amt

Integer number of legislators to sample from dataset

if

use_subset==TRUE, a vector of party bloc names with which to subset the data


saudiwin/bawsala documentation built on May 29, 2019, 3:19 p.m.