Description Usage Arguments Details Author(s) Examples
sauc.phi
optimizes Normal CDF approximation of AUC using Newton Raphson
1 2 3 |
formula |
a formula |
dat |
a data frame |
constrain.method |
a string. If "L2", L2 norm is constrained to 1. If "beta1", beta1 is fixed to 1. Default "L2". |
h.method |
a string. If "Lin", Lin et al, data dependent. If "Vexler", (n1*n2)^(-0.1) Vexler et al (2006). If "MH", Ma and Huang. Default "Lin". |
start.method |
a string. If "rlogit", robust logistic fit is used as beta.init If "1", a vector of 1 is used as beta.init. Default "rlogit". |
opt.method |
character string, possible values are "truth","YH","Lin", please see code for more details |
upper |
required for opt.method = 'YH' |
verbose |
logical |
ret.vcov |
logical, whether to return an estimate of the covariance matrix of 'beta' for normal or logistic sigmoid functions. |
truth |
numeric, it will be returned as the result of the fit, please see code for more details |
beta.init |
vector. Initial values for coefficients. |
If an error happens during optimization (typically due to solve()), the errors are catched and NAs are returned.
Shuxin Yin
Ying Huang
Youyi Fong youyifong@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | seed=26
seed=16
seed=3
dat.train = sim.dat.1(n=200, seed=seed, add.outliers=TRUE)
fits=list()
fits[[1]]=sauc.phi(y~x1+x2, dat.train,constrain.method="L2",h.method="Lin")
fits[[2]]=sauc.phi(y~x1+x2, dat.train,constrain.method="L2",h.method="MH")
fits[[3]]=sauc.phi(y~x1+x2, dat.train,constrain.method="beta1",h.method="Lin")
fits[[4]]=sauc.phi(y~x1+x2, dat.train,constrain.method="beta1",h.method="MH")
# not a good combination of constrain.method and h.method
sapply(fits, function(x) ratio(x)[2])
# explosion
seed=954
dat.train = sim.dat.1(n=200, seed=seed, add.outliers=TRUE)
fit.1 = sauc.phi(y~x1+x2, dat.train,constrain.method="L2",h.method="Lin")
ratio(fit.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.