Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

we will use two data frames: ACS data and NutritionStudy data (The data frame name is highlighted in bold). The ACS data comes from a

we will use two data frames:ACSdata andNutritionStudydata (The data frame name is highlighted in bold).

TheACSdata comes from a sample of individuals in the American Community Survey. The American Community Survey, administered by the US Census Bureau, is given every year to a random sample of about 3.5 million households (about 3% of all US households). Data on a random sample of 1% of all US residents are made public (after ensuring anonymity), and we have selected a random sub-sample of n=1000 from the 2010 data for this ACS dataset

.

NutritionStudycontains data for 315 patients at a hospital. It includes the following variables:

ID ID number for each subject in this sample

Age Subject's age (in years)

Vitamin Vitamin use: 1=Regular, 2=Occasional, or 3=No

Calories Number of calories consumed per day

Fat Grams of fat consumed per day

Fiber Grams of fiber consumed per day

Alcohol Number of alcoholic drinks consumed per day

Cholesterol Cholesterol consumed per day, in mg

Gender Coded as Female or Male

EverSmoke Smoking status: Never, Former, or Current

Here is a snippet of theNutritionStudydata:

Question 6

4.1. The frequency table below shows the variation in smoking status (EverSmoke) by respondent's gender (Gender).The variables come from theNutritionStudydata.How to use thetally()function to create this table?In the space below type your R code.

Question 7

4.2. According to the frequency table shown in question 4.1, what is the percentage of women who are current smokers?

Group of answer choices

52.7

13.2

16.7

34.1

Question 8

5.1 Below is the word equation for a model. The variables come from theNutritionStudydata. What is the level of measurement of the outcome variable?

Cholesterol = Age + Other stuff

The outcome variable is a ____ variable (put the correct level of measurement in the blank, using lower case letters).

Question 9

5.2. For the same model in question 5.1 (shown below, the variables come from theNutritionStudy data), what is the level of measurement of the explanatory variable?

Cholesterol = Age + Other stuff

The explanatory variable is a ____ variable (put the correct level of measurement in the blank, using lower case letters).

Question 10

5.3. For the same model in question 5.1 (shown below, the variables come from theNutritionStudydata), what is the best way to visualize the relationship between Cholesterol and Age?

Cholesterol = Age + Other stuff

Group of answer choices

A faceted histogram

A scatterplot

A frequency table

A box plot

Question 11

6. To answer this question, you need to obtain information from the ACS data. Write some R code to find out how old is the oldest respondent in the ACS data. So how old is the oldest respondent in the ACS data?

Group of answer choices

95

93

94

92

Question 12

7. This question is also based on the ACS data. Write some R code to convert the variableMarried In the ACS data to a factor variable by assigning labels, 0 = "not_married", 1 = "married" and replace the originalMarried variable with the factor you created. Thenview the first 9 rows of the dataset ACSonlywith the factor variableMarried.In the output, what is shown in the 9th row for the variable Married?

Group of answer choices

1

married

not_married

0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

College Algebra

Authors: Mark Dugopolski

5th Edition

0321899822, 9780321899828

More Books

Students also viewed these Mathematics questions

Question

3. What values would you say are your core values?

Answered: 1 week ago