1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Analyzing Survey Data in R

Connected

अभ्यास

Regression model

Now it's time for us to build a simple linear regression model for the Weight of 20-year-olds using Height. To do so, we first need to subset the design object NHANES_design to only include 20-year-olds while still retaining the original design structure.

निर्देश

100 XP
  • Use subset() to create a new design object, NHANES20_design, which only contains the 20-year-olds.
  • Using svyglm(), build a simple linear regression model for Weight using Height with the design object NHANES20_design and store it as mod.
  • Print out a summary of the model.