E.st_utinity: Utinity Function Based on Expected Decision Strategy (E.st).

Description Usage Arguments Details Value Examples

View source: R/manual R codes.r

Description

This utinity function returns the probability to select one out of two-armed bandits with Bernoulli-outcomes (favorable and unfavorable) for the next (n+1)-th individual. E.st considerates the making-decision in a population with the homogeneously expected decision attitudes, which actually calculates the expected value of beta posterior distribution.

Usage

1

Arguments

x

the informed informaiton of n individuals (n=0,1,2,...) with consisted of 4 integers including counts of A$success, A$failure, B$success and B$failure.

Details

A and B are examples of two treatment arms in the context, resulting into a binary outcomes success or failure after one patient to be treated. The four integeral outcomes are written as a vector.

In terms of every patient with respecting themseleves'decision attitudes, each decision process selecting either A or B treatment is a randomly probabilistical process which depends the output returned by their selected utinity function.

Value

prob_A the probability to select A-arm, which is consisted of values 1, 0.5 or 0.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
AS<-13
# the successful counts of A treatment
AF<-5
#the failures of A treatment
BS<-2
#the successful counts of B treatment
BF<-1
#the failures of B treatment
N<- AS+AF+BS+BF
#the total number of patients treated (n)
E.st_utinity(x=c(AS,AF,BS,BF))
# Decision to how much probability to select arm A for the (n+1)-th patient with an expected attitude. 

ryamada22/SelfDecABP documentation built on May 28, 2019, 10:44 a.m.