f1st: Stepwise selection of covariates

View source: R/f1st.R

f1stR Documentation

Stepwise selection of covariates

Description

Stepwise selection of covariates

Usage

f1st(y,x,p0=0.01,kmn=0,kmx=0,mx=21,kex=0,sub=T,inr=T,xinr=F,qq=0)

Arguments

y

Dependent variable

x

Covariates

p0

The P-value cut-off

kmn

The minimum number of included covariates irrespective of cut-off P-value

kmx

The maximum number of included covariates irrespective of cut-off P-value.

mx

The maximum number covariates for an all subset search

kex

The excluded covariates

sub

Logical if TRUE best subset selected

inr

Logical if TRUE include intercept if not present

xinr

Logical if TRUE intercept already present

qq

The number of covariates to choose from. If qq=0 the number of covariates of x is used.

Value

pv In order the included covariates, the regression coefficient values, the Gaussian P-values, the standard P-values and the proportional reduction in the sum of squared residuals due to this covariate

res The residuals

stpv The in order stepwise P-values, sum of squared residuals and the proportional reduction in the sum of squared residuals due to this covariate.

Examples

data(boston)
bostint<-fgeninter(boston[,1:13],2)[[1]]
a<-f1st(boston[,14],bostint,kmn=10,sub=TRUE)

gausscov documentation built on Oct. 12, 2023, 1:06 a.m.

Related to f1st in gausscov...