gausscov (version 0.0.4)

f1st: Stepwise selection of covariates

Description

Stepwise selection of covariates

Usage

f1st(y,x,p0=0.01,nu=1,km=0,mx=20,kx=0,sub=F,inr=T,xinr=F)

Arguments

y

Dependent variable

x

Covariates

p0

The P-value cut-off

nu

The order statistic of Gaussian covariates used for comparison

km

The maximum number of included covariates

mx

The maximum number covariates for an all subset search

kx

The excluded covariates

sub

Logical if TRUE best subset selected.to include intercept

inr

Logical if TRUE include intercept if not present

xinr

Logical if TRUE intercept already presentt

Value

pv The selected covariates in order together with P-values, sum of squared residuals and if appropriate number of misclassifications.

res The residuals

stpv The stepwise P-values and the sum of squared residuals

Examples

Run this code
# NOT RUN {
data(boston)
bostint<-fgeninter(boston[,1:13],2)[[1]]
a<-f1st(boston[,14],bostint,km=10,sub=TRUE,inr=FALSE,xinr=TRUE)
# }

Run the code above in your browser using DataLab