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

Toxicology data

A toxicologist wonders if exposure to a chemical increases mortality as its dose increases. She has exposed test organisms to different doses of a chemical and recorded the number that died in each test tank. Each dose was repeated on three different days.

First, build a GLM. Building a simple model makes debugging easier. Also, you will later compare the results to GLMER. This model includes dose and replicate as a fixed-effects.

Second, build a GLMER. This time, dose is a fixed-effect and replicate is a random-effects intercept.

Last, examine the coefficient estimates with coef() from each model. Notice how the intercept estimates are displayed differently from each model.

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

Hierarchical and Mixed Effects Models in R

ดูคอร์ส

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

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

# Fit glm_out and look at its coefficient estimates
glm_out <- glm(___ ~ ___ + ___,
               family = "___", data = df)
coef(___)
แก้ไขและรันโค้ด