f1st: Stepwise selection of covariates

Description Usage Arguments Value Examples

View source: R/f1st.R

Description

Stepwise selection of covariates

Usage

1
f1st(y,x,p0=0.01,nu=1,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

nu

The order statistic of Gaussian covariates used for comparison

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

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

gausscov documentation built on Jan. 17, 2022, 9:06 a.m.

Related to f1st in gausscov...