getSigVars {autoReg}R Documentation

Get explanatory variables of a model with significance level below the threshold

Description

Get explanatory variables of a model with significance level below the threshold

Usage

getSigVars(fit, threshold = 0.2, final = TRUE)

Arguments

fit

An object of class lm or glm

threshold

Numeric

final

logical if true, perform stepwise regression using step()

Value

A list containing the following components:

sigVars

names of explanatory variables which have significant levels below the threshold in univariable model

finalVars

names of explanatory variables included in final model as a result of step

Examples

library(survival)
data(cancer,package="survival")
fit=glm(status~rx+sex+age+obstruct+nodes,data=colon,family="binomial")
getSigVars(fit)
fit=lm(mpg~hp*wt+am,data=mtcars)
getSigVars(fit)

[Package autoReg version 0.3.3 Index]