Estimate a TSFmodel .

1 2 3 4 5 6 7 8 9 10 11 12 | ```
estTSF.R2M(y, p, diff.=TRUE,
rotation=if(p==1) "none" else "quartimin",
rotationArgs=NULL,
normalize=TRUE, eps=1e-5, maxit=1000, Tmat=diag(p),
BpermuteTarget=NULL,
factorNames=paste("factor", seq(p)))
estTSF.MCV(y, p, diff.=TRUE,
rotation=if(p==1) "none" else "oblimin",
rotationArgs=NULL,
normalize=TRUE, eps=1e-5, maxit=1000, Tmat=diag(p),
BpermuteTarget=NULL,
factorNames=paste("factor", seq(p)))
``` |

`y` |
a time series matrix. |

`p` |
integer indication number of factors to estimate. |

`diff.` |
logical indicating if model should be estimated with differenced data. |

`rotation` |
character vector indicating the factor rotation method (see GPArotation for options). |

`rotationArgs` |
list passed to GPFoblq, and then to the rotation method, specifying arguments for the rotation criteria. See GPFoblq. |

`normalize` |
Passed to GPFoblq. TRUE means do Kaiser normalization before rotation and then undo it after completing rotatation. FALSE means do no normalization. See GPFoblq for other possibilities. |

`eps` |
passed to GPFoblq |

`maxit` |
passed to GPFoblq |

`Tmat` |
passed to GPFoblq |

`BpermuteTarget` |
matrix of loadings. If supplied, this is used to permute the order of estimated factors and change signs in order to compare properly. |

`factorNames` |
vector of strings indicating names to be given to factor series. |

The function `estTSF.R2M`

estimates parameters using raw second moments.
THIS ALL NEEDS TO BE CHECKED.
The function `factanal`

with no rotation is used to find the initial
(orthogonal) solution. Rotation, if specified, is then done
with `GPFoblq`

.
`factanal`

always uses the correlation matrix, so standardizing does
not affect the solution.

If `diff.`

is `TRUE`

(the default) the indicator data is differenced
before it is passed to `factanal`

. This is necessary if the data is not
stationary. The resulting Bartlett predictor (rotated)
is applied to the undifferenced data. See Gilbert and Meijer (2005) for a
discussion of this approach.

If `rotation`

is `"none"`

the result of the `factanal`

estimation is not rotated. In this case, to avoid confusion with a rotated
solution, the factor covariance matrix `Phi`

is returned as `NULL`

.
Another possibility for its value would be the identity matrix, but this is
not calculated so `NULL`

avoids confusion.

The arguments `rotation`

, `methodArgs`

, `normalize`

,
`eps`

, `maxit`

, and `Tmat`

are passed to
`GPFoblq`

.

The estimated loadings, Bartlett predictor and predicted factor scores
are put in a `TSFmodel`

which is part of the returned object.
The Bartlett predictor can be calculated as

*
(B' Omega exp(-1) B) exp(-1) B' Omega exp(-1) x*

,

or equivalently as

*
(B' Sigma exp(-1) B) exp(-1) B' Sigma exp(-1) x*

,

The first is simpler because *Omega* is diagonal, but breaks down
with a Heywood case, because *Omega* is then singular (one or
more of its diagonal elements are zero). The second only requires
nonsingularity of *Sigma*. Typically, *Sigma* is not singular
even if *Omega* is singular.
*Sigma* is calculated from *B Phi B' + Omega*,
where *B, Phi,* and *Omega* are the
estimated values returned from factanal and rotated. The data covariance could
also be used for *Sigma*. (It returns the same result with this estimation
method.)

The returned `TSFestModel`

object is a list containing

- model
the estimated

`TSFmodel`

.- data
the indicator data used in the estimation.

- estimates
a list of

- estimation
a character string indicating the name of the estimation function.

- diff.
the setting of the argument

`diff.`

.- rotation
the setting of the argument

`rotation`

.- uniquenesses
the estimated

`uniquenesses`

.- BpermuteTarget
the setting of the argument

`BpermuteTarget`

.

A `TSFestModel`

object which is a list containing `TSFmodel`

,
the data, and some information about the estimation.

Paul Gilbert and Erik Meijer

Gilbert, Paul D. and Meijer, Erik (2005) Time Series Factor Analaysis with an Application to Measuring Money. Research Report 05F10, University of Groningen, SOM Research School. Available from http://som.eldoc.ub.rug.nl/reports/themeF/2005/05F10/.

Gilbert, Paul D. and Meijer, Erik (2006) Money and Credit Factors. Bank of Canada Working Paper 2006-3, available at http://www.bankofcanada.ca/2006/03/publications/research/working-paper-2006-3/.

Tom Wansbeek and Erik Meijer (2000) *Measurement Error and
Latent Variables in Econometrics*, Amsterdam: North-Holland.

`TSFmodel`

,
`estTSF.ML`

,
`GPFoblq`

,
`rotations`

,
`factanal`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ```
data("CanadianMoneyData.asof.28Jan2005", package="CDNmoney")
data("CanadianCreditData.asof.28Jan2005", package="CDNmoney")
cpi <- 100 * M1total / M1real
seriesNames(cpi) <- "CPI"
popm <- M1total / M1PerCapita
seriesNames(popm) <- "Population of Canada"
z <- tframed(tbind(
MB2001,
MB486 + MB452 + MB453 ,
NonbankCheq,
MB472 + MB473 + MB487p,
MB475,
NonbankNonCheq + MB454 + NonbankTerm + MB2046 + MB2047 + MB2048 +
MB2057 + MB2058 + MB482),
names=c("currency", "personal cheq.", "NonbankCheq",
"N-P demand & notice", "N-P term", "Investment" )
)
TotalMoney <- tframed(rowSums(z), tframe(z))
z <- tbind (z, ConsumerCredit, ResidentialMortgage,
ShortTermBusinessCredit, OtherBusinessCredit)
z <-tfwindow(z, start=c(1981,11), end=c(2004,11))
scale <- tfwindow(1e8 /(popm * cpi), tf=tframe(z))
MBandCredit <- sweep(z, 1, scale, "*")
c4withR2M <- estTSF.R2M(MBandCredit, 4)
tfplot(ytoypc(factors(c4withR2M)),
Title="Factors from 4 factor model (year-to-year growth rate)")
tfplot(c4withR2M, graphs.per.page=3)
summary(c4withR2M)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.