you can almost fit any function you want

bisec_fit(data, ff, extra, space, partition, times, trim, enlarge)

Arguments

data

numeric matrix. data[i, 1] gives \(xi\) and data[i, 2] gives \(yi\)

ff

function. ff(para, extra) gives the function f() that \(y=f(x)\) where the range of para make a space.

extra

numeric vector. see ff

space, partition, times, trim, enlarge

see bisec_optim

Value

list of list.

  1. information about subrange1

    1. \(R^2\) using median of subrange1 as para for ff

    2. subrange1

  2. information about subrange2

    1. \(R^2\) using median of subrange2 as para for ff

    2. subrange1

  3. ...

Details

even complex coupled differential equation that you can't get a analytic solution is ok.

to do

1. support multivariate function

See also

biosec_optim

Examples

bisec_fit(data1, f_protein, extra11, space1, 2, 5, 1/3, 1)
#> $value #> [1] 0.0001447741 #> #> $para #> K.i K.nat k.d #> 0.8859375 0.0984375 0.0196875 #> #> $space #> [,1] [,2] #> K.i 0.84375 0.928125 #> K.nat 0.09375 0.103125 #> k.d 0.01875 0.020625 #>
bisec_fit(data2, f_AI2_out, extra2, space2, 2, 5, 4, 1)
#> $value #> [1] 9.844207e-06 #> #> $para #> k.in k.out k.p #> 0.00787500 0.04429687 0.00646875 #> #> $space #> [,1] [,2] #> k.in 0.0075000 0.00825000 #> k.out 0.0421875 0.04640625 #> k.p 0.0061875 0.00675000 #>