For example, to examine power and accuracy for values from n = 200 to n = 400, increasing by increments of 25, use seq(200,400,25) for the n argument. This produces one simulation with n = 200, one with n = 225, and so forth. To increase m at each n, wrap the seq() function inside the replicate function, rep(). For example, rep(seq(200,400,25), 50) repeats the 200-400 sequence 50 times (i.e., m = 50). The goal here is not to meet the criteria in Table 1, but to hone in on plausible values of n using smaller values of m. After finding some possible values for n, complete the MC study with a single sample size and a much larger m.
ตัวอย่าง การตรวจสอบอำนาจและความถูกต้องสำหรับค่าจาก n = 200 ถึง n = 400 เพิ่มน้อย 25, seq(200,400,25) ที่ใช้เป็นอาร์กิวเมนต์ของ n ซึ่งสร้างจำลองหนึ่งกับ n = 200 มี n = 225 และอื่น ๆ เพิ่ม m ในแต่ละ n ตัดฟังก์ชัน seq() ภายในฟังก์ชัน replicate, rep() ตัวอย่างเช่น rep(seq(200,400,25), 50) ซ้ำลำดับที่ 200-400 50 ครั้ง (เช่น m = 50) เป้าหมายของที่นี่จะไม่ตรงตามเกณฑ์ในตารางที่ 1 แต่ลับในรับมือค่าของ n ที่ใช้มีขนาดเล็กกว่าค่าของ m หลังจากหาค่าบางค่าที่เป็นไปได้ n สมบูรณ์ศึกษา MC ด้วย m ตัวใหญ่มากและขนาดอย่างเดียว
การแปล กรุณารอสักครู่..

ตัวอย่าง การตรวจสอบอำนาจและความถูกต้องสำหรับค่า n = 200 N = 400 , เพิ่มขึ้นทีละ 25 ใช้ seq ( 200400,25 ) สำหรับ n การโต้เถียง นี้ผลิตหนึ่งจำลองกับ N = 200 , n = 225 , และอื่น ๆ เพื่อเพิ่มที่แต่ละ n ตัดฟังก์ชัน seq() ภายในทำซ้ำฟังก์ชัน rep() . ตัวอย่างเช่น ตัวแทน ( seq ( 200400,25 ) , 50 ) ซ้ำตามลำดับ 50 ครั้ง ( เช่นM = 50 ) เป้าหมายของที่นี่คือไม่ตรงกับเกณฑ์ในตารางที่ 1 แต่ต้องเหลาในค่าน่าเชื่อถือของ N โดยใช้ค่าขนาดเล็กของ หลังจากหาค่าได้ไม่สมบูรณ์ พิธีกรศึกษาด้วยขนาดตัวอย่างเดียวและมีขนาดใหญ่มาก ม.
การแปล กรุณารอสักครู่..
