Skip to content

Commit b279e06

Browse files
committed
Update create.mxModel
1 parent a4bc650 commit b279e06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+789
-503
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: metaSEM
22
Type: Package
33
Title: Meta-Analysis using Structural Equation Modeling
4-
Version: 1.3.1
5-
Date: 2023-08-08
4+
Version: 1.4.0
5+
Date: 2024-04-08
66
Depends: R (>= 3.4.0), OpenMx
77
Imports: Matrix, MASS, ellipse, graphics, stats, utils, mvtnorm, numDeriv, lavaan
88
Suggests: metafor, semPlot, R.rsp, testthat, matrixcalc

NAMESPACE

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ S3method(plot, meta)
1414
S3method(plot, character)
1515
S3method(plot, wls)
1616
S3method(plot, osmasem)
17+
S3method(plot, mxRAMmodel)
1718
# S3method(plot, osmasem3L)
1819

1920
S3method(summary, wls)
@@ -28,6 +29,7 @@ S3method(summary, CorPop)
2829
S3method(summary, Cor3L)
2930
S3method(summary, bootuniR2)
3031
S3method(summary, osmasem)
32+
S3method(summary, mxRAMmodel)
3133
# S3method(summary, osmasem3L)
3234
# S3method(summary, tssemRobust1)
3335

@@ -36,6 +38,7 @@ S3method(anova, meta3LFIML)
3638
S3method(anova, wls)
3739
S3method(anova, reml)
3840
S3method(anova, osmasem)
41+
S3method(anova, mxRAMmodel)
3942
# S3method(anova, osmasem3L)
4043

4144
S3method(coef, tssem1FEM)
@@ -46,8 +49,8 @@ S3method(coef, tssem1REM)
4649
S3method(coef, meta)
4750
S3method(coef, meta3LFIML)
4851
S3method(coef, reml)
49-
S3method(coef, MxRAMModel)
5052
S3method(coef, osmasem)
53+
S3method(coef, mxRAMmodel)
5154
# S3method(coef, osmasem3L)
5255
# S3method(coef, tssemRobust1)
5356

@@ -59,8 +62,8 @@ S3method(vcov, tssem1REM)
5962
S3method(vcov, meta)
6063
S3method(vcov, meta3LFIML)
6164
S3method(vcov, reml)
62-
S3method(vcov, MxRAMModel)
6365
S3method(vcov, osmasem)
66+
S3method(vcov, mxRAMmodel)
6467
# S3method(vcov, osmasem3L)
6568
# S3method(vcov, tssemRobust1)
6669

@@ -81,6 +84,7 @@ S3method(print, uniR1)
8184
S3method(print, summary.CorPop)
8285
S3method(print, summary.Cor3L)
8386
S3method(print, summary.bootuniR2)
87+
S3method(print, summary.mxRAMmodel)
8488

8589
# required by R3.3
8690
importFrom("graphics", "abline", "arrows", "layout", "par", "plot",

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Release 1.4.0 (Apr 8, 2024)
2+
====================================
3+
* Revise create.mxModel().
4+
* Replace dontrun with donttest.
5+
16
Release 1.3.1 (Aug 8, 2023)
27
====================================
38
* Lower the tolerance in testing asyCov(), which returns an error in latest R.

R/as.mxMatrix.R

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,16 @@ as.mxMatrix <- function(x, name, ...) {
7272
}
7373

7474
as.symMatrix <- function(x) {
75-
if (is.list(x)) {
76-
for (i in seq_along(x)) {
77-
x[[i]][] <- vapply(x[[i]], function(z) gsub(".*\\*", "", z), character(1))
78-
}
79-
} else {
80-
x[] <- vapply(x, function(z) gsub(".*\\*", "", z), character(1))
75+
if (is.list(x)) {
76+
## for (i in seq_along(x)) {
77+
## Exclude mxalgebras, which creates troubles
78+
for (i in c("A", "S", "F", "M")) {
79+
x[[i]][] <- vapply(x[[i]], function(z) gsub(".*\\*", "", z), character(1))
8180
}
82-
x
81+
} else {
82+
x[] <- vapply(x, function(z) gsub(".*\\*", "", z), character(1))
83+
}
84+
x
8385
}
8486

8587
as.mxAlgebra <- function(x, startvalues=NULL, name="X") {

0 commit comments

Comments
 (0)