sauc.phi: sauc.phi

Description Usage Arguments Details Author(s) Examples

View source: R/sauc.R

Description

sauc.phi optimizes Normal CDF approximation of AUC using Newton Raphson

Usage

1
2
3
sauc.phi (formula,dat,constrain.method="L2",h.method="Lin",start.method="rlogit",
opt.method = "Lin", upper = NULL, verbose = FALSE, ret.vcov = FALSE, truth = NULL, 
    beta.init=NULL)

Arguments

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.

Details

If an error happens during optimization (typically due to solve()), the errors are catched and NAs are returned.

Author(s)

Shuxin Yin
Ying Huang
Youyi Fong youyifong@gmail.com

Examples

 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)

aucm documentation built on Jan. 11, 2020, 9:43 a.m.

Related to sauc.phi in aucm...