residuals.sparseDFM {sparseDFM}R Documentation

sparseDFM Residuals and Fitted Values

Description

Obtain the residuals or fitted values of the sparseDFM fit.

Usage

## S3 method for class 'sparseDFM'
fitted(object, standardize = FALSE, alpha_index = "best", ...)

## S3 method for class 'sparseDFM'
residuals(object, standardize = FALSE, alpha_index = "best", ...)

Arguments

object

an object of class 'sparseDFM'.

standardize

logical. The residuals and fitted values should be standardized. Default is FALSE, values returned in the original data \bm{X} scale.

alpha_index

Choose which L1 penalty parameter to display the results for. Default is 'best'. Otherwise, input a number between 1:length(alpha_grid) that indicates the required alpha parameter.

...

Further residuals arguments.

Value

Residuals or fitted values of sparseDFM.


[Package sparseDFM version 1.0 Index]