README.md

dynamic

The goal of dynamic is to simulate fit index cutoffs for latent variable models that are tailored to the user’s model statement, model type, and sample size.

This is the counterpart of the Shiny Application, dynamicfit.app. The Shiny app and the R package will give you the same results. If you are comfortable with R, consider using the package during high traffic times to reduce server burden.

Installation

This is the beta version of the package. Please submit bug reports and issues on GitHub. You can install the released version of dynamic from CRAN with:

install.packages("dynamic")

Currently, the functions for categorical data (catOne and catHB), non-normal continuous data (nnorOne and nnorHB), and Likert data treated as continuous (likertOne and likertHB) are only available from the GitHub package and are not yet available on CRAN or the Shiny application.

To install the version of the package that supports these functions, use:

library(devtools)
devtools::install_github("melissagwolf/dynamic")

Example

library(dynamic)

#Lavaan object example (manual=FALSE)
dat <- lavaan::HolzingerSwineford1939
lavmod <- "F1 =~ x1 + x2 + x3
          F2 =~ x4 + x5 + x6
          F3 =~ x7 + x8 + x9"
fit <- lavaan::cfa(lavmod,dat)
cfaHB(fit)

#Manual entry example (manual=TRUE)
manmod <- "F1 =~ .602*Y1 + .805*Y2 + .857*Y3 + .631*Y4 + .345*Y5 + .646*Y6"
cfaOne(manmod,500,manual=TRUE)

Vignette

A vignette for the multivariate normal functions cfaOne and cfaHB can be found here.

A vignette for the categorical data functions catOne and catHB can be found here.

A vignette for non-normal continuous data and/or missing data functions nnorOne and nnorHB can be found here

A vignette for functionslikertOne and likertHB for treating Likert responses as continuous can be found here



melissagwolf/dynamic documentation built on June 29, 2024, 6:24 p.m.