pro.sgpv {ProSGPV}R Documentation

pro.sgpv function

Description

This function outputs the variable selection results from either one-stage algorithm or two-stage algorithm.

Usage

pro.sgpv(
  x,
  y,
  stage = c(1, 2),
  family = c("gaussian", "binomial", "poisson", "cox"),
  gvif = F
)

Arguments

x

Independent variables, can be a matrix or a data.frame

y

Dependent variable, can be a vector or a column from a data.frame

stage

Algorithm indicator. 1 denotes the one-stage algorithm and 2 denotes the two-stage algorithm. Default is 2. When n is less than p, only the two-stage algorithm is available.

family

A description of the error distribution and link function to be used in the model. It can take the value of ⁠\code{gaussian}⁠, ⁠\code{binomial}⁠, ⁠\code{poisson}⁠, and ⁠\code{cox}⁠. Default is ⁠\code{gaussian}⁠

gvif

A logical operator indicating whether a generalized variance inflation factor-adjusted null bound is used. Default is FALSE. See Fox (1992) doi: 10.1080/01621459.1992.10475190 for more details on how to calculate GVIF

Value

A list of following components:

var.index

A vector of indices of selected variables

var.label

A vector of labels of selected variables

lambda

lambda selected by generalized information criterion in the two-stage algorithm. NULL for the one-stage algorithm

x

Input data x

y

Input data y

family

family from the input

stage

stage from the input

null.bound

Null bound in the SGPV screening

pe.can

Point estimates in the candidate set

lb.can

Lower bounds of CI in the candidate set

ub.can

Upper bounds of CI in the candidate set

See Also

Examples


# prepare the data
x <- t.housing[, -ncol(t.housing)]
y <- t.housing$V9

# run ProSGPV in linear regression
out.sgpv <- pro.sgpv(x = x, y = y)

# More examples at https://github.com/zuoyi93/ProSGPV/tree/master/vignettes

[Package ProSGPV version 1.0.0 Index]