Additional Times Series Data

I've uploaded a couple of files you can use for time series regression. To load the first dataframe, use:
docsUK<-read.csv("http://www.courseserve.info/files/MaternalMortality-DocsUK.csv")

The dependent variable, Y, is maternal mortality (deaths per 100,000 live births) and the independent variable, X, is number of physicians (per 1,000 population).

To use the second, use:
suicidewages<-read.csv("http://www.courseserve.info/files/Suicide-Wages.csv")

For W 11/15

I'll show you a case of MDS using data that are inherently distances using some analysis I did a few years ago. I was developing a strategy for investigating mass media (usually newspaper coverage) using conceptual network analysis and quantitative tools. The analysis including MDS and social network modeling. I developed the initial idea in my dissertation research, having done all of the content coding by hand. I then wrote a program to do the coding and then developed R scripts to compute the results. I'll show you those scripts.

New Version of Exam 3

Here are the revised questions. You can submit the document to me at dr.timothy@shortell.nyc (Word, Pages, OpenOffice, or PDF are fine).

1. What is latent structure and and how do PCA, MDS, or k-means clustering reveal it?

2. Compute PCA in R on a subset of the feeling thermometer variables that appear in both the 2012 and 2016 ANES surveys. Compare the results from the two time points. What can you say about the American political imagination?

For W 11/8

# K-means Clustering

# First, we create the subset of variables for structure analysis
ANES2012ft1<-subset(ANES2012,select=ftgr_xfund:ftgr_feminists)
ANES2012ft2<-subset(ANES2012,select=ftgr_liberals:ftgr_working)
ANES2012ft3<-subset(ANES2012,select=ftgr_gay)
ANES2012ft4<-subset(ANES2012,select=ftgr_rich:ftgr_tea)
ANES2012ft<-cbind(ANES2012ft1,ANES2012ft2,ANES2012ft3,ANES2012ft4)

Another Way to Subset

Since it can be annoying to use the subset function by naming the variables (in quotes, separated by commas), you can take advantage of the abbreviated syntax that uses the colon to designate a list. You can create subsets for all the adjacent variables that you want and then glue them together with the cbind function.

Pages

Subscribe to SOCY 7113 RSS