glpls1a.logit.all: Fit MIRWPLS and MIRWPLSF model separately for logits

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/glpls1a.logit.all.R

Description

Apply Iteratively ReWeighted Least Squares (MIRWPLS) with an option of Firth's bias reduction procedure (MIRWPLSF) for multi-group (say C+1 classes) classification by fitting logit models for all C classes vs baseline class separately.

Usage

1
glpls1a.logit.all(X, y, K.prov = NULL, eps = 0.001, lmax = 100, b.ini = NULL, denom.eps = 1e-20, family = "binomial", link = "logit", br = T)

Arguments

X

n by p design matrix (with no intercept term)

y

response vector with class lables 1 to C+1 for C+1 group classification, baseline class should be 1

K.prov

number of PLS components

eps

tolerance for convergence

lmax

maximum number of iteration allowed

b.ini

initial value of regression coefficients

denom.eps

small quanitity to guarantee nonzero denominator in deciding convergence

family

glm family, binomial (i.e. multinomial here) is the only relevant one here

link

link function, logit is the only one practically implemented now

br

TRUE if Firth's bias reduction procedure is used

Value

coefficients

regression coefficient matrix

Author(s)

Beiying Ding, Robert Gentleman

References

See Also

glpls1a.mlogit,glpls1a,glpls1a.mlogit.cv.error, glpls1a.train.test.error, glpls1a.cv.error

Examples

1
2
3
4
5
6
 x <- matrix(rnorm(20),ncol=2)
 y <- sample(1:3,10,TRUE)
 ## no bias reduction
 glpls1a.logit.all(x,y,br=FALSE)
 ## bias reduction
 glpls1a.logit.all(x,y,br=TRUE)

Example output

$coefficients
          [,1]      [,2]
[1,] -1.540271 -15.33824
[2,] 12.986848  36.83434
[3,] 34.194429  10.00955

$coefficients
           [,1]      [,2]
[1,] -0.1548631 -1.372105
[2,]  0.7728681  3.527145
[3,]  2.7264810  1.122339

gpls documentation built on Nov. 8, 2020, 6:50 p.m.