Question

The Nielsen Ratings estimate the number of televisions tuned to various channels. However, television executives need...

The Nielsen Ratings estimate the number of televisions tuned to various channels. However, television executives need more information. The General Social Survey may be the source of this information. Respondents were asked to report the number of hours per average day of television viewing (TVHOURS). Conduct a regression analysis using the independent variables age (AGE), race (RACE, [White (coded as 1), Black (2), Asian (3)]), and hours of work (HRS1). What conclusions can you draw?

Note. We assume that the assumptions for regression analysis have met.

I want to use my R program and find answer.

Please give me some codes to reach answer

Homework Answers

Answer #1

Suppose we have data named "TV_data"

### Since we have a categorical variable 'race'.
### So we have to tell the R-softawe that this variable is
### categorical using the function factors()

# creating the factor variable
TV_data$RACE.f = factor(TV_data$RACE)
is.factor(TV_data$RACE.f)

### Now fitting a model

model=lm(TVHOURS~AGE+ RACE.f + HRS1)
##To get detailed summary
summary(model)

## To get ANOVA table
anova(mode)

NOTE: Since the R-programming is case sensitive so please enter the datasets name and varaible name as it is in datasets to get desired results.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT