This function returns summary statistics of a model after it has been run
A MxModel object.
Any number of named arguments (see below).
Whether to include extra diagnostic information.
mxSummary allows the user to set or override the following parameters of the model:
Numeric. Specify the total number of observations for the model.
Numeric. Specify the total number of observed statistics for the model.
List of MxModel objects. Specify a saturated and independence likelihoods in single argument for testing.
Numeric or MxModel object. Specify a saturated likelihood for testing.
Numeric. Specify the degrees of freedom of the saturated likelihood for testing.
Numeric or MxModel object. Specify an independence likelihood for testing.
Numeric. Specify the degrees of freedom of the independence likelihood for testing.
Logical. Set to FALSE to ignore independent submodels in summary.
logical. Changes the printing style for summary (see Details)
verbose argument changes the printing style for the
summary of a model. When
verbose=FALSE, a relatively minimal amount of information is printed: the free parameters, the likelihood, and a few fit indices. When more information is available, more is printed. For example, when the model has a saturated likelihood, several additional fit indices are printed. On the other hand, when
verbose=TRUE, the compute plan, the data summary, and additional timing information are always printed. Moreover, available fit indices are printed regarless of whether or not they are defined. The undefined fit indices are printed as
NA. Running a saturated model and including it with the call to
summary will define these fit indices and they will dislay meaningful values. It should be noted that the
verbose argument only changes the printing style, all of the same information is calculated and exists in the output of
summary. More information is displayed when
verbose=TRUE, and less when
Information Criteria (AIC, BIC) are reported in a table. The table shows different versions of the information criteria. Each entry in the table is an AIC or BIC obtained using different penalties. In particular, the entries of the table do not show the values of different penalties, but rather different versions of AIC and BIC. For example the AIC is reported with both a Parameters Penalty and a Degrees of Freedom Penalty. AIC generally takes the form Fit + 2*k. With the Parameters Penalty k is the number of free parameters: AIC.param = Fit + 2*param. With the Degrees of Freedom Penalty, k is minus one times the model degrees of freedom. So, essentially the penalty is subtracted instead of added: AIC.param = Fit - 2*df. The Degrees of Freedom penalty was used in Classic Mx. BIC is defined similarly: Fit + k*log(N) where k is either the number of free parameters or minus one times the model degrees of freedom. The Sample-Size Adjusted BIC is only defined for the parameters penalty: Fit + k*log((N+2)/24). For raw data models, Fit is the minus 2 log likelihood, -2LL. For covariance data, Fit is the Chi-squared statistic. The -2LL and saturated likelihood values reported under covariance data are not necessarily meaningful on their own, but their difference yields the Chi-squared value.
IndependenceDoF arguments can be used to obtain further fit statistics (RMSEA, CFI, TLI, Chi-Squared). For covariance data, saturated and independence models are fitted automatically so all fit indices are reported. For raw data, these reference models are not estimated to save computational time. An easy way to make reference models for most cases is provided by the mxRefModels function. When the
IndependenceLikelihood arguments are used, the appropriate degrees of freedom are attempted to be calculated by OpenMx. However, depending on the model, it may sometimes behoove the user to also explicity provide the corresponding
IndependenceDoF. Again, for the vast majority of cases, the mxRefModels function handles these situations effectively and conveniently.
The summary function can report Error codes as follows:
1: The final iterate satisfies the optimality conditions to the accuracy requested, but the sequence of iterates has not yet converged. NPSOL was terminated because no further improvement could be made in the merit function (Mx status GREEN)
2: The linear constraints and bounds could not be satisfied. The problem has no feasible solution.
3: The nonlinear constraints and bounds could not be satisfied. The problem may have no feasible solution.
4: The major iteration limit was reached (Mx status BLUE).
5: The Hessian at the solution does not appear to be convex (Mx status RED).
6: The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED)
7: The function derivates returned by funcon or funobj appear to be incorrect.
9: An input parameter was invalid
When the information matrix is available, standard errors are reported. If the information matrix was estimated using finite differences then an additional diagnostic column 'A' is displayed. An exclamation point in the 'A' column indicates that the gradient appears to be asymmetric and the standard error may not accurately reflect the variability of that parameter. As a precaution, it is recommended that you compare the SEs with likelihood-based confidence intervals.
For many raw data models, OpenMx does not automatically report the absolute fit indices (Chi-Squared, CFI, TLI, and RMSEA). They are available once you fit reference models. See the example given in mxRefModels.
OpenMx does not recommend using some fit indices. These are GFI, AGFI, NFI, and SRMR. The Goodness of Fit Index (GFI) and Adjusted Goodness of Fit Index (AGFI) are not recommended because they are strongly influeced by sample size and have rather high Type I error rates (Sharma, Mukherjee, Kumar, & Dillon, 2005). The Normed Fit Index (NFI) has no penalty for model complexity. That is, adding more parameters to a model always improves the NFI, regardless of how useful those parameters are. Because the Non-Normed Fit Index (NNFI), also known as the Tucker-Lewis Index (TLI), does adjust for model complexity it is used instead. Lastly, the Standardized Root Mean Square Residual (SRMR) is not reported because it (1) only applies to covariance models, having no direct extension to missing data, (2) has no penalty for model complexity, similar to the NFI, and (3) is positively biased (Hu & Bentler, 1999).
The OpenMx User's guide can be found at http://openmx.psyc.virginia.edu/documentation.
Hu, L., & Bentler, P. M. (1999). Cutoff criteria for fit indexes in covariance structure analysis: Conventional criteria versus new alternatives. Structural Equation Modeling, 6, 1-55.
Sharma, S., Mukherjee, S., Kumar, A., & Dillon, W.R. (2005). A simulation study to investigate the use of cutoff values for assessing model fit in covariance structure models. Journal of Business Research, 58, 935-43.
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
library(OpenMx) data(demoOneFactor) # load the demoOneFactor dataframe manifests <- names(demoOneFactor) # set the manifest to the 5 demo variables latents <- c("G") # define 1 latent variable model <- mxModel(model="One Factor", type="RAM", manifestVars = manifests, latentVars = latents, mxPath(from = latents, to=manifests, labels = paste("b", 1:5, sep = "")), mxPath(from = manifests, arrows = 2, labels = paste("u", 1:5, sep = "")), mxPath(from = latents, arrows = 2, free = FALSE, values = 1.0), mxData(cov(demoOneFactor), type = "cov", numObs = 500) ) model <- mxRun(model) # Run the model, returning the result into model # Show summary of the fitted model summary(model) # Compute the summary and store in the variable "statistics" statistics <- summary(model) # Access components of the summary statistics$parameters statistics$SaturatedLikelihood # Specify a saturated likelihood for testing summary(model, SaturatedLikelihood = -3000) # Add a CI and view it in the summary model = mxRun(mxModel(model=model, mxCI("b5")), intervals = TRUE) summary(model)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.