เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Extracting coefficients from glm()

Sometimes, we specifically care about model coefficients and their confidence intervals. The coef() function extracts coefficients and confint() extracts the confidence intervals. These functions work the same for both linear and generalized linear models. The GLM you fit in the previous exercise (poisson_out) has been loaded for you.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Generalized Linear Models in R

ดูคอร์ส

คำแนะนำการฝึกหัด

  • Using coef(), extract the regression coefficients from poisson_out.
  • Using confint(), extract the confidence intervals for the regression coefficients from poisson_out.

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Extract the regression coefficients
___

# Extract the confidence intervals
___
แก้ไขและรันโค้ด