SlideShare a Scribd company logo
1 of 5
Lab C HW
SOCY 3115
Spring 20
Reviewing Labs A and B
Use GSS2018V1.dta
1. There is a variable called ancestrs in the 2018 General Social
Survey. This variable reflects the respondent’s answer to this
question: Do you believe in supernatural powers of your
deceased ancestors?
a. Do a “tab ancestrs” and tab ancestrs, nolabel”. Cut-n-paste
command and output here.
b. What level-of-measurement is ancestrs?
c. What percent of the sample believes “no, definitely not”
when asked whether ancestors have supernatural powers?
d. What percent of the sample believes that yes (either
definitely or probably) ancestors have supernatural powers?
2. Make a new variable called believes that =1 if the person
believes that yes (either definitely or probably) ancestors have
supernatural powers; and =0 if the person believes that no
(either definitely or probably) ancestors do not have
supernatural powers.
hint #1: use the generate and recode commands.
hint #2: I did something just like this in Lab C when reviewing
Stata from Unit 1
hint #3: you need to use the CODES for each of the values, not
the labels. (remember, labels are the words, eg. “yes,
definitely,” and CODES are the numbers that represent the
words, e.g. “yes, definitely” is coded as a 1, so the number 1
should be used in creating the new variable. You can see the
codes by typing, “tab ancestrs, nolabel”
a. Show the commands you used to make the new variable.
b. Run “tab believes” and cut-n-paste the command and output
here.
c. Using your new variable, what percent of people believe that
at ancestors have supernatural powers? Is this the same as Q1d?
3. The variable called sei10 is an index of the socioeconomic
status of the respondent. It’s a composite variable that reflects
their education, income, and occupational status.
a. Run “sum sei10” and cut-n-paste command and output here.
b. What is the minimum value of sei10? What is the maximum?
What is the mean?
c. Make a new variable called sei75 that =1 if the respondent’s
sei is at the 75th percentile or above; and =0 otherwise. I’m not
giving you many hints for this. You should be able to find the
cutoff for the 75th percentile using the sum command with the
detail option. Then, use that value to make the new variable
using the generate and recode method. Cut-n-paste the code
you used here:
d. Tabulate sei75. Cut-n—paste the command and output here.
New Stuff for Lab C
This week we learned how to manually construct confidence
intervals. Now we will let Stata construct the Confidence
Interval and we need only to interpret it!
Use GSS2018_v1.dta
1. The variable numpartners is defined as the number of sex
partners the respondent has had since age 18. Have Stata
construct a 95% Confidence Interval that estimates the mean
age of all American adults when they had their first child. Cut-
n-paste command and output here:
Interpret the 95% CI like we do when we construct CIs by hand.
2. Using the same variable, construct a 99% Confidence Interval
that estates the mean age of all American adults when they had
their first child. Cut-n-paste command and output here:
Interpret the 99% CI like we do when we construct CIs by hand.
3. Which of the confidence intervals is wider – the 95% CI or
the 99% CI? Why? (use what you know about the tradeoff
between precision and confidence in your answer).
4. There is a variable in this file called presexok which =1 if the
respondent believes that premarital sex is not wrong at all; and
0 otherwise. Construct a 95% Confidence Interval that
estimates the population proportion (i.e. proportion of all US
adults) who think premarital sex is not at all wrong. Cut-n-paste
command and output here:
a. Interpret the 95% CI like we do when we construct CIs by
hand.
b. Are you surprised by the estimated interval? Did you think
this proportion would be higher, lower, or about this
proportion?
5. Construct a 95% Confidence Interval that estimates the
population proportion (i.e. proportion of all US adults) who
believe in life after death (probably or definitely). Hint: you
will need to create a new variable that =1 if the person believes
in life after death and 0 if they don’t. Use afterli to create this
new binary variable then run the confidence interval. Cut-n-
paste confidence interval here:
a. Interpret the 95% CI like we do when we construct CIs by
hand.
b. Are you surprised by the estimated interval? Did you think
this proportion would be higher, lower, or about this proportion
and why?

More Related Content

Similar to Lab C HWSOCY 3115Spring 20Reviewing Labs A and BUse GSS2.docx

Example of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docxExample of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docx
cravennichole326
 
Example of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docxExample of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docx
elbanglis
 
Problems related to texts Chapter 7.docx
Problems related to texts Chapter 7.docxProblems related to texts Chapter 7.docx
Problems related to texts Chapter 7.docx
anitramcroberts
 
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docxECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
jack60216
 
250 words, no more than 500· Focus on what you learned that made.docx
250 words, no more than 500· Focus on what you learned that made.docx250 words, no more than 500· Focus on what you learned that made.docx
250 words, no more than 500· Focus on what you learned that made.docx
eugeniadean34240
 

Similar to Lab C HWSOCY 3115Spring 20Reviewing Labs A and BUse GSS2.docx (9)

Example of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docxExample of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docx
 
Example of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docxExample of a one-sample Z-test The previous lecture in P.docx
Example of a one-sample Z-test The previous lecture in P.docx
 
Week 7 Lecture
Week 7 LectureWeek 7 Lecture
Week 7 Lecture
 
ELEMENTS OF STATISTICS / TUTORIALOUTLET DOT COM
ELEMENTS OF STATISTICS / TUTORIALOUTLET DOT COMELEMENTS OF STATISTICS / TUTORIALOUTLET DOT COM
ELEMENTS OF STATISTICS / TUTORIALOUTLET DOT COM
 
Problems related to texts Chapter 7.docx
Problems related to texts Chapter 7.docxProblems related to texts Chapter 7.docx
Problems related to texts Chapter 7.docx
 
Making Statistics Work For Us: Item Bias, Decision Making, and Data-Driven Si...
Making Statistics Work For Us: Item Bias, Decision Making, and Data-Driven Si...Making Statistics Work For Us: Item Bias, Decision Making, and Data-Driven Si...
Making Statistics Work For Us: Item Bias, Decision Making, and Data-Driven Si...
 
Barga Data Science lecture 9
Barga Data Science lecture 9Barga Data Science lecture 9
Barga Data Science lecture 9
 
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docxECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
ECO 480 Econometrics I Problem Set 5 Due Monday, Nove.docx
 
250 words, no more than 500· Focus on what you learned that made.docx
250 words, no more than 500· Focus on what you learned that made.docx250 words, no more than 500· Focus on what you learned that made.docx
250 words, no more than 500· Focus on what you learned that made.docx
 

More from croysierkathey

1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docx1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docx
croysierkathey
 
1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docx1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docx
croysierkathey
 
1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docx1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docx
croysierkathey
 
1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docx1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docx
croysierkathey
 

More from croysierkathey (20)

1.  Discuss the organization and the family role in every one of the.docx
1.  Discuss the organization and the family role in every one of the.docx1.  Discuss the organization and the family role in every one of the.docx
1.  Discuss the organization and the family role in every one of the.docx
 
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx
 
1.Purpose the purpose of this essay is to spread awareness .docx
1.Purpose the purpose of this essay is to spread awareness .docx1.Purpose the purpose of this essay is to spread awareness .docx
1.Purpose the purpose of this essay is to spread awareness .docx
 
1.  Tell us why it is your favorite film.2.  Talk about the .docx
1.  Tell us why it is your favorite film.2.  Talk about the .docx1.  Tell us why it is your favorite film.2.  Talk about the .docx
1.  Tell us why it is your favorite film.2.  Talk about the .docx
 
1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docx1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docx
 
1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docx1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docx
 
1.Some say that analytics in general dehumanize managerial activitie.docx
1.Some say that analytics in general dehumanize managerial activitie.docx1.Some say that analytics in general dehumanize managerial activitie.docx
1.Some say that analytics in general dehumanize managerial activitie.docx
 
1.What is the psychological term for the symptoms James experiences .docx
1.What is the psychological term for the symptoms James experiences .docx1.What is the psychological term for the symptoms James experiences .docx
1.What is the psychological term for the symptoms James experiences .docx
 
1.Write at least 500 words discussing the benefits of using R with H.docx
1.Write at least 500 words discussing the benefits of using R with H.docx1.Write at least 500 words discussing the benefits of using R with H.docx
1.Write at least 500 words discussing the benefits of using R with H.docx
 
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx
 
1.  Discuss the cultural development of the Japanese and the Jewis.docx
1.  Discuss the cultural development of the Japanese and the Jewis.docx1.  Discuss the cultural development of the Japanese and the Jewis.docx
1.  Discuss the cultural development of the Japanese and the Jewis.docx
 
1.  Discuss at least 2  contextual factors(family, peers,  school,.docx
1.  Discuss at least 2  contextual factors(family, peers,  school,.docx1.  Discuss at least 2  contextual factors(family, peers,  school,.docx
1.  Discuss at least 2  contextual factors(family, peers,  school,.docx
 
1.Write at least 500 words in APA format discussing how to use senti.docx
1.Write at least 500 words in APA format discussing how to use senti.docx1.Write at least 500 words in APA format discussing how to use senti.docx
1.Write at least 500 words in APA format discussing how to use senti.docx
 
1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docx1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docx
 
1.What are social determinants of health  Explain how social determ.docx
1.What are social determinants of health  Explain how social determ.docx1.What are social determinants of health  Explain how social determ.docx
1.What are social determinants of health  Explain how social determ.docx
 
1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docx1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docx
 
1.What are barriers to listening2.Communicators identif.docx
1.What are barriers to listening2.Communicators identif.docx1.What are barriers to listening2.Communicators identif.docx
1.What are barriers to listening2.Communicators identif.docx
 
1.Timeline description and details There are multiple way.docx
1.Timeline description and details There are multiple way.docx1.Timeline description and details There are multiple way.docx
1.Timeline description and details There are multiple way.docx
 
1.The PresidentArticle II of the Constitution establishe.docx
1.The PresidentArticle II of the Constitution establishe.docx1.The PresidentArticle II of the Constitution establishe.docx
1.The PresidentArticle II of the Constitution establishe.docx
 
1.What other potential root causes might influence patient fal.docx
1.What other potential root causes might influence patient fal.docx1.What other potential root causes might influence patient fal.docx
1.What other potential root causes might influence patient fal.docx
 

Recently uploaded

QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 

Recently uploaded (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Economic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food AdditivesEconomic Importance Of Fungi In Food Additives
Economic Importance Of Fungi In Food Additives
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 

Lab C HWSOCY 3115Spring 20Reviewing Labs A and BUse GSS2.docx

  • 1. Lab C HW SOCY 3115 Spring 20 Reviewing Labs A and B Use GSS2018V1.dta 1. There is a variable called ancestrs in the 2018 General Social Survey. This variable reflects the respondent’s answer to this question: Do you believe in supernatural powers of your deceased ancestors? a. Do a “tab ancestrs” and tab ancestrs, nolabel”. Cut-n-paste command and output here. b. What level-of-measurement is ancestrs? c. What percent of the sample believes “no, definitely not” when asked whether ancestors have supernatural powers? d. What percent of the sample believes that yes (either definitely or probably) ancestors have supernatural powers? 2. Make a new variable called believes that =1 if the person believes that yes (either definitely or probably) ancestors have supernatural powers; and =0 if the person believes that no (either definitely or probably) ancestors do not have supernatural powers.
  • 2. hint #1: use the generate and recode commands. hint #2: I did something just like this in Lab C when reviewing Stata from Unit 1 hint #3: you need to use the CODES for each of the values, not the labels. (remember, labels are the words, eg. “yes, definitely,” and CODES are the numbers that represent the words, e.g. “yes, definitely” is coded as a 1, so the number 1 should be used in creating the new variable. You can see the codes by typing, “tab ancestrs, nolabel” a. Show the commands you used to make the new variable. b. Run “tab believes” and cut-n-paste the command and output here. c. Using your new variable, what percent of people believe that at ancestors have supernatural powers? Is this the same as Q1d? 3. The variable called sei10 is an index of the socioeconomic status of the respondent. It’s a composite variable that reflects their education, income, and occupational status. a. Run “sum sei10” and cut-n-paste command and output here. b. What is the minimum value of sei10? What is the maximum? What is the mean? c. Make a new variable called sei75 that =1 if the respondent’s
  • 3. sei is at the 75th percentile or above; and =0 otherwise. I’m not giving you many hints for this. You should be able to find the cutoff for the 75th percentile using the sum command with the detail option. Then, use that value to make the new variable using the generate and recode method. Cut-n-paste the code you used here: d. Tabulate sei75. Cut-n—paste the command and output here. New Stuff for Lab C This week we learned how to manually construct confidence intervals. Now we will let Stata construct the Confidence Interval and we need only to interpret it! Use GSS2018_v1.dta 1. The variable numpartners is defined as the number of sex partners the respondent has had since age 18. Have Stata construct a 95% Confidence Interval that estimates the mean age of all American adults when they had their first child. Cut- n-paste command and output here: Interpret the 95% CI like we do when we construct CIs by hand. 2. Using the same variable, construct a 99% Confidence Interval
  • 4. that estates the mean age of all American adults when they had their first child. Cut-n-paste command and output here: Interpret the 99% CI like we do when we construct CIs by hand. 3. Which of the confidence intervals is wider – the 95% CI or the 99% CI? Why? (use what you know about the tradeoff between precision and confidence in your answer). 4. There is a variable in this file called presexok which =1 if the respondent believes that premarital sex is not wrong at all; and 0 otherwise. Construct a 95% Confidence Interval that estimates the population proportion (i.e. proportion of all US adults) who think premarital sex is not at all wrong. Cut-n-paste command and output here: a. Interpret the 95% CI like we do when we construct CIs by hand. b. Are you surprised by the estimated interval? Did you think this proportion would be higher, lower, or about this proportion? 5. Construct a 95% Confidence Interval that estimates the population proportion (i.e. proportion of all US adults) who
  • 5. believe in life after death (probably or definitely). Hint: you will need to create a new variable that =1 if the person believes in life after death and 0 if they don’t. Use afterli to create this new binary variable then run the confidence interval. Cut-n- paste confidence interval here: a. Interpret the 95% CI like we do when we construct CIs by hand. b. Are you surprised by the estimated interval? Did you think this proportion would be higher, lower, or about this proportion and why?