Title: | Optimal Designs for the 5-Parameter Logistic Model |
---|---|
Description: | Obtain and evaluate various optimal designs for the 3, 4, and 5-parameter logistic models. The optimal designs are obtained based on the numerical algorithm in Hyun, Wong, Yang (2018) <doi:10.18637/jss.v083.i05>. |
Authors: | Seung Won Hyun, Weng Kee Wong, and Yarong Yang |
Maintainer: | Seung Won Hyun <[email protected]> |
License: | GPL-2 |
Version: | 0.1.1 |
Built: | 2024-12-05 06:46:00 UTC |
Source: | CRAN |
This is a sub-part of running Newton Raphon method to search c-optimal weights for the given design points. This is function probvides the obtained c-optimal weights after one iteration of Newton Raphson method.
c_weight(W, T, X, d, p, order, UB, I)
c_weight(W, T, X, d, p, order, UB, I)
W |
A numeric vector. The first K-1 weights for a given design |
T |
A numeric vector. Model parameter values |
X |
A numeric vector. K dose levels for a given design |
d |
Numeric. Step adjustment |
p |
Numeric. Define EDp |
order |
Numeric. The number of model paraemters |
UB |
Numeric. The upper bound of the design points |
I |
A numeric matrix. Identity matrix. |
The first derivative of the c-optimality criterion with respect to the model parameters. This is a sub-function of c_weight to run one iteration of Newton-Raphson method.
c_weight_1(W, T, X, inv, p, order)
c_weight_1(W, T, X, inv, p, order)
W |
A numeric vector. The first K-1 weights for a given design |
T |
A numeric vector. Model parameter values |
X |
A numeric vector. K dose levels for a given design |
inv |
A numeric matrix. Inverse of the information matrix. |
p |
A numeric. Define EDp |
order |
numeric. The number of model paraemters |
The second derivative of the c-optimality criterion with respect to the model parameters. This is a sub-function of c_weight to run one iteration of Newton-Raphson method.
c_weight_2(W, T, X, inv, p, order)
c_weight_2(W, T, X, inv, p, order)
W |
A numeric vector. The first K-1 weights for a given design |
T |
A numeric vector. Model parameter values |
X |
A numeric vector. K dose levels for a given design |
inv |
A numeric matrix. Inverse of the information matrix. |
p |
A numeric. Define EDp |
order |
numeric. The number of model paraemters |
This is a sub-part of running Newton Raphon method to search D-optimal weights for the given design points. This is function probvides the obtained D-optimal weights after one iteration of Newton Raphson method.
D_weight(W, T, X, d, q)
D_weight(W, T, X, d, q)
W |
A numeric vector. The first K-1 weights for a given design |
T |
A numeric vector. Model parameter values |
X |
A numeric vector. K dose levels for a given design |
d |
Numeric. Step adjustment |
q |
A numeric vector. User select weights defined in the function RDOPT |
The first derivative of the D-optimality criterion with respect to the model parameters. This is a sub-function of D_weight to run one iteration of Newton-Raphson method.
D_weight_1(q, W, T1, T2, T3, X, inv1, inv2, inv3)
D_weight_1(q, W, T1, T2, T3, X, inv1, inv2, inv3)
q |
A numeric vector. User select weights defined in the function RDOPT |
W |
A numeric vector. The first K-1 weights for a given design |
T1 |
A numeric vector. Model parameter values for the 3PL model |
T2 |
A numeric vector. Model parameter values for the 4PL model |
T3 |
A numeric vector. Model parameter values for the 5PL model |
X |
A numeric vector. K dose levels for a given design |
inv1 |
A numeric matrix. Inverse information matrix for the 3PL model |
inv2 |
A numeric matrix. Inverse information matrix for the 4PL model |
inv3 |
A numeric matrix. Inverse information matrix for the 5PL model |
The second derivative of the D-optimality criterion with respect to the model parameters. This is a sub-function of D_weight to run one iteration of Newton-Raphson method.
D_weight_2(q, W, T1, T2, T3, X, inv1, inv2, inv3)
D_weight_2(q, W, T1, T2, T3, X, inv1, inv2, inv3)
q |
A numeric vector. User select weights defined in the function RDOPT |
W |
A numeric vector. The first K-1 weights for a given design |
T1 |
A numeric vector. Model parameter values for the 3PL model |
T2 |
A numeric vector. Model parameter values for the 4PL model |
T3 |
A numeric vector. Model parameter values for the 5PL model |
X |
A numeric vector. K dose levels for a given design |
inv1 |
A numeric matrix. Inverse information matrix for the 3PL model |
inv2 |
A numeric matrix. Inverse information matrix for the 4PL model |
inv3 |
A numeric matrix. Inverse information matrix for the 5PL model |
This function computes each element of the vector function c_weight_1 which is the first derivative of the c-optimality criterion with respect to the model parameters.
D1(T, x, xl, inv, p, order)
D1(T, x, xl, inv, p, order)
T |
A numeric vector. Model parameter values |
x |
A numeric. ith dose level for a given design |
xl |
A numeric. last dose level for a given design |
inv |
A numeric matrix. Inverse of the information matrix |
p |
A numeric. Define EDp |
order |
numeric. The number of model paraemters |
This function computes each element of the vector function DD_weight_1 which is the first derivative of the Ds-optimality criterion with respect to the model parameters.
d11(T, x, xl, inv, inv1, order)
d11(T, x, xl, inv, inv1, order)
T |
A numeric vector. Model parameter values |
x |
A numeric. ith dose level for a given design |
xl |
A numeric. last dose level for a given design |
inv |
A numeric matrix. Inverse of the information matrix for the 5PL model |
inv1 |
A numeric matrix. Inverse of the information matrix for the 4PL model |
order |
numeric. The number of model paraemters |
This is a sub-part of running Newton Raphon method to search Ds-optimal weights for the given design points. This is function probvides the obtained Ds-optimal weights after one iteration of Newton Raphson method.
DD_weight(W, T, X, d, I4, I5, order)
DD_weight(W, T, X, d, I4, I5, order)
W |
A numeric vector. The first K-1 weights for a given design |
T |
A numeric vector. Model parameter values |
X |
A numeric vector. K dose levels for a given design |
d |
Numeric. Step adjustment |
I4 |
A numeric matrix. Information matrix for the 4PL model |
I5 |
A numeric matrix. Information matrix for the 5PL model |
order |
Numeric. The number of model paraemters |
The first derivative of the Ds-optimality criterion with respect to the model parameters. This is a sub-function of D_weight to run one iteration of Newton-Raphson method.
DD_weight_1(W, T, X, inv, inv1, order)
DD_weight_1(W, T, X, inv, inv1, order)
W |
A numeric vector. The first K-1 weights for a given design |
T |
A numeric vector. Model parameter values for the 5PL model |
X |
A numeric vector. K dose levels for a given design |
inv |
A numeric matrix. Inverse information matrix for the 5PL model |
inv1 |
A numeric matrix. Inverse information matrix for the 4PL model |
order |
numeric. The number of model paraemters |
The second derivative of the Ds-optimality criterion with respect to the model parameters. This is a sub-function of D_weight to run one iteration of Newton-Raphson method.
DD_weight_2(W, T, X, inv, inv1, order)
DD_weight_2(W, T, X, inv, inv1, order)
W |
A numeric vector. The first K-1 weights for a given design |
T |
A numeric vector. Model parameter values for the 5PL model |
X |
A numeric vector. K dose levels for a given design |
inv |
A numeric matrix. Inverse information matrix for the 5PL model |
inv1 |
A numeric matrix. Inverse information matrix for the 4PL model |
order |
numeric. The number of model paraemters |
This function computes each element of the matrix function c_weight_2 which is the second derivative of the c-optimality criterion with respect to the model parameters.
DD1(T, x1, x2, xl, inv, p, order)
DD1(T, x1, x2, xl, inv, p, order)
T |
A numeric vector. Model parameter values |
x1 |
A numeric. ith dose level for a given design |
x2 |
A numeric. jth dose level for a given design |
xl |
A numeric. last dose level for a given design |
inv |
A numeric matrix. Inverse of the information matrix |
p |
A numeric. Define EDp |
order |
numeric. The number of model paraemters |
This function computes each element of the matrix function DD_weight_2 which is the second derivative of the Ds-optimality criterion with respect to the model parameters.
dd11(T, x1, x2, xl, inv, inv1, order)
dd11(T, x1, x2, xl, inv, inv1, order)
T |
A numeric vector. Model parameter values |
x1 |
A numeric. ith dose level for a given design |
x2 |
A numeric. jth dose level for a given design |
xl |
A numeric. last dose level for a given design |
inv |
A numeric matrix. Inverse of the information matrix for the 5PL model |
inv1 |
A numeric matrix. Inverse of the information matrix for the 4PL model |
order |
numeric. The number of model paraemters |
Obtaining D-efficiency for estimating model parameters for a given design under the 3, 4, 5-parameter logistic models. For the output, the function shows three things: 1. the obtained D-optimal design for the given parameter values; 2. the D-efficiency of the given design; and 3. the number of subjects required for the given design in order to provide the same performance as the D-optimal design does.
Deff(weight,dose,model,P,LB,UB,grid,N_dose)
Deff(weight,dose,model,P,LB,UB,grid,N_dose)
weight |
A numeric vector. The first K-1 weights for a given design with K design points(K dose levels). The weights represent the proportional allocations of subjects to the dose levels in a given design. |
dose |
A numeric vector. K dose levels for a given design. |
model |
Numeric. The number of parameters in the model. This is used to specify the model to check the D-efficiency. |
P |
A numeric vector. Solicited information on nominal values for the vector for the 5PL model. P=( p1, p2, p3, p4, p5), where p1 is the upper limit of the response, p2 is the slope that control the stiffness of the response curve, p3 is the position of the transition region in dose(this is the ED50 under the 3PL and the 4PL model), p4 is the lower limit of the response, and p5 is the asymmetric factor. When a user computes the D-efficiency under the 3PL or 4PL model, P is the vector of model parameter values for each model with setting p4 and p5 differently. Details are given in the examples. |
LB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
UB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
grid |
Numeric. The grid density to discretize the predetermined dose interval. Default is 0.01. |
N_dose |
Set to TRUE if the original dose levels take negative values. Set to FALSE if the original dose levels take positive values. Default is FALSE |
Seung Won Hyun, Weng Kee Wong, and Yarong Yang
Hyun, S. W., Wong, W.K., Yang, Y. Optimal designs for asymmetric sigmoidal response curves in bioassays and immunoassays. (submitted to Statistical Methods in Medical Research)
Hyun, S.W., Wong, W.K, Yang, Y. VNM: An R Package for Finding Multiple-Objective Optimal Designs for the 4-Parameter Logistic Model. (Journal of Statistical Software, 83, 1-19, 2018, doi:10.18637/jss.v083.i05.)
##Under the 5PL model with the parameter values ##T5=(30000,0.5,800,0.5,2) and the dose range [1.95,32000], ##find the D-efficiency of the broad range design. ##The broad range design dose=c(1.95,7.8,31.25,125,500,2000,8000,32000) dlength=length(dose) weight=rep(1/dlength,dlength-1) ##Parameter values T5=c(30000,0.5,800,0.5,2) ##Compute D-efficiency of the broad range design Deff(weight,dose,model=5,P=T5,LB=1.95,UB=32000,grid=.01)
##Under the 5PL model with the parameter values ##T5=(30000,0.5,800,0.5,2) and the dose range [1.95,32000], ##find the D-efficiency of the broad range design. ##The broad range design dose=c(1.95,7.8,31.25,125,500,2000,8000,32000) dlength=length(dose) weight=rep(1/dlength,dlength-1) ##Parameter values T5=c(30000,0.5,800,0.5,2) ##Compute D-efficiency of the broad range design Deff(weight,dose,model=5,P=T5,LB=1.95,UB=32000,grid=.01)
This finds the target dose level EDp which is the dose producing p percentage of the difference between the maximum and the minimum responses.
Dp(T, p)
Dp(T, p)
T |
A numeric vector. Model parameter values |
p |
A numeric. Define EDp |
This evaluates the sensitivity function of the c-optimality criterion for the EDp at the given value of x.
DS1(T, x, inv, p, order)
DS1(T, x, inv, p, order)
T |
A numeric vector. Model parameter values for the 5PL model |
x |
A numeric. A given dose level |
inv |
A numeric matrix. Inverse infromation matrix for the 5PL model |
p |
A numeric. Define EDp |
order |
numeric. The number of model paraemters |
This evaluates the sensitivity function of the Ds-optimality criterion at the given value of x.
ds11(T, x, inv, inv1, order)
ds11(T, x, inv, inv1, order)
T |
A numeric vector. Model parameter values for the 5PL model |
x |
A numeric. A given dose level |
inv |
A numeric matrix. Inverse information matrix for the 5PL model |
inv1 |
A numeric matrix. Inverse information matrix for the 4PL model |
order |
numeric. The number of model paraemters |
Obtaining Ds-efficiency for estimating the asymmetric factor for a given design under the 5-parameter logistic models. For the output, the function shows three things: 1. the obtained Ds-optimal design for the given parameter values; 2. the Ds-efficiency of the given design; and 3. the number of subjects required for the given design in order to provide the same performance as the Ds-optimal design does.
Dseff(weight,dose,P,LB,UB,r,epsilon,grid,N_dose)
Dseff(weight,dose,P,LB,UB,r,epsilon,grid,N_dose)
weight |
A numeric vector. The first K-1 weights for a given design with K design points(K dose levels). The weights represent the proportional allocations of subjects to the dose levels in a given design. |
dose |
A numeric vector. K dose levels for a given design. |
P |
A numeric vector. Solicited information on nominal values for the vector for the 5PL model. P=(p1, p2, p3, p4, p5), where p1 is the upper limit of the response, p2 is the slope that control the stiffness of the response curve, p3 is the position of the transition region in dose, p4 is the lower limit of the response, and p5 is the asymmetric factor. |
LB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
UB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
r |
Numeric. The number of iterations to set an initial design to search the Ds-optimal design to compute the efficiency. Default is 30 and needed to be increased (for example, r=50) if the searched the Ds-optimal design is not a true optimal. It can be verified by the verification plot. |
epsilon |
Numeric. Stopping criterion for the algorithm to search the Ds-optimal design. Default is 0.001. |
grid |
Numeric. The grid density to discretize the predetermined dose interval. Default is 0.01. |
N_dose |
Set to TRUE if the original dose levels take negative values. Set to FALSE if the original dose levels take positive values. Default is FALSE |
Seung Won Hyun, Weng Kee Wong, and Yarong Yang
Hyun, S. W., Wong, W.K., Yang, Y. Optimal designs for asymmetric sigmoidal response curves in bioassays and immunoassays. (submitted to Statistical Methods in Medical Research)
Hyun, S.W., Wong, W.K, Yang, Y. VNM: An R Package for Finding Multiple-Objective Optimal Designs for the 4-Parameter Logistic Model. (Journal of Statistical Software, 83, 1-19, 2018, doi:10.18637/jss.v083.i05.)
##Under the 5PL model with the parameter values ##T5=(30000,0.5,800,0.5,2) and the dose range [1.95,32000], ##find the Ds-efficiency of the broad range design. ##The broad range design dose=c(1.95,7.8,31.25,125,500,2000,8000,32000) dlength=length(dose) weight=rep(1/dlength,dlength-1) ##Parameter values for the 5PL model T5=c(30000,0.5,800,0.5,2) ##Ds efficiency of the broad range design Dseff(weight,dose,P=T5,LB=1.95,UB=32000,grid=.01)
##Under the 5PL model with the parameter values ##T5=(30000,0.5,800,0.5,2) and the dose range [1.95,32000], ##find the Ds-efficiency of the broad range design. ##The broad range design dose=c(1.95,7.8,31.25,125,500,2000,8000,32000) dlength=length(dose) weight=rep(1/dlength,dlength-1) ##Parameter values for the 5PL model T5=c(30000,0.5,800,0.5,2) ##Ds efficiency of the broad range design Dseff(weight,dose,P=T5,LB=1.95,UB=32000,grid=.01)
Obtain Ds-optimal design (i.e., optimal dose levels and corresponding optimal weights) for estimating the asymmetric factor under the 5-parameter logistic model.
DsOPT(LB,UB,P,grid,r,epsilon,N_dose,log_scale)
DsOPT(LB,UB,P,grid,r,epsilon,N_dose,log_scale)
LB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
UB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
P |
A numeric vector. Solicited information on nominal values for the vector for the 5PL model. P=(p1, p2, p3, p4, p5), where p1 is the upper limit of the response, p2 is the slope that control the stiffness of the response curve, p3 is the position of the transition region in dose, p4 is the lower limit of the response, and p5 is the asymmetric factor. |
grid |
Numeric. The grid density to discretize the predetermined dose interval. Default is 0.01. |
r |
Numeric. The number of iterations to set an initial design to search the Ds-optimal design. Default is 30 and needed to be increased (for example, r=50) if the searched optimal design is not a true optimal. It can be verified by the verification plot. |
epsilon |
Numeric. Stopping criterion for the algorithm to search the Ds-optimal design. Default is 0.001. |
N_dose |
Set to TRUE if the original dose levels take negative values. Set to FALSE if the original dose levels take positive values. Default is FALSE |
log_scale |
Set to TRUE if a user wants to set the X-axis(dose level) on log scale in the verification plot of the optimal design. Otherwise, set to FALSE. Default is TRUE. Note: this need to set FALSE when the original dose levels take negative values. |
Seung Won Hyun, Weng Kee Wong, and Yarong Yang
Hyun, S. W., Wong, W.K., Yang, Y. Optimal designs for asymmetric sigmoidal response curves in bioassays and immunoassays. (submitted to Statistical Methods in Medical Research)
Hyun, S.W., Wong, W.K, Yang, Y. VNM: An R Package for Finding Multiple-Objective Optimal Designs for the 4-Parameter Logistic Model. (Journal of Statistical Software, 83, 1-19, 2018, doi:10.18637/jss.v083.i05.)
##Find the Ds-optimal design for estimating theta_5 under the 5PL model ##with the parameter values T5=(30000,0.5,800,0.5,2) and the dose range [1.95,32000]. ##Parameter values for the 5PL model T5=c(30000,0.5,800,0.5,2) ##Find the Ds-optimal design DsOPT(LB=1.95, UB=32000, P=T5,grid=.01,epsilon=.001)
##Find the Ds-optimal design for estimating theta_5 under the 5PL model ##with the parameter values T5=(30000,0.5,800,0.5,2) and the dose range [1.95,32000]. ##Parameter values for the 5PL model T5=c(30000,0.5,800,0.5,2) ##Find the Ds-optimal design DsOPT(LB=1.95, UB=32000, P=T5,grid=.01,epsilon=.001)
Obtaining c-efficiency for estimating the EDp for a given design under the 5-parameter logistic models. For the output, the function shows three things: 1. the obtained c-optimal design for the given parameter values; 2. the c-efficiency of the given design; and 3. the number of subjects required for the given design in order to provide the same performance as the c-optimal design does.
EDpeff(weight,dose,P,EDp,LB,UB,r,epsilon,grid,N_dose)
EDpeff(weight,dose,P,EDp,LB,UB,r,epsilon,grid,N_dose)
weight |
A numeric vector. The first K-1 weights for a given design with K design points(K dose levels). The weights represent the proportional allocations of subjects to the dose levels in a given design. |
dose |
A numeric vector. K dose levels for a given design. |
P |
A numeric vector. Solicited information on nominal values for the vector for the 5PL model. P=(p1, p2, p3, p4, p5), where p1 is the upper limit of the response, p2 is the slope that control the stiffness of the response curve, p3 is the position of the transition region in dose, p4 is the lower limit of the response, and p5 is the asymmetric factor. |
EDp |
Numeric. An user select value to define the EDp. For example, EDp=.05 to define the ED50. |
LB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
UB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
r |
Numeric. The number of iterations to set an initial design to search the c-optimal design for the EDp in order to compute the efficiency. Default is 30 and needed to be increased (for example, r=50) if the searched the c-optimal design is not a true optimal. It can be verified by the verification plot. |
epsilon |
Numeric. Stopping criterion for the algorithm to search the c-optimal design. Default is 0.001. |
grid |
Numeric. The grid density to discretize the predetermined dose interval. Default is 0.01. |
N_dose |
Set to TRUE if the original dose levels take negative values. Set to FALSE if the original dose levels take positive values. Default is FALSE |
Seung Won Hyun, Weng Kee Wong, and Yarong Yang
Hyun, S. W., Wong, W.K., Yang, Y. Optimal designs for asymmetric sigmoidal response curves in bioassays and immunoassays. (submitted to Statistical Methods in Medical Research)
Hyun, S.W., Wong, W.K, Yang, Y. VNM: An R Package for Finding Multiple-Objective Optimal Designs for the 4-Parameter Logistic Model. (Journal of Statistical Software, 83, 1-19, 2018, doi:10.18637/jss.v083.i05.)
##Under the 5PL model with the parameter values ##T5=(30000,0.5,800,0.5,2) and the dose range [1.95,32000], ##find the c-efficiency of the broad range design. ##The broad range design dose=c(1.95,7.8,31.25,125,500,2000,8000,32000) dlength=length(dose) weight=rep(1/dlength,dlength-1) ##Parameter values for the 5PL model T5=c(30000,0.5,800,0.5,2) ##Compute the c-efficiency of the broad range design EDpeff(weight,dose,P=T5,EDp=.5,LB=1.95,UB=32000,grid=.01)
##Under the 5PL model with the parameter values ##T5=(30000,0.5,800,0.5,2) and the dose range [1.95,32000], ##find the c-efficiency of the broad range design. ##The broad range design dose=c(1.95,7.8,31.25,125,500,2000,8000,32000) dlength=length(dose) weight=rep(1/dlength,dlength-1) ##Parameter values for the 5PL model T5=c(30000,0.5,800,0.5,2) ##Compute the c-efficiency of the broad range design EDpeff(weight,dose,P=T5,EDp=.5,LB=1.95,UB=32000,grid=.01)
Obtain c-optimal design (i.e., optimal dose levels and corresponding optimal weights) for estimating the EDp under the 5-parameter logistic model. The EDp is the dose level that achieve the 100p% of the difference between the maximum and the minimum responses.
EDpOPT(LB,UB,P,EDp,grid,r,epsilon,N_dose,log_scale)
EDpOPT(LB,UB,P,EDp,grid,r,epsilon,N_dose,log_scale)
LB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
UB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
P |
A numeric vector. Solicited information on nominal values for the vector for the 5PL model. P=(p1, p2, p3, p4, p5), where p1 is the upper limit of the response, p2 is the slope that control the stiffness of the response curve, p3 is the position of the transition region in dose, p4 is the lower limit of the response, and p5 is the asymmetric factor. |
EDp |
Numeric. An user select value to define the EDp. For example, EDp=.05 to define the ED50. |
grid |
Numeric. The grid density to discretize the predetermined dose interval. Default is 0.01. |
r |
Numeric. The number of iterations to set an initial design to search the c-optimal design. Default is 30 and needed to be increased (for example, r=50) if the searched optimal design is not a true optimal. It can be verified by the verification plot. |
epsilon |
Numeric. Stopping criterion for the algorithm to search the c-optimal design. Default is 0.001. |
N_dose |
Set to TRUE if the original dose levels take negative values. Set to FALSE if the original dose levels take positive values. Default is FALSE |
log_scale |
Set to TRUE if a user wants to set the X-axis(dose level) on log scale in the verification plot of the optimal design. Otherwise, set to FALSE. Default is TRUE. Note: this need to set FALSE when the original dose levels take negative values. |
Seung Won Hyun, Weng Kee Wong, and Yarong Yang
Hyun, S. W., Wong, W.K., Yang, Y. Optimal designs for asymmetric sigmoidal response curves in bioassays and immunoassays. (submitted to Statistical Methods in Medical Research)
Hyun, S.W., Wong, W.K, Yang, Y. VNM: An R Package for Finding Multiple-Objective Optimal Designs for the 4-Parameter Logistic Model. (Journal of Statistical Software, 83, 1-19, 2018, doi:10.18637/jss.v083.i05.)
##Search the c-optimal design for estimating the ED50 under the 5PL model ##Parameter values for the 5PL model T5=c(30000,0.5,800,0.5,2) ##Dose range=[1.95,32000] EDpOPT(LB=1.95,UB=32000, P=T5,EDp=.5,grid=.01, r =30,epsilon=.001)
##Search the c-optimal design for estimating the ED50 under the 5PL model ##Parameter values for the 5PL model T5=c(30000,0.5,800,0.5,2) ##Dose range=[1.95,32000] EDpOPT(LB=1.95,UB=32000, P=T5,EDp=.5,grid=.01, r =30,epsilon=.001)
This gives the first derivative of the mean response function (3, 4, or 5PL) with respect to the model parameters.
f(T, x, order)
f(T, x, order)
T |
A numeric vector. Model parameter values |
x |
A numeric. A given dose level |
order |
numeric. The number of model paraemters |
Partial derivative of the EDp with respect to the model parameters
g(T, p)
g(T, p)
T |
A numeric vector. Model parameter values |
p |
A numeric. Define EDp |
Obtain generalized inverse of the given matrix X.
ginv(X, tol = sqrt(.Machine$double.eps))
ginv(X, tol = sqrt(.Machine$double.eps))
X |
A numeric matrix |
tol |
Default |
Obtain a information matrix at a single given design point x.
infor(T, x, order)
infor(T, x, order)
T |
A numeric vector. Model parameter values |
x |
numeric. A single design point(dose level) |
order |
numeric. The number of model paraemters |
When the inverse matrix is a singular, it is adjusted to become nonsingular matrix.
Inv(M, I)
Inv(M, I)
M |
A numeric matrix |
I |
Identity matrix |
Matrix subtraction: M1-M2.
Minus(M1, M2)
Minus(M1, M2)
M1 |
A numeric matrix |
M2 |
A numeric matrix |
Matrix multiplication: M1*M2.
Multiple(M1, M2)
Multiple(M1, M2)
M1 |
A numeric matrix |
M2 |
A numeric matrix |
Matrix addition: M1+M2.
Plus(M1, M2)
Plus(M1, M2)
M1 |
A numeric matrix |
M2 |
A numeric matrix |
Obtain robust D-optimal design (i.e., optimal dose levels and corresponding optimal weights) for estimating the model parameters that works well under the 3, 4, 5-parameter logistic models. In addition, the function can be used to obtain D-optimal design for each of the three models.
RDOPT(LB,UB, P3,P4,P5,q,grid,r,epsilon,N_dose,log_scale)
RDOPT(LB,UB, P3,P4,P5,q,grid,r,epsilon,N_dose,log_scale)
LB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
UB |
Numeric. Predetermined lower bound of the dose range for the original dose level. |
P3 |
A numeric vector. Solicited information on nominal values for the vectors for the 3PL model. P3=(p1, p2, p3), where p1 is the upper limit of the response, p2 is the slope that control the stiffness of the response curve, and p3 is the ED50. |
P4 |
A numeric vector. Solicited information on nominal values for the vectors for the 4PL model. P4=(p1, p2, p3, p4), where p1 is the upper limit of the response, p2 is the slope that control the stiffness of the response curve, p3 is the ED50, and p4 is the lower limit of the response. |
P5 |
A numeric vector. Solicited information on nominal values for the vectors for the 5PL model. P5=(p1, p2, p3, p4, p5), where p1 is the upper limit of the response, p2 is the slope that control the stiffness of the response curve, p3 is the position of the transition region in dose, p4 is the lower limit of the response, and p5 is the asymmetric factor. For searching the robust D-optimal design, the nominal values for P3, P4, P5 need to be specified. However, when a user searches the D-optimal design for the 3PL, 4PL, or 5PL model, only P5 needs to be specified. Details are given in the examples. |
q |
A numeric vector. User select weights. q=c(q1, q2, q3), where q1, q2, q3 represent the relative importance of the 3, 4, 5PL models respectively. They are non-negative and q1+q2<=1. For example, q=c(0,0,1) is used to find D-optimal design for the 5PL model only and q=c(1/3,1/3,1/3) is used to find robust D-optimal design for the three models under the assumption that the three models are equally important. |
grid |
Numeric. The grid density to discretize the predetermined dose interval. Default is 0.01. |
r |
Numeric. The number of iterations to set an initial design to search the D-optimal design. Default is 30 and needed to be increased (for example, r=50) if the searched optimal design is not a true optimal. It can be verified by the verification plot. |
epsilon |
Numeric. Stopping criterion for the algorithm to search the D-optimal design. Default is 0.001. |
N_dose |
Set to TRUE if the original dose levels take negative values. Set to FALSE if the original dose levels take positive values. Default is FALSE |
log_scale |
Set to TRUE if a user wants to set the X-axis(dose level) on log scale in the verification plot of the optimal design. Otherwise, set to FALSE. Default is TRUE. Note: this need to set FALSE when the original dose levels take negative values. |
Seung Won Hyun, Weng Kee Wong, and Yarong Yang
Hyun, S. W., Wong, W.K., Yang, Y. Optimal designs for asymmetric sigmoidal response curves in bioassays and immunoassays. (submitted to Statistical Methods in Medical Research)
Hyun, S.W., Wong, W.K, Yang, Y. VNM: An R Package for Finding Multiple-Objective Optimal Designs for the 4-Parameter Logistic Model. (Journal of Statistical Software, 83, 1-19, 2018, doi:10.18637/jss.v083.i05.)
##1. Search the robust D-optimal design for estimating the model parameters ##under the 3,4,5PL models ##Parameter values for the 5PL model T5=c(30000,0.5,800,0.5,2) ##Parameter values for the 4PL model T4=c(27264.92,0.67,3340.95,-225.55) ##Parameter values for the 3PL model T3=c(26715.52,0.70,3204.92) ##Dose range=[1.95,32000] ##Assuming the three models are equally important RDOPT(LB=1.95,UB=32000,P3=T3,P4=T4,P5=T5,q=c(1/3,1/3,1/3)) ##2. Search the D-optimal design for the 3PL model using ##the parameter values T3=(26715.52,0.70,3204.92) ##and the dose range [1.95,32000]. #Set the parameter values for the 3PL model in the form of P5 P5=c(26715.52,0.70,3204.92,0,1) RDOPT(LB=1.95, UB=32000,P5=P5,q=c(1,0,0)) ##3. Search the D-optimal design for the 4PL model using ##the parameter values T4=(27264.92,0.67,3340.95,-225.55) ##and the dose range [1.95,32000]. #Set the parameter values for the 4PL model in the form of P5. P5=c(27264.92,0.67,3340.95,-225.55,1) RDOPT(LB=1.95, UB=32000,P5=P5,q=c(0,1,0))
##1. Search the robust D-optimal design for estimating the model parameters ##under the 3,4,5PL models ##Parameter values for the 5PL model T5=c(30000,0.5,800,0.5,2) ##Parameter values for the 4PL model T4=c(27264.92,0.67,3340.95,-225.55) ##Parameter values for the 3PL model T3=c(26715.52,0.70,3204.92) ##Dose range=[1.95,32000] ##Assuming the three models are equally important RDOPT(LB=1.95,UB=32000,P3=T3,P4=T4,P5=T5,q=c(1/3,1/3,1/3)) ##2. Search the D-optimal design for the 3PL model using ##the parameter values T3=(26715.52,0.70,3204.92) ##and the dose range [1.95,32000]. #Set the parameter values for the 3PL model in the form of P5 P5=c(26715.52,0.70,3204.92,0,1) RDOPT(LB=1.95, UB=32000,P5=P5,q=c(1,0,0)) ##3. Search the D-optimal design for the 4PL model using ##the parameter values T4=(27264.92,0.67,3340.95,-225.55) ##and the dose range [1.95,32000]. #Set the parameter values for the 4PL model in the form of P5. P5=c(27264.92,0.67,3340.95,-225.55,1) RDOPT(LB=1.95, UB=32000,P5=P5,q=c(0,1,0))
Newton Raphson method to get optimal weights for given design points "X".
S_weight(X, T, e1, f, ...)
S_weight(X, T, e1, f, ...)
X |
A numeric vector. K dose levels for a given design |
T |
A numeric vector. Model parameter values |
e1 |
Numeric. Threshold to stop the iteration. |
f |
A character. D_weight for D-optimal weight; c_weight for c-optimal weight; DD_weight for Ds-optimal weight |
... |
Default. |
Summation of diagonal elements in a matrix M.
SDM(M)
SDM(M)
M |
A numeric matrix |
This computes the first derivative of the D-optimality criterion with respect to the model parameters for a specified model.
smalld1(T, x, xl, inv, order)
smalld1(T, x, xl, inv, order)
T |
A numeric vector. Model parameter values |
x |
A numeric. ith dose level |
xl |
A numeric. last dose level |
inv |
A numeric matrix. Inverse infromation matrix |
order |
numeric. The number of model paraemters: 3, 4, 5 for the 3, 4, 5PL models respectively |
This computes the second derivative of the D-optimality criterion with respect to the model parameters for a specified model.
smalldd1(T, x1, x2, xl, inv, order)
smalldd1(T, x1, x2, xl, inv, order)
T |
A numeric vector. Model parameter values |
x1 |
A numeric. ith dose level |
x2 |
A numeric. jth dose level |
xl |
A numeric. last dose level |
inv |
A numeric matrix. Inverse information matrix |
order |
numeric. The number of model paraemters: 3, 4, 5 for the 3, 4, 5PL models respectively |
This evaluates the sensitivity function of the D-optimality criterion at the given value of x for a specified model.
smallds1(T, x, inv, order)
smallds1(T, x, inv, order)
T |
A numeric vector. Model parameter values |
x |
A numeric. A given dose level |
inv |
A numeric matrix. Inverse information matrix |
order |
numeric. The number of model paraemters: 3, 4, 5 for the 3, 4, 5PL models respectively |
Multiply a constant to a matrix: s*M.
sMultiple(s, M)
sMultiple(s, M)
s |
Numeric |
M |
A numeric matrix |
Transpose of a matrix M.
Trans(M)
Trans(M)
M |
A numeric matrix |
Obtain normalized Fisher information matrix for the 3, 4, 5PL models.
upinfor(W, T, X, order)
upinfor(W, T, X, order)
W |
A numeric vector. The first K-1 weights for a given design |
T |
A numeric vector. Model parameter values |
X |
A numeric vector. K design points for a given design |
order |
numeric. The number of model paraemters |