Learn R Programming

tsfa (version 2021.1-3)

TSFmodel: Construct a Time Series Factor Model

Description

The default method constructs a TSFmodel. Other methods extract a TSFmodel from an object.

Usage

TSFmodel(obj, ...)
    # S3 method for default
TSFmodel(obj, f=NULL, Omega = NULL, Phi=NULL, LB = NULL, 
	 positive.data=FALSE, names=NULL, ...)
    # S3 method for TSFmodel
TSFmodel(obj, ...)
    # S3 method for FAmodel
TSFmodel(obj, f=NULL, positive.data=FALSE, names=NULL, ...)

Arguments

obj

The loadings matrix (\(B\)) in the default (constructor) method. In other methods, an object from which the model should be extracted.

f

matrix of factor series.

Omega

Covariance of the idiosyncratic term.

Phi

Covariance of the factors.

LB

Factor score coefficient matrix.

positive.data

logical indicating if any resulting negative values should be set to zero.

names

vector of strings indicating names to be given to output series.

...

arguments passed to other methods or stored in the object.

Value

A TSFmodel.

Details

The default method is the constructor for TSFmodel objects. Other methods extract a TSFmodel object from other objects that contain one. The loadings and the factors must be supplied to the default method. Omega, Phi, and LB are included when the object comes from an estimation method, but are not necessary when the object is being specified in order to simulate. The model is defined by

$$y_t = B f_t + \varepsilon_t,$$

where the factors \(f_t\) have covariance \(\Phi\) and \(\varepsilon_t\) have covariance \(\Omega\). The loadings matrix \(B\) is \(M \times k\), where \(M\) is the number of indicator variables (the number of series in \(y\)) and \(k\) is the number of factor series.

The estimation method estTSF.ML returns a TSFmodel as part of a TSFestModel that has additional information about the estimation.

See Also

simulate.TSFmodel, simulate, estTSF.ML

Examples

Run this code
# NOT RUN {
  f <- matrix(c(2+sin(pi/100:1),5+3*sin(2*pi/5*(100:1))),100,2)
  B <- t(matrix(c(0.9, 0.1,
		  0.8, 0.2,
		  0.7, 0.3,
                  0.5, 0.5, 
		  0.3, 0.7,
 		  0.1, 0.9), 2,6))

  z <- TSFmodel(B, f=f)
  tfplot(z)
# }

Run the code above in your browser using DataLab