boosting: Estimate component-wise boosting for dynamic models.

Description Usage Arguments Details Value References See Also Examples

View source: R/boosting.R

Description

Estimates the Bai & Ng (2009) component-wise boosting for dynamic models.

Usage

1
2
boosting(x, y, v = 0.2, minIt = ncol(x)/2, maxIt = 10 * ncol(x),
  ic.break = TRUE)

Arguments

x

Matrix of independent variables. Each row is an observation and each column is a variable.

y

Response variable equivalent to the function.

v

Algorithm step size.

minIt

Minimum number of iterations in case ic.break=TRUE.

maxIt

Maximum number of iterations.

ic.break

If TRUE, algorithm breaks when the minimum information criteria is likely to be found. If FALSE the algorithm stops only when maxIt is reached (default=TRUE).

Details

This is an implementation of time-series component-wise boosting using the results from Bai and Ng (2009). The algorithm has its own way of determining when to stop. Keep ic.break=TRUE if you want to use the standard stop criterion based on information criterion.

Note that the information criterion automaticaly adjusts the degrees of freedom of the model considering that the boosting may select the same variable more than once.

Value

An object with S3 class boosting.

coefficients

Boosting coefficients for the model with the smallest information criteria.

fitted.values

In-sample fitted values.

residuals

Model residuals.

best.crit

The smalles information criterion found.

crit

The information criterion in each iteration.

df

Degrees of freedom.

coef.selection.count

How many times each variable was selected.

y

The supplied y.

call

The matched call.

References

Bai, Jushan, and Serena Ng. "Boosting diffusion indices." Journal of Applied Econometrics 24.4 (2009): 607-629.

Garcia, Medeiros and Vasconcelos (2017).

See Also

predict.boosting

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## == This example uses the Brazilian inflation data from
#Garcia, Medeiros and Vasconcelos (2017) == ##
data("BRinf")

## == Data preparation == ##
## == The model is yt = a + Xt-1'b + ut == ##
aux = embed(BRinf,2)
y=aux[,1]
x=aux[,-c(1:ncol(BRinf))]

## == Use factors == ##
factors=prcomp(x,scale. = TRUE)
xfact=factors$x[,1:10]

model=boosting(xfact,y)
coef(model)

plot(y,type="l")
lines(fitted(model),col=2)

gabrielrvsc/HDeconometrics documentation built on April 28, 2020, 7:12 a.m.