⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 genhan_two_stage.m

📁 临床医药试验:Gehan s Two Stage Design
💻 M
字号:
%TITLE: GEHAN'S TWO STAGE DESIGN%


%SOURCE OF FORMULA: P14, CHAPTER 4, STA 526:CLINICAL DESIGN%


%DESCRIPTION OF Gehan's Two Stage Design:%
%Gehan's two stage design is used to evaluate the activity of an
%experimental drug in Phase II clinical trial;usually, it consists of two 
%stages as decscribed following:%

%Stage I: Administer the intervention to N1 patients; if no patients
%respond, we declare the treatment ineffective%
%Stage II: If at least one patient responds in stage I, treat an additional
%N2 subject;calculate the estimate of pi and the corresponding confidence
%interval based on N=N1+N2 subjects%

%OBJECTIVE OF THE FUNCTION:%
%1)Caculate the sample size of stage I in order to calculate the sample
%size in order to control the nominal type I error%

%2)Calculate the total sample size of the two stage design%

%3)Calculate the ACTUAL probability of rejection of the drug under the
%hypothesized response rate%

%INPUT VARIABLES%
%1)PI0: Hypothesized response rate;this is the smallest response rate
%considered acceptable to the researchers%

%2)ALPHA0: The type I error%

%3)W: Confidence Width of the response rate%

%4)PI_A: Actual response rate%


%OUTPUT VARIABLES%
%1)N1: The smallest sample size on stage one in order to control the type I
%error%

%2)N: The total sample size of the Gehan's two stage design%

%3)PR: The actual probability of rejecting the experiemental drug given the
%hypothesized response rate%

%4)PR_A:Probability of rejecting the experimental drug under the true
%response rate%

%if do not wish to calculate the total sample size, then input W=0%
%if do not wish to calculate the true probability of rejecting the drug,
%then input W=0%
function [PR,N1,PR_A,N]=genhan_two_stage(ALPHA0,PI0,PI_A,W)

W1=max(W,0);

N1=ceil(log(ALPHA0)/log(1-PI0));

if W1>0;
N=ceil(4*(norminv(1-(ALPHA0/2),0,1)^2)*PI0*(1-PI0)/(W^2))
end

PR=(1-PI0)^N1;

if PI_A>0
    PR_A=(1-PI_A)^N1;
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -