setD(nmax, SL.p, immunity.p = 0, risk.type = 2, target.EC.p = 10, plot = FALSE, alpha.p = 5, beta.p = 20, print.result = "02.sample size.txt")
1: Total risk (TR): The total risk is the total response expressed as percentage of affected biological units among all treated units. Spontaneous lethality and immunity are ignored.
2: Added risk (AR): The reference frame is restricted below and above by spontaneous lethality (SL) and immunity (IY). Only the response above the SL is considered as an effect. Using AR, the total response associated with a target effect of size xx and a spontaneous lethality SL is xx + SL.
3: Extra risk (ER): The reference frame is the interval from SL to (100%-IY). Using ER, the total response associated with a target effect of size xx is SL + 0.01 * xx * (100%-SL-IY).
plot = FALSE: no plots.
plot ="single": Creates one plot showing the distributions under no treatment and under treated conditions with the optimal number of cases. Additionally, the actual rates of the type I and type II error are given.
plot ="all": In addition to the "single" plot this option provides a sample size estimation for all possible target values. This gives an impression which possibilities of detection exist under the chosen conditions. This option may need a lot of computer capacity and time. It should not be activated in general.
target.EC
+
spontaneous.lethality
) spontaneous.lethality
, given the parameters
assumed and
number of organisms = number.organisms
number.organisms
# sample size calculation per treatment and experimental run
setD(nmax=350,SL.p=5.5,immunity.p=0,risk.type=2,target.EC=10,
alpha.p=5,beta.p=20,plot="single")
setD(nmax=350,SL.p=3,target.EC=5,plot="FALSE")
setD(nmax=350,SL.p=3,target.EC=5,plot="FALSE",print.result="setD.txt")
setD(nmax=350,SL.p=3,target.EC=5,plot="FALSE",print.result=FALSE)
Run the code above in your browser using DataLab