en_mp_rows: Computing Elastic Net Estimator when multiple units are...

Description Usage Arguments Value See Also Examples

View source: R/EN.R

Description

Computing Elastic Net Estimator when multiple units are missing. The underlying algorithm is glmnet package in R. It is worth noting that this package was written by Friedman et. al.

Usage

1
en_mp_rows(M, mask, num_folds = 5, num_lam = 100L, num_alpha = 40L)

Arguments

M

Matrix of observed entries. The input should be N (number of units) by T (number of time periods).

mask

Binary mask with the same shape as M containing observed entries.

num_folds

Optional parameter on the number of folds for cross-validation. Default is 5.

num_lam

Optional parameter on the number of lambda values (weight penalties). Default is 100.

num_alpha

Optional parameter on the number of alpha values (shape parameter). Default is 40.

Value

The matrix with all missing entries filled.

See Also

cv.glmnet, written by Jerome Friedman, Trevor Hastie, Noah Simon, Junyang Qian, and Rob Tibshirani

Examples

1
en_mp_rows(matrix(c(1,2,3,4),2,2), matrix(c(1,1,1,0),2,2))

susanathey/MCPanel documentation built on May 29, 2019, 9:51 a.m.