Code Monkey home page Code Monkey logo

sem's Introduction

Structural Equation Modeling

This document attempts to introduce structural equation modeling from a broader context than what is typically presented in social, educational, and other sciences. The content currently covers the following ground:

  • Graphical models
  • Latent variable models
  • SEM
  • Growth curve models
  • Mixture models
  • Item response theory
  • Topic modeling
  • Bayesian non-parametric models
  • An overview of other miscellaneous models (e.g. recommender systems)

The first few chapters also serve as the basis of a workshop, and include a brief introduction to R that will be enough for one to follow along with the tools used (e.g. psych, lavaan, and mediation packages).

The actual document can be found at https://m-clark.github.io/sem.

sem's People

Contributors

m-clark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sem's Issues

Revisit visuals generally

Reconsider color schemes, update leftover sempaths to Diagrammer, remove pca arrows from initial section, others as needed.

update lv and other section

update due to FA workshop notes, specifically change the multiple factors example, some of the notation in pca, and wording elsewhere.

examine psych package usage due to update

Minor change to core fa function broke one example, though functionality is left to use the old method. Perhaps change that example from Harman.5 to a more realistic data set.

appendix parallel process: add brms and correlations

The parallel process depiction leaves out intercept/slope correlations that would probably be included in models. Also would be good to show the equivalence as multivariate random effect model via brms.

For example, update the main model as:

mainModel = "
i1 =~ 1*y11 + 1*y12 + 1*y13 + 1*y14
s1 =~ 0*y11 + 1*y12 + 2*y13 + 3*y14


i2 =~ 1*y21 + 1*y22 + 1*y23 + 1*y24
s2 =~ 0*y21 + 1*y22 + 2*y23 + 3*y24

s1 ~ i2
s2 ~ i1

i1 ~~ s1
i2 ~~ s2
"

And for brms

library(tidyverse)

library(brms)

head(d2)
d = left_join(d1, d2)

form = bf(y1 ~ time + (1 + time | p | Subject)) +
  bf(y2 ~ time + (1 + time | p | Subject))

mod = brm(form, data = d, cores=4)      

summary(mod)

For identity you will have to fix variances in lavaan or model sigma by time for brms.

FA_notes

In factor analysis section, transpose W in X = ZW and perhaps introduce component score part in pca section to make link clearer.

Modification indices

Borked footnote for limitSEM (was missing caret). Fixed in Rmd but not published.

fix toc

Given that the exact same yaml works in every other document, I don't see what there is to fix. But revisit this at some point.

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.