Learn R Programming

gausscov (version 0.1.1)

frst: Robust stepwise selection of covariates

Description

Robust stepwise selection of covariates

Usage

frst(y,x,cn=1,cnr=c(1,2,4),p0=0.01,sg=0,nu=1,km=0,mx=21,kx=0,sub=F,inr=T,xinr=F,red=F)

Arguments

y

Dependent variable

x

Covariates

cn

The constnat 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

km

The maximum number of included covariates

mx

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

kx

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

Value

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

res The residuals

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

Examples

Run this code
# NOT RUN {
data(boston)
a<-frst(boston[,14],boston[,1:13])
# }

Run the code above in your browser using DataLab