optimize_parameter: optimize_parameter

Description Usage Arguments Details Value Examples

View source: R/optimize.R

Description

A function to optimize the parameters in power or sample size estimation.

Usage

1
2
3
4
5
6
7
8
9
optimize_parameter(
  fun = est_power,
  opt1,
  opt2,
  opt1Value,
  opt2Value,
  main,
  ...
)

Arguments

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.

Details

A function to optimize the parameters in power or sample size estimation.

Value

A power or sample size matrix, generated by different pair of two paramters.

Examples

1
2
3
4
#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)

RnaSeqSampleSize documentation built on Nov. 8, 2020, 6:54 p.m.