Learn R Programming

gausscov (version 0.1.1)

f1st: Stepwise selection of covariates

Description

Stepwise selection of covariates

Usage

f1st(y,x,p0=0.01,nu=1,km=0,mx=21,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 present

Value

pv The in order selected covariates, the regression coefficients, the P-values, the standard P-values.

res The residuals

stpv The in order stepwise P-values, sum of squared residuals and the percentage sum of squared residuals explained

Examples

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

Run the code above in your browser using DataLab