Description Usage Arguments Details Value Author(s) References See Also Examples
FAfitStats
calculates various statistics for a TSFestModel
or all possible (unrotated factanal) models for a data matrix. This
function is also used by the summary method for a TSFestModel
.
1 2 3 4 5 6 7 8 | FAfitStats(object, ...)
## Default S3 method:
FAfitStats(object, diff. = TRUE,
N=(nrow(object) - diff.),
control=list(lower = 0.0001, opt=list(maxit=1000)), ...)
## S3 method for class 'TSFmodel'
FAfitStats(object, diff. = TRUE,
N=(nrow(object$data) - diff.), ...)
|
object |
a time series matrix or TSFestModel. |
diff. |
logical indicating if data should be differenced. |
N |
sample size. |
control |
a list of arguments passed to |
... |
further arguments passed to other methods. |
In the case of the method for a TSFmodel
the model parameters are
extracted from the model and the
result is a vector of various fit statistics (see below).
(Calculations are done by the internal function FAmodelFitStats
.)
Most of these statistics are described in
Wansbeek and Meijer (2000, WM below).
The sample size N is used in the calculation of these statistics.
The default is the number of number of observations, as in WM. That is, the
number of rows in the data matrix, minus one if the data is differenced. Many
authors use N - 1, which would be N-2
if the data is differenced.
The exact calculations can be determined by examining the code:
print(tsfa:::FAmodelFitStats)
. The vector of statistics is:
Chi-square statistic (see, for example, WM p298).
degrees of freedom, which takes the rotational freedom into account (WM p169).
p-value
delta
Root mean square error of approximation (WM p309).
Relative noncentrality index (WM p307).
Comparative fit index (WM p307).
McDonald's centrality index.
Goodness of fit index ( Jöreskog and Sörbom, 1981, 1986, WM p305).
Adjusted GFI (Jöreskog and Sörbom, 1981, 1986).
Akaike's information criterion (WM p309).
Consistent AIC(WM p310).
Schwarz's Bayesian information criterion.
Cudeck & Browne's rescaled AIC.
Cudeck & Browne's cross-validation index.
The information criteria account for rotational freedom. Some of these goodness of fit statistics should be used with caution, because they are not yet based on sound statistical theory. Future versions of tsfa will probably provide improved versions of these goodness-of-fit statistics.
In the case of the default method, which expects a matrix of data with columns
for each indicator series, models are calculated with factanal
for
factors up to the Ledermann bound. No rotation is needed, since rotation does
not affect the fit statistics. Values for the saturated model are also
appended to facilitate a sequential comparison.
If factanal
does not obtain a satisfactory solution it may produce an
error "unable to optimize from these starting value(s)." This can sometimes be
fixed by increasing the opt, maxit
value in the control
list.
The result for the default method is a list with elements
a matrix with rows as for a single model above, and a column for each possible number of factors.
a matrix with rows chisq
, df
, and
pval
, and columns indicating the comparative fit for an additional
factor starting with the null (zero factor) model.
(See also independence model, WM, p305)
The largest model can correspond to the saturated model, but will not if the Ledermann bound is not an integer, or even in the case of an integer bound but implicit contraints resulting in a Heywood case (see Dijkstra, 1992). In these situations it might make sense to remove the model corresponding to the largest integer, and make the last sequential comparison between the second to largest integer and the saturated solution. The code does not do this automatically.
a vector or list of various fit statistics. See details.
Paul Gilbert and Erik Meijer
Dijkstra, T. K. (1992) On Statistical Inference with Parameter Estimates on the Boundary of the Parameter Space, British Journal of Mathematical and Statistical Psychology, 45, 289–309.
Hu, L.-t., and Bentler, P. (1995) Evaluating model fit. In R. H. Hoyle (Ed.), Structural equation modeling: Concepts, issues, and applications (pp. 76–99). Thousand Oaks, CA: Sage.
Jöreskog, K. G., and Sörbom, D. (1981) LISREL V user's guide. Chicago: National Educational Resources.
Jöreskog, K. G., and Sörbom, D. (1986) LISREL VI: Analysis of linear structural relationships by maximum likelihood, instrumental variables, and least squares methods (User's Guide, 4th ed.). Mooresville, IN: Scientific Software.
Ogasawara, Haruhiko. (2001). Approximations to the Distributions of Fit Indexes for Misspecified Structural Equation Models. Structural Equation Modeling, 8, 556–574.
Wansbeek, Tom and Meijer, Erik (2000) Measurement Error and Latent Variables in Econometrics, Amsterdam: North-Holland.
FAmodelFitStats
,
summary
,
summary.TSFmodel
,
summaryStats
,
LedermannBound
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 | if (require("CDNmoney")){
data("CanadianMoneyData.asof.28Jan2005", package="CDNmoney")
data("CanadianCreditData.asof.28Jan2005", package="CDNmoney")
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" )
)
z <- tfwindow(tbind (z, ConsumerCredit, ResidentialMortgage,
ShortTermBusinessCredit, OtherBusinessCredit),
start=c(1981,11), end=c(2004,11))
cpi <- 100 * M1total / M1real
popm <- M1total / M1PerCapita
scale <- tfwindow(1e8 /(popm * cpi), tf=tframe(z))
MBandCredit <- sweep(z, 1, scale, "*")
FAfitStats(MBandCredit)
c4withML <- estTSF.ML(MBandCredit, 4)
FAfitStats(c4withML)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.