Description Usage Arguments Value Author(s) Examples
Plot a histogram of the amount of population misfit in parameter result object or the scatter plot of the relationship between misspecified parameter and the population misfit or the fit indices
1 | plotMisfit(object, usedFit="default", misParam=NULL)
|
object |
The result object, |
usedFit |
The sample fit indices or population misfit used to plot. All sample fit indices are available. The available population misfit are |
misParam |
The index or the name of misspecified parameters used to plot. |
None. This function will plot only.
Sunthud Pornprasertmanit (psunthud@gmail.com)
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 | path.BE <- matrix(0, 4, 4)
path.BE[3, 1:2] <- NA
path.BE[4, 3] <- NA
starting.BE <- matrix("", 4, 4)
starting.BE[3, 1:2] <- "runif(1, 0.3, 0.5)"
starting.BE[4, 3] <- "runif(1, 0.5, 0.7)"
mis.path.BE <- matrix(0, 4, 4)
mis.path.BE[4, 1:2] <- "runif(1, -0.1, 0.1)"
BE <- bind(path.BE, starting.BE, misspec=mis.path.BE)
residual.error <- diag(4)
residual.error[1,2] <- residual.error[2,1] <- NA
RPS <- binds(residual.error, "rnorm(1, 0.3, 0.1)")
ME <- bind(rep(NA, 4), 0)
Path.Model <- model(RPS = RPS, BE = BE, ME = ME, modelType="Path")
# The number of replications in actual analysis should be much more than 20
Output <- sim(20, n=500, Path.Model)
# Plot the distribution of population misfit
plotMisfit(Output)
# Plot the relationship between population RMSEA and all misspecified direct effects
plotMisfit(Output, misParam=1:2)
# Plot the relationship between sample CFI and all misspecified direct effects
plotMisfit(Output, usedFit="CFI", misParam=1:2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.