LEGACY CONTENT. If you are looking for Voteview.com, PLEASE CLICK HERE

This site is an archived version of Voteview.com archived from University of Georgia on May 23, 2017. This point-in-time capture includes all files publicly linked on Voteview.com at that time. We provide access to this content as a service to ensure that past users of Voteview.com have access to historical files. This content will remain online until at least January 1st, 2018. UCLA provides no warranty or guarantee of access to these files.

Homework 7, POLS 8505: MEASUREMENT THEORY
Due 5 October 2011



  1. In this problem we are going to analyze the nations data with JAGS in R using R2jags (jags R Description). JAGS runs fine in WINDOZE if you use both JAGS 3.1.0 and R 2.13. Download the R program:

    nations_Rtojags_new.r -- Program to run MCMC on the Log-Normal Bayesian Model for the Nations data.
    1. Run nations_Rtojags_new.r and report all the plots that it produces. How many of the coordinates have more than one mode in the density plots?

    2. Run summary(result) and report the tables that it writes to the screen (NEATLY FORMATTED!!!).

    3. Run nations_Rtojags_new.r again and report the tables (NEATLY FORMATTED!!!) from summary(result). Are the results the same as before?

  2. Given that we only have 12 nations and the log-normal model is highly non-linear, it is not surprising that the the results may vary somewhat. Let's try adding an additional constraint. Download the R program:

    nations_Rtojags_new_2.r -- Program to run MCMC on the Log-Normal Bayesian Model for the Nations data.
    1. Run nations_Rtojags_new_2.r and report all the plots that it produces. How many of the coordinates have more than one mode in the density plots?

    2. Run summary(result) and report the tables that it writes to the screen (NEATLY FORMATTED!!!).

    3. Examine the code of nations_Rtojags_new_2.r and nations_bayes_model_windows_2.txt. What is the additional constraint that has been added? How does it relate to the other constraints?

  3. Run metric_mds_nations_log_normal_2.r from Question 1 of Homework 6 and compare the configuration of nations from the general purpose optimization routine -- optim with the configuration from question (2) above. Let A be the matrix of Nation coordinates from this question and B be the matrix of Nation coordinates from question (2). Using the same method as Question 4 of Homework 5 solve for the orthogonal procrustes rotation matrix, T, for B. [To see an example of this examine the following program using the Morse Code data:

    morse_two_ways.r -- Program to analyze the Morse Code data -- both Upper and Lower
    1. Solve for T and turn in a neatly formatted listing of T. Compute the Pearson r-squares between the corresponding columns of A and B before and after rotating B.

    2. Do a two panel graph with the two plots side-by-side -- A on the left and B on the right.