Questions tagged [semplot]

semPlot: Path Diagrams and Visual Analysis of Various SEM Packages' Output

Resources:

  1. cran.r-project.org
  2. github
  3. examples
43 questions
3
votes
2 answers

Path diagram in r

I am trying to plot a path diagram of a Structural Equation Model(SEM) in R. I was able to plot it using semPlot::semPaths(). The output is similar to The SEM was modeled using lavaan package. I want a plot similar to . with estimates and p values.…
Stat009
  • 45
  • 1
  • 5
3
votes
0 answers

Avoiding node overlaps in semPaths with the "repulsion" argument in the Fruchterman Reingold algorithm

I fitted a structure equation model with sem and I am now trying to visualize the model with semPaths: semPaths(fit1b_rh, "path", "stand",layout="tree", edge.color = "black", residuals = FALSE, layoutSplit = TRUE, subRes = 360, asize = 1 , sizeMan…
Julia S.
  • 31
  • 1
3
votes
1 answer

Supply lavaan.mi object (runMI(), semTools) to semPaths (semPlot) in r

I am trying to supply a lavaan.mi object (a SEM modelling multiple-imputed data using runMI() from semTools 0.5-2.) to semPaths() (semPlot 1.1.2). Doing so returns the error: Error in (function (classes, fdef, mtable) : unable to find an…
pienkowski
  • 61
  • 7
3
votes
2 answers

Exclude Node in semPaths {semPlot}

I'm trying to plot a sem-path with R. Im using an OUT file provinent from Mplus with semPaths {semPLot}. Apparently it seems to work, but i want to remove some latent variables and i don't know how. I am using the following syntax : Out from Mplus…
2
votes
1 answer

Plotting a SEM Actor-Partner Interdependence Model after runMI()

I am using multiply-imputed data to run an Actor-Partner Interdependence Model (APIM; Cook & Kenny, 2005). I am using mice to impute my data and for reference, I am using this resource guide for constructing my APIM with lavaan. As far as I can…
jrcalabrese
  • 2,184
  • 3
  • 10
  • 30
2
votes
1 answer

How to Add Title To SEM Plot in R

This is what I have for the plot: semPaths(twofac7items_b,"std","est", rotation = 2, style = "lisrel",nCharNodes = 0,nodeNames=nodeNames,layout = "tree2", filetype = "pdf", width = 8, height = 6, filename = "Two Factor", …
Shawn Hemelstrand
  • 2,676
  • 4
  • 17
  • 30
2
votes
1 answer

Is it possible to change the length/position of arrows in semPaths?

I am trying to use semPlot::semPaths to make a plot of a bifactor model I ran in lavaan. The documentation for semPlot and qgraph is really great, so I've been able to figure out most of the specifications I want, but there's one thing I'm not sure…
E. Perkins
  • 33
  • 5
2
votes
1 answer

Is it possible to use package semPlot with R 3.6.2?

I upgraded R to version 3.6.2 and have discovered that package semPlot will not work. It installs without any problems, but when I try to load it I get the message, Error: package or namespace load failed for ‘semPlot’ in loadNamespace(j <-…
JRB
  • 233
  • 1
  • 9
1
vote
1 answer

Using probe2WayMC when the dependent variable is binary in lavaan

Is it possible to use the probe2WayMC function of semTools when sem(ordered="dep"), or only when the DV is continuous? I've tried it but I'm receiving this error message: Error in est$beta[nameY, nameX] : subscript out of bounds
1
vote
2 answers

R package: namespace ‘rlang’ 1.0.6 is already loaded, but >= 1.1.0 is required

I want to use package semPlot and I get the error message as follows. library(semPlot) Error: package or namespace load failed for ‘semPlot’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘rlang’ 1.0.6 is already…
Yujie Liu
  • 11
  • 1
  • 3
1
vote
0 answers

R package not found in docker build

I am rendering an Rmarkdown pdf in docker. In the markdown file I have two packages, lavaan and semPlot that are called with the library() function. I am using the following Dockerfile: FROM rocker/r-ver:4.2.2 RUN Rscript -e…
1
vote
0 answers

Remove residual variance paths of y-indicators in sempaths (package: semplot)

I am using the following code semPlot::semPaths to plot a lavaan model: semPaths(object = fit, what = "stand", nCharNodes = 0, layout = "tree", fade = FALSE, exoCov = FALSE, residuals = FALSE, …
1
vote
0 answers

R: is it possible to draw a diagram with SemPlot without fitting a model?

The documentation for the SemPlot package doesn't appear to show any way to build a path diagram without passing a model object and the model objects appear to only be the output of fit models in e.g. lavaan. Any way to specify nodes and paths…
socialscientist
  • 3,759
  • 5
  • 23
  • 58
1
vote
0 answers

I want to install semPlot packages in R

if i do install.packages("semPlot") in R, "C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-41~1.0/include" -DNDEBUG -I. -Iicu69/ -Iicu69/unicode -Iicu69/common -Iicu69/i18n -DU_STRINGI_PATCHES -DUCONFIG_USE_LOCAL…
hohohaha
  • 21
  • 1
  • 2
1
vote
0 answers

Rstudio - semPlot (lavaan) seems to output an unreadable plot no matter what (though factually correct)

I have a theoretical framework of 5 latent factors, each with 10 questions (big 5, personality questionaire). I want to create a semPlot of all 10*5 = 50 questions and 5 latent factors, and also visualize relationships between those. However, since…
JachymDvorak
  • 129
  • 8
1
2 3