Generate.S: Generate the S matrix

Description Usage Arguments Value Examples

View source: R/Generate.S.R

Description

Generation of the S matrix.

Usage

1
Generate.S(Fix.X, Potential.X, avertype = "all")

Arguments

Fix.X

Number of fixed Xs, i.e. variables which should always be included.

Potential.X

Number of potential variables, i.e. variables which may or may not be included.

avertype

Type of averaging to be done. Can be either singleton (models with only one regressor at a time), nested (all nested models) or all (all combinations of submodels).

Value

Returns a selection matrix.

Examples

1
2
3
4
5
## all nested models with 5 variables, first variable always included
smatrix <- Generate.S(Fix.X = 1, Potential.X = 5, avertype = "nested")

## use this together with EstAllModels to estimate all the submodels efficiently
## Not run: allMods <- EstAllModels(X = Xdata, Xnew = Xnewdata, y = ydata, s = smatrix)

sebastianankargren/FMA documentation built on May 29, 2019, 4:57 p.m.