f1st {gausscov} | R Documentation |
Stepwise selection of covariates
Description
Stepwise selection of covariates
Usage
f1st(y,x,p0=0.01,kmn=0,kmx=0,kex=0,mx=21,sub=T,inr=T,xinr=F,qq=-1)
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. |
kex |
The excluded covariates |
mx |
The maximum number covariates for an all subset search |
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=-1 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.
res The residuals
stpv The covariates in order of selection, Gaussian P-values and sum of squared residuals.
Examples
data(boston)
bostint<-fgeninter(boston[,1:13],2)[[1]]
a<-f1st(boston[,14],bostint,kmn=10,sub=TRUE)
[Package gausscov version 1.1.3 Index]