Giter Site home page Giter Site logo

gclm's Introduction

GCLM

The goal of GCLM is to help you write lavaan() script for fitting generalized cross-lagged panel models (GCLM; Zyphur et al., 2019). Currently, there is only one function for fitting the base GCLM, but new functions and arguments may be added to automate the scripting of short-run Granger-Sims tests, and long-run impulse responses.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("jsakaluk/GCLM")

Example

This is a basic example which shows you how to solve a common problem:

library(GCLM)
library(lavaan)
#> This is lavaan 0.6-3
#> lavaan is BETA software! Please report any bugs.
#Save/export script for GCLM between Sacrifice and Satisfaction over 5 waves
base.model <- gclm(xvar = "sacrifice", yvar = "satisfaction", waves = 5)

The function saves a lavaan() script for you to immediately submit to its model-fitting functions (e.g., lavaan::sem()), and also outputs a .txt document of the same script to the working directory.

base.model.fit <- sem(base.model, data = dat)
summary(base.model.fit)

Eventually, new functionality may be programmed to automate the tests of short-run and long-run effects. Until then, users can manually ammend this script and save as a new lavaan() script to conduct these additional tests.

gclm's People

Contributors

jsakaluk avatar

Stargazers

Reimar Zeh avatar

Forkers

wskp90

gclm's Issues

Restricted Contemporaneous Covariances

Hi, John! I'm looking at the snapshot of expanded lavaan code shown on the package's main page. In the "restrictions" section, it appears that some of the contemporaneous covariances among the impulses are fixed to zero. This seems like it would overwrite the freely estimated covariances listed earlier in the "co-movements" section. Perhaps this is a typo?

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.