Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
1 Randomization and Luck In class, I vaguely mentioned that you can get unlucky when you randomize, and I want to go over that a
1 Randomization and Luck In class, I vaguely mentioned that you can get "unlucky" when you randomize, and I want to go over that a bit more. So let's think of a really simple experiment: we are interested in understanding the effect of a placebo on height. Thankfully, Rafael Irizarry has provided some teaching datasets including one with heights (in inches). Enter the following code to load the dataset. install . packages ("delaba") library (dslabs) data( heights" ) df - as_tibble (heights) Here is conceptually what we are doing. We are going to randomize the students into treatment and control. We are then going to give the treatment students the placebo, and nothing to the control students. After a year, we measure their heights. 1. First, let's do one randomization. We want to randomize students into zero or one with probability .5, which we can do with the rhinom() command. Type df\\Srandom
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started