View source: R/gets-base-source.R
blocksFun | R Documentation |
Auxiliary function (i.e. not intended for the average user) that enables block-based GETS-modelling with user-specified estimator, diagnostics and goodness-of-fit criterion.
blocksFun(y, x, untransformed.residuals=NULL, blocks=NULL,
no.of.blocks=NULL, max.block.size=30, ratio.threshold=0.8,
gets.of.union=TRUE, force.invertibility=FALSE,
user.estimator=list(name="ols"), t.pval=0.001, wald.pval=t.pval,
do.pet=FALSE, ar.LjungB=NULL, arch.LjungB=NULL, normality.JarqueB=NULL,
user.diagnostics=NULL, gof.function=list(name="infocrit"),
gof.method=c("min", "max"), keep=NULL, include.gum=FALSE,
include.1cut=FALSE, include.empty=FALSE, max.paths=NULL,
turbo=FALSE, parallel.options=NULL, tol=1e-07, LAPACK=FALSE,
max.regs=NULL, print.searchinfo=TRUE, alarm=FALSE)
y |
a numeric vector (with no missing values, i.e. no non-numeric 'holes') |
x |
a |
untransformed.residuals |
|
blocks |
|
no.of.blocks |
|
max.block.size |
|
ratio.threshold |
|
gets.of.union |
|
force.invertibility |
|
user.estimator |
|
t.pval |
|
wald.pval |
|
do.pet |
|
ar.LjungB |
a two element |
arch.LjungB |
a two element |
normality.JarqueB |
|
user.diagnostics |
|
gof.function |
|
gof.method |
|
keep |
|
include.gum |
|
include.1cut |
|
include.empty |
|
max.paths |
|
turbo |
|
parallel.options |
|
tol |
|
LAPACK |
currently not used |
max.regs |
|
print.searchinfo |
|
alarm |
|
blocksFun
undertakes block-based GETS modelling by a repeated but structured call to getsFun
. For the details of how to user-specify an estimator via user.estimator
, diagnostics via
user.diagnostics
and a goodness-of-fit function via gof.function
, see documentation of getsFun
under "Details".
The algorithm of blocksFun
is similar to that of isat
, but more flexible. The main use of blocksFun
is the creation of user-specified methods that employs block-based GETS modelling, e.g. indicator saturation techniques.
A list
with the results of the block-based GETS-modelling.
Genaro Sucarrat, with contributions from Jonas kurle, Felix Pretis and James Reade
F. Pretis, J. Reade and G. Sucarrat (2018): 'Automated General-to-Specific (GETS) Regression Modeling and Indicator Saturation for Outliers and Structural Breaks'. Journal of Statistical Software 86, Number 3, pp. 1-44
G. sucarrat (2020): 'User-Specified General-to-Specific and Indicator Saturation Methods'. The R Journal 12 issue 2, pp. 388-401, https://journal.r-project.org/archive/2021/RJ-2021-024/
getsFun
, ols
, diagnostics
, infocrit
and isat
## more variables than observations:
y <- rnorm(20)
x <- matrix(rnorm(length(y)*40), length(y), 40)
blocksFun(y, x)
## 'x' as list of matrices:
z <- matrix(rnorm(length(y)*40), length(y), 40)
blocksFun(y, list(x,z))
## ensure regressor no. 3 in matrix no. 2 is not removed:
blocksFun(y, list(x,z), keep=list(integer(0), 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.