Giter Club home page Giter Club logo

equaltestmi's Introduction

equaltestMI

Travis build status

This package includes a number of functions for users to examine measurement invariance via equivalence testing along with adjusted RMSEA cutoff values. In particular, a projection-based method is implemented to test the equality of latent factor means across groups without assuming the equality of intercepts.

Users can install the package from CRAN:

## load package
install.packages("equaltestMI")
library(equaltestMI)

or install the most recent version from the maintainer's GitHub repository:

# install.packages("devtools")
# library(devtools)
devtools::install_github("gabriellajg/equaltestMI", force=TRUE)
library(equaltestMI)

equaltestmi's People

Contributors

gabriellajg avatar

Watchers

 avatar

equaltestmi's Issues

findInterval() throws error in eqMI.main()

I'm using v0.1.0.

eqMI.main throws the following error with my data:

Error in findInterval(stat.feed$RMESA_t[i], RMESA_cutoffs[i, 1:4]) : 'vec' must be sorted non-decreasingly and not contain NAs

I've used na.omit() to ensure there are no NAs in the data but the error persists. A google tells me that others have comparable issues with their use of findInterval in other packages, but I don't fully understand it.

Minimal working example here: https://www.dropbox.com/sh/x374y24i4e0syw7/AAAW_VQVFwNcUcC0coRpo1iZa?dl=0

equaltestMI handling of missing data

Is it possible to use the eq.MI.main when there's missing data? As of right now I don't think there is because I kept getting the following error:

"Error in (function (..., lamb0 = NULL) :
Check missing data in raw data or NAs in the sample covariances"

hierarchical measurement invariance

hi, first of all thank you for the amazing package
second, is it possible to do hierarchical measurement invariance in equaltestMI?
the regular model works fine but when I'm trying to test the hierarchical one it pops
"Error in [.data.frame(dotdotdot$data, , c(useVar, dotdotdot$group)) : undefined columns selected"

the hierarchical model is goof in lavaan.

thank you
dror

How to use the WLSMV estimator for eqMI.main()?

My previous CFAs employ the WLSMV estimator, so my understanding is that it would be logical for equaltestMI to use it too. The documentation for the dots argument for eqMI.main specifies that "The same arguments as for any lavaan model. See lavaan::sem for more information." However, when I run the following code:

eqMI.main(
    model = my_model,
    data = my_data,
    order = c("1", "2", "3", "4", "5", "6"), 
    estimator = "WLSMV",  
    group = group, 
    meanstructure = TRUE,
    output = 'both',
    equivalence.test = FALSE,
    adjRMSEA = TRUE,
    bootstrap = FALSE,
    projection = FALSE,
    quiet = TRUE
)

It throws the following error:

Error in *tmp*[[j]] : subscript out of bounds

Last step in traceback is:

[<-.data.frame(*tmp*, ind[!is.na(ind)], c("cfi.delta", "rmsea.delta"), value = NA)

I've tried multiple datasets, so it doesn't seem specific to strange or extreme data.

Have I misunderstood anything here about either the strategy or implementation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.