Week 5 Assignment

Consider this week’s assignment our first “Take the Training Wheels Off” bootcamp. I won’t be introducing new material, but you’ll be asked to apply (and refine) what you already know how to do. To help you get comfortable, I’m going to provide no direct commands.

For some of you, it will be challenging. Trust that you can do this! Use your groups, and support each other. Revisit old assignments. Use the Longest textbook (especially the appendix!). Attempt things. Get error messages. You’ll get there.


You need to create a Do File for this assignment. You may keep a Do File and a log file, but you will submit only the Do File on Canvas. For a refresher on how to use Do Files, click below:


To do this assignment, you’ll need to use the following variables:

[colrac] - A measure of whether the respondent believes racists should be allowed to be teachers
[colhomo] - A measure of whether the respondent believes that a gay person should be allowed to be a teacher
[marhomo] - A measure of whether the respondent believes that gay people have a right to marry
[sexornt] - A measure of the respondent’s sexual orientation
[sexsex] - A measure of the sex(es) of the respondent’s sexual partners in the past year
[chldidel] - A measure of the respondent’s ideal number of children
[childs] - A measure of the respondent’s number of children
[zodiac] - A measure of the respondent’s zodiac sign
[astrosci] - A measure of how scientific the respondent believes astrology to be
[degree] - A measure of the respondent’s highest degree
[padeg] - A measure of the respondent’s father’s highest degree
[madeg] - A measure of the respondent’s mother’s highest degree
[postlife] - A measure of the respondent’s belief in an afterlife
[relig16] - A measure of the respondent’s childhood religion 
[relig] - A measure of the respondent’s current religious preference
[age] - A member of the respondent’s age
[trust] - A measure of respondent’s confidence that people can generally be trusted

In the Stars…

Using the commands you’ve learned so far, please answer the following questions to the best of your ability. You will submit your responses as commands, outputs, and notes in a Do File.

You’re chatting with a friend at a party, and he asks about your horoscope. You tell him you don’t believe in horoscopes. “That’s because you’re a Virgo,” he says. “Virgos think they’re so smart! They don’t trust people, and they never buy into the zodiac.” You decide to take his claims to the data…

  1. How many Virgos are there in the GSS sample?

  2. Can you graphically (visually) display the representation of horoscopes in the sample?

  3. In the sample, do Virgos, in fact, have less trust in horoscopes than other signs?

  4. In the sample, do Virgos trust people less than other signs?

You learn that your friend is a Gemini, so as a special treat, you decide you’d like to provide him a representation of how Virgos compare to Geminis in the sample. Produce a table (cross tab) and a histogram, comparing Virgos in the sample to Geminis in the sample in (1) their trust of others, and (2) their level of intelligence, based on degrees earned.


In the Schools…

You begin to wonder whether, in your sample, people with different educational backgrounds have different levels of faith in horoscopes…

  1. Find a way to represent (in two tables), respondents’ belief in horoscopes. The first table should display only respondents who are under the age of 35. The second table should display only respondents who are over the age of 35. Please include percentages in the table.

  2. Can you represent the different distributions of belief in horoscope between these two age groups in two box plots?

Interpret the tables and plots as specifically as possible.


In the Pews…

At this point, you’ve decided not to return to the party because the GSS is so much more fun. You start poking around and find some very interesting variables about religion, sexuality, and education.

You see that GSS has a measure both of respondents’ sexual orientations and respondents’ belief that gay people should be allowed to marry. You’re curious about whether any respondents who identified as either gay or bisexual, also reported not supporting gay marriage.

  1. Locate this information. Include the output and your explanation in your Do File.

You then became curious about whether, in the sample, gay and bisexual respondents changed religions between childhood and adulthood at a higher rate than straight respondents. How would you go about approaching this curiosity?