Learn R Programming

gausscov (version 0.1.8)

fr1st: Robust stepwise selection of covariates

Description

Robust stepwise selection of covariates

Usage

fr1st(y,x,cn=1,cnr=c(1,3,5),p0=0.01,sg=0,nu=1,kmx=0,mx=21,kex=0,sub=T,inr=T,xinr=F,red=F)

Value

pv In order the subset ind, the regression coefficients, the Gaussian P-values, the standard P-values.

res The residuals

stpv The stepwise regression results: covariate, P-value and scale

Arguments

y

Dependent variable

x

Covariates

cn

The constant for Huber's psi-function

cnr

The constants for Hampel's three part redescending psi function

p0

The P-value cut-off

sg

Scale value of residuals

nu

The order for calculating the P-value

kmx

The maximum number of included covariates

mx

The maximum number of included covariates if the option subset =TRUE is used

kex

The excluded covariates

sub

Logical, if TRUE best subset selected

inr

Logical TRUE to include intercept

xinr

Logical TRUE if intercept already included

red

Logical If true Hampel's three part redescending psi function

Examples

Run this code
data(boston)
 a<-fr1st(boston[,14],boston[,1:13],kex=7:8)

Run the code above in your browser using DataLab