NY_subset: New York State CCES Respondents in 2008

NY_subsetR Documentation

New York State CCES Respondents in 2008

Description

These data are a subset of the 2008 Cooperative Congressional Election Survey (CCES) Common Content. Only 1108 respondents from the state of New York are included, with predictors drawn from Gill's (2020) model of self-reported ideology. The CCES data are merged with predictors on geographic location based on ZIP codes (from ArcGIS & TomTom) and county ruralism (from the USDA).

Format

The NY_subset dataset has 1108 observations and 26 variables.

state

The state abbreviation of the respondent's residence.

zip

The respondent's ZIP code.

age

The age of the respondent in years.

female

An indicator of whether the respondent is female.

ideology

The respondent's self-reported ideology on a scale of 0 (liberal) to 100 (conservative).

educ

The respondent's level of education. 0=No Highschool, 1=High School Graduate, 2=Some College, 3=2-year Degree, 4=4-year degree, 5=Post-Graduate.

race

The respondent's race. 1=White, 2=African American, 3=Nonwhite & nonblack.

empstat

The respondent's employment status. 1=employed, 2=unemployed, 3=not in workforce.

ownership

Indicator for whether the respondent owns his or her own home.

inc14

The respondent's self reported income. 1=Less than $10,000, 2=$10,000-$14,999, 3=$15,000-$19,000, 4=$20,000-$24,999, 5=$25,000-$29,999, 6=$30,000-$39,999, 7=$40,000-$49,999, 8=$50,000-$59,999, 9=$60,000-$69,999, 10=$70,000-$79,999, 11=$80,000-$89,999, 12=$100,000-$119,999, 13=$120,000-$149,999, 14=$150,000 or more.

catholic

Indicator for whether the respondent is Catholic.

mormon

Indicator for whether the respondent is Mormon.

orthodox

Indicator for whether the respondent is Orthodox Christian.

jewish

Indicator for whether the respondent is Jewish.

islam

Indicator for whether the respondent is Muslim.

mainline

Indicator for whether the respondent is Mainline Christian.

evangelical

Indicator for whether the respondent is Evangelical Christian.

FIPS_Code

FIPS code of the repondent's state.

rural

Nine-point USDA scale of the ruralism of each county, with 0 meaning the most urban and 8 meaning the most rural.

zipPop

Indicates the population of the repondent's ZIP code.

zipLandKM

Indicates the land area in square kilometers of the repondent's ZIP code.

weight

Survey weights created by the CCES.

cd

The congressional district the respondent resides in.

fipsCD

Index that fuses the state FIPS code in the first two digits and the congressional district number in the last two digits.

northings

Indicates the geographical location of the respondent in kilometer-based northings.

eastings

Indicates the geographical location of the respondent in kilometer-based eastings.

Source

Ansolabehere, Stephen. 2011. "CCES, Common Content, 2008." Ver. 4.

ArcGIS. 2012. "USA ZIP Code Areas." https://www.arcgis.com/home/item.html?id=8d2012a2016e484dafaac0451f9aea24

United States Department of Agriculture. 2013. "2013 Rural-Urban Continuum Codes." https://www.ers.usda.gov/data-products/rural-urban-continuum-codes.aspx

References

Jeff Gill. 2020. Measuring Constituency Ideology Using Bayesian Universal Kriging. State Politics & Policy Quarterly. doi:10.1177/1532440020930197

Examples

## Not run: 
ny <- NY_subset

#data cleaning
ny$cathOrth<-ny$catholic+ny$orthodox
ny$consRelig<-ny$mormon+ny$evangelical
ny$jewMus<-ny$jewish+ny$islam

# Explanatory Variable Matrix
psrm.data <-cbind(ny$age, ny$educ, I(ny$age*ny$educ), as.numeric(ny$race==2), 
       as.numeric(ny$race==3), ny$female, I(as.numeric(ny$race==2)*ny$female), 
       I(as.numeric(ny$race==3)*ny$female), ny$cathOrth, ny$consRelig, 
       ny$jewMus, ny$mainline, ny$rural, ny$ownership, 
       as.numeric(ny$empstat==2), as.numeric(ny$empstat==3),ny$inc14)

dimnames(psrm.data)[[2]] <- c("Age", "Education", "Age.education", 
                             "African.American", "Nonwhite.nonblack","Female", 
                             "African.American.female", "Nonwhite.nonblack.female", 
                             "Catholic.Orthodox", "Evang.Mormon", "Jewish.Muslim", 
                             "Mainline","Ruralism", "Homeowner", "Unemployed",
                             "Not.in.workforce","Income")

# Outcome Variable
ideo <- matrix(ny$ideology,ncol=1)

# Set Number of Iterations:
# WARNING: 20 iterations is intensive on many machines.
# This example was tuned on Amazon Web Services (EC2) over many hours
# with 20,000 iterations--unsuitable in 2020 for most desktop machines.
#M<-20000 
M<-100 
set.seed(1,kind="Mersenne-Twister")

# Estimate the Model
ny.fit <- metropolis.krige(formula = ideo ~ psrm.data, coords = cbind(ny$eastings, ny$northings),
          powered.exp=1, n.iter=M, spatial.share=0.31,range.share=0.23,beta.var=10,
          range.tol=0.01, b.tune=0.1, nugget.tune=20, psill.tune=5)		
      
# Discard first 20% of Iterations as Burn-In (User Discretion Advised).
ny.fit <- burnin(ny.fit, M/5)

# Summarize Results
summary(ny.fit)

#Convergence Diagnostics: Geweke and Heidelberger-Welch
geweke(ny.fit)
heidel.welch(ny.fit)

# Draw Semivariogram
semivariogram(ny.fit)

## End(Not run)     

krige documentation built on May 1, 2022, 5:06 p.m.

Related to NY_subset in krige...