R/coefs.R
rescomp_coefs_matrix_custom.Rd
Produces an object that may be used in place of a matrix in the creation of arguments to spec_rescomp()
.
rescomp_coefs_matrix_custom(func, nrow, ncol)
S3 object of class rescomp_coefs_matrix
.
# Matrix with one time-varying coefficient
rescomp_coefs_matrix_custom(
function(params) {
matrix(c(0.2, 0.3, 0.4, params$fourth_coeff), nrow = 2, ncol = 2)
},
nrow = 2, ncol = 2
)
#> $func
#> function (params)
#> {
#> matrix(c(0.2, 0.3, 0.4, params$fourth_coeff), nrow = 2, ncol = 2)
#> }
#> <environment: 0x156f958c0>
#>
#> $dim
#> [1] 2 2
#>
#> attr(,"class")
#> [1] "rescomp_coefs_matrix_custom" "rescomp_coefs_custom"
#> [3] "rescomp_coefs_matrix" "rescomp_coefs"