summary.tsfm: Summarizing a fitted time series factor model

View source: R/summary.tsfm.r

summary.tsfmR Documentation

Summarizing a fitted time series factor model

Description

summary method for object of class tsfm. Returned object is of class summary.tsfm.

Usage

## S3 method for class 'tsfm'
summary(object, se.type = c("Default", "HC", "HAC"), ...)

## S3 method for class 'summary.tsfm'
print(x, digits = 3, labels = TRUE, ...)

Arguments

object

an object of class tsfm returned by fitTsfm.

se.type

one of "Default", "HC" or "HAC" option for computing HC/HAC standard errors and t-statistics. Default is "Default". If "HC" or "HAC" options are selected, you will need to first load the suggested 'lmtest' package.

...

futher arguments passed to or from other methods.

x

an object of class summary.tsfm.

digits

number of significants digits to use when printing. Default is 3.

labels

option to print labels and legend in the summary. Default is TRUE. When FALSE, only the coefficient matrx with standard errors is printed.

Details

The default summary method for a fitted lm object computes the standard errors and t-statistics under the assumption of homoskedasticty. Argument se.type gives the option to compute heteroskedasticity-consistent (HC) or heteroskedasticity-autocorrelation-consistent (HAC) standard errors and t-statistics using coeftest. This option is meaningful only if fit.method = "LS" or "DLS".

Standard errors are currently not available for variable.selection="lars" as there seems to be no consensus on a statistically valid method of calculating standard errors for the lasso predictions.

Value

Returns an object of class summary.tsfm. The print method for class summary.tsfm outputs the call, coefficients (with standard errors and t-statistics), r-squared and residual volatilty (under the homoskedasticity assumption) for all assets.

Object of class summary.tsfm is a list of length N + 2 containing:

call

the function call to fitTsfm

se.type

standard error type as input

sum.list

list of summaries of the N fit objects (of class lm, lmRob or lars) for each asset in the factor model.

Author(s)

Sangeetha Srinivasan & Yi-An Chen.

See Also

fitTsfm, summary.lm

Examples

 # load data
data(managers, package = 'PerformanceAnalytics')

fit <- fitTsfm(asset.names=colnames(managers[,(1:6)]),
               factor.names=colnames(managers[,7:9]),
               data=managers)

# summary of factor model fit for all assets
summary(fit)

# Summary of factor model, using lmtest
library(lmtest)
summary(fit, "HAC")

# summary of lm fit for a single asset
summary(fit$asset.fit[[1]])


braverock/factorAnalytics documentation built on Dec. 16, 2024, 1:05 p.m.