File: cvregsemplot.Rd

package info (click to toggle)
r-cran-semplot 1.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 464 kB
  • sloc: makefile: 2
file content (66 lines) | stat: -rw-r--r-- 1,677 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
\name{cvregsem}
\alias{semPlotModel.cvregsem}
\title{
Bridge between cv_regsem output and sempaths
}
\description{
 The package regsem (Jacobucci, 2017) is designed for a specific type of SEM called regularized structural equation modelling (RegSEM). For more information about RegSEM and the implementation in R we refer to the manual written by Jacobucci (2017).This function creates a bridge between the regsem and semplot packages, making it possible to use output from the regsem() and cv_regsem() functions to create models in sempaths.
}
\usage{
\method{semPlotModel}{cvregsem}(object,model,\dots)
}
\arguments{
  \item{object}{
  The regsem output
}

  \item{model}{
  The cfa output used as input for the cv_regsem function
}
\item{\dots}{
Arguments sent to 'lisrelModel', not used in other methods.
}

}

\value{
A 'semPlotModel' object.
}
\references{
Jacobucci, R. (2017). regsem: Regularized Structural Equation Modeling. arXiv preprint  arXiv:1703.08489. 
}
\author{
Sacha Epskamp <mail@sachaepskamp.com>
Jason Nak <jasonnak@hotmail.com>
Myrthe Veenman <myrthe.veenman@hotmail.com>
}

\seealso{
\code{\link{semPlotModel}}
  \code{\link{semPaths}}
}
\examples{
## Example of fitting and plotting a cv_regsem model in semPaths

#library(psych)
#library(lavaan)
#library(regsem)

# use a subset of the BFI
#bfi2 <- bfi[1:250,c(1:5,18,22)]
#bfi2[,1] <- reverse.code(-1,bfi2[,1])

# specify a SEM model
#mod <- "
#f1 =~ NA*A1+A2+A3+A4+A5+O2+N3
#f1~~1*f1
#"

# fit the model
#fit <- cfa(mod, bfi2)
#out.reg <- cv_regsem(fit, type="lasso", pars_pen=c(1:7), n.lambda=23, jump =.05)

# plot the model
#semPaths(semPlotModel.cvregsemplot(object = out.reg, model = fit))
}