Function [TNB] = EvModel(Policy,Scenario)
% Redefine the key variables from the scenario.
T = Scenario.drug_switching_period; % Drug switching period.
Age = Scenario.initial_age; % Initial age.
iSBP = Scenario.initial_SBP; % Initial SBP.
cLength = Scenario.cycle_length; % Cycle length.
Sample = Scenario.number_of_repetitions; % The no. of PSA runs.
WTP = Scenario.WTP; % Willingness-to-pay.
% Generate the decision tree by the scenario defined.
dTree = TreeGenerator(Scenario);
% Generate the index of the location of the drug used for h at t, where a specific policy is given.
DrugIdx = VarsGenerator(dTree);
% Generate whether a maintenance therapy is used, if so, how long the maintenance therapy has been used.
Maintenance = MTGenerator(dTree);
% Defined the memory variables for the use in the next period.
pTrtSux = zeros(size(dTree,1),T); % Treatment success rate.
SBP = zeros(size(dTree,1),T); SBP(1,1) = iSBP; % SBP
SBPSD = zeros(size(dTree,1),T); SBPSD(1,1) = 21.1; % The SD of SBP.
pCVD = zeros(size(dTree,1),T+1); % The probability of CVDs.
pHF = zeros(size(dTree,1),T+1); % The probability of HF.
pDM = zeros(size(dTree,1),T+1); % The probability of DM.
pAE = zeros(size(dTree,1),T); % The probability of AEs.
% Initialise the state transition matrix for the patients who stay in the short-term drug switching model.
pDizPath = zeros(size(dTree,1),T+1); pDizPath(1,1) = 1;
% Initialise the matrices for the short-term costs and QALYs calculated from h at t.
STCosts = zeros(size(dTree,1),T);
STQALYs = zeros(size(dTree,1),T);
% Each group of patients who move to the long-term CVD model from h at t has their own matrices for the long-term state transition probabilities, costs and QALYs.
LTProb = cell(t,h);
LTCost = cell(t,h);
LTQaly = cell(t,h);
% The cumulated state transition probabilities, costs and QALYs for all those patients who moved to the long-term model.
CumLTProb = zeros((104-Age)+1,11);
CumLTCost = zeros((104-Age)+1,11);
CumLTCQALY = zeros((104-Age)+1,11);
% Call datasets.
[cEvent,cDrug,distCVD,pNonCVDd] = Data(Scenario);
Dostları ilə paylaş: |