autoReg {autoReg}R Documentation

Perform univariable and multivariable regression and stepwise backward regression automatically

Description

Perform univariable and multivariable regression and stepwise backward regression automatically

Usage

autoReg(x, ...)

## S3 method for class 'lm'
autoReg(x, ...)

## S3 method for class 'glm'
autoReg(x, ...)

## S3 method for class 'coxph'
autoReg(x, ...)

## S3 method for class 'survreg'
autoReg(x, ...)

Arguments

x

An object of class lm, glm or coxph

...

Further arguments

Value

autoReg returns an object of class "autoReg" which inherits from the class "data.frame" with at least the following attributes:

attr(*,"yvars)

character. name of dependent variable

attr(*,"model")

name of model. One of "lm","glm" or "coxph"

Methods (by class)

Examples

data(cancer,package="survival")
fit=glm(status~rx+sex+age+obstruct+nodes,data=colon,family="binomial")
autoReg(fit)
autoReg(fit,uni=FALSE,final=TRUE)
autoReg(fit,uni=FALSE,imputed=TRUE)
fit=lm(mpg~wt*hp+am+I(wt^2),data=mtcars)
autoReg(fit,final=TRUE)
autoReg(fit,imputed=TRUE)

[Package autoReg version 0.3.3 Index]