随机对照双盲实验的设计模式

    xiaoxiao2021-03-25  45

    随机对照双盲实验的设计模式

    随机对照双盲实验是业界对于药物有效性判断的标准做法,也用于心理学研究、市场调研、软件调研等领域,可以参考以下文章: https://wenku.baidu.com/view/1317e563ec3a87c24128c404.html http://baike.baidu.com/link?url=bGWje0j2F7cb4Uj5ZP3A4w29o_eSCZBlYI4GdRY9P0QhQ_nJa134pWK0HWhFVE2M5lkTn9DSbBXtENRlPzKpoaTRMmijHpbtMgcvUH52E4mkCKsNR3Y84ENxfFVDkiw1wT9x3m3cwyjJAdmMfFZyfa 简单来说有这么几个关键点:

    1)把实验对象分成处理组(待测试的药物NewDrug)、对照组(安慰剂Placebo) 2)病人(Patient)随机匹配一种药物,病人本身并不知道自己吃的是哪种药 3)医生(Doctor)也不知道病人吃得是哪种药

    这个方法可以用设计模式表达出来,让我们从另一个角度来理解:

    public abstract class Drug { } public class NewDrug extends Drug { } public class Placebo extends Drug { } public class Patient { public void takeMedicine(Drug drug) { }; } public class Doctor { public void testDrug(Patient patient, Drug drug) { patient.takeMedicine(drug); } } public class Client { private static int PATIENT_NUM = 100; public static void main(String[] args) { Doctor doctor = new Doctor(); Patient patient; Drug drug; int newDrugNum = 0; for (int i = 0; i < PATIENT_NUM; i++) { patient = new Patient(); drug = randomDrug(); doctor.testDrug(patient, drug); if (drug instanceof NewDrug) { newDrugNum++; } } System.out.println("newDrug=" + newDrugNum); } private static Drug randomDrug() { Drug drug; double random = Math.random(); if (random < 0.5) { drug = new NewDrug(); } else { drug = new Placebo(); } return drug; } }
    转载请注明原文地址: https://ju.6miu.com/read-200049.html

    最新回复(0)