optimize_parameter | R Documentation |
A function to optimize the parameters in power or sample size estimation.
optimize_parameter( fun = est_power, opt1, opt2, opt1Value, opt2Value, main, ... )
fun |
function to be optimized, can be est_power, sample_size. |
opt1 |
parameter1 to be optimized. |
opt2 |
parameter2 to be optimized. |
opt1Value |
values of parameter1 to be optimized. |
opt2Value |
values of parameter2 to be optimized. |
main |
Title of optimization result figure. |
... |
Other parameters for optimized funtion. |
A function to optimize the parameters in power or sample size estimation.
A power or sample size matrix, generated by different pair of two paramters.
#Optimization for power estimation result<-optimize_parameter(fun=est_power,opt1="n",opt2="lambda0",opt1Value=c(3,5,10,15,20), opt2Value=c(1:5,10,20)) #Optimization for sample size estimation result<-optimize_parameter(fun=sample_size,opt1="lambda0",opt2="phi0",opt1Value=c(1,3), opt2Value=c(1.5,2),power=0.8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.