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 |
y |
Dependent variable, can be a |
stage |
Algorithm indicator. 1 denotes the one-stage algorithm and
2 denotes the two-stage algorithm. Default is 2. When |
family |
A description of the error distribution and link function to be
used in the model. It can take the value of |
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
-
print.sgpv()
prints the variable selection results -
coef.sgpv()
extracts coefficient estimates -
summary.sgpv()
summarizes the OLS outputs -
predict.sgpv()
predicts the outcome -
plot.sgpv()
plots variable selection results
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