CommencerCommencer gratuitement

Take a generative model for a spin

The generative model we just developed is displayed.

Cet exercice fait partie du cours

Fundamentals of Bayesian Data Analysis in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# The generative zombie drug model

# Set parameters
prop_success <- ___
n_zombies <- ___

# Simulating data
data <- c()
for(zombie in 1:n_zombies) {
  data[zombie] <- runif(1, min = 0, max = 1) < prop_success
}
data <- as.numeric(data)
data
Modifier et exécuter le code