lws_table-add: Combine 'lws_table' objects

Description Usage Arguments Details Value Author(s) Examples

Description

Combines lws_table objects

Usage

1
2
## S3 method for class 'lws_table'
... + check = TRUE

Arguments

...

lws_table object

check

logical, if TRUE checks that the each lws_table object is named a list with names c("weights","lags","starts")

Details

The lws_table objects have similar structure to table, i.e. it is a list with 3 elements which are the lists with the same number of elements. The base function c would cbind such tables. This function rbinds them.

Value

lws_table object

Author(s)

Virmantas Kvedaras, Vaidotas Zemlys

Examples

1
2
3
4
nlmn <- expand_weights_lags("nealmon",0,c(4,8),1,start=list(nealmon=rep(0,3)))
nbt <- expand_weights_lags("nbeta",0,c(4,8),1,start=list(nbeta=rep(0,4)))

nlmn+nbt

Example output

Loading required package: sandwich
Loading required package: optimx
Loading required package: quantreg
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

   weights lags        starts
1  nealmon  0:4    c(0, 0, 0)
2  nealmon  0:5    c(0, 0, 0)
3  nealmon  0:6    c(0, 0, 0)
4  nealmon  0:7    c(0, 0, 0)
5  nealmon  0:8    c(0, 0, 0)
6    nbeta  0:4 c(0, 0, 0, 0)
7    nbeta  0:5 c(0, 0, 0, 0)
8    nbeta  0:6 c(0, 0, 0, 0)
9    nbeta  0:7 c(0, 0, 0, 0)
10   nbeta  0:8 c(0, 0, 0, 0)

midasr documentation built on Feb. 23, 2021, 5:11 p.m.