Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hint1: There are two ways to do this in R. You can manually create dummy variable columns; or use the factor(region) in the lm function:

Hint1: There are two ways to do this in R. You can manually create dummy variable columns; or use the factor(region) in the lm function: lm(Y~infection+factor(Region)+infection*factor(Region)). Although the factor() method can generate the summary for the full model quicky, it is not as flexible as the dummy variable method to evaluate the parameters in the model. Hint2: You may use the relevel() function in R to change the baseline category. For example, if you want to use the second, or the NE category as the baseline, do data$region<-relevel(data$region,2). This is useful when you are not comparing the mean response value of Y in a level to that in the baseline level

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

Advanced Engineering Mathematics

Authors: Erwin Kreyszig

10th edition

470458364, 470458365, 978-0470458365

More Books

Students also viewed these Mathematics questions

Question

1. Traditional and modern methods of preserving food Articles ?

Answered: 1 week ago

Question

What is sociology and its nature ?

Answered: 1 week ago

Question

What is liquidation ?

Answered: 1 week ago

Question

Explain the different types of Mergers.

Answered: 1 week ago