|
18 | 18 | ##' [FitDiff-class]. |
19 | 19 | ##' @param what The attributes of the `lavaan` object to be copied in the |
20 | 20 | ##' clipboard. `"summary"` is to copy the screen provided from the |
21 | | -##' `summary` function. `"mifit"` is to copy the result from the |
22 | | -##' [miPowerFit()] function. Other attributes listed in the |
| 21 | +##' `summary` function. `"epceqfit"` is to copy the result from the |
| 22 | +##' [epcEquivFit()] function. Other attributes listed in the |
23 | 23 | ##' `inspect` method in the [lavaan::lavaan-class] could also be |
24 | 24 | ##' used, such as `"coef"`, `"se"`, `"fit"`, `"samp"`, and |
25 | 25 | ##' so on. Ignored for [FitDiff-class]-class objects. |
|
33 | 33 | ##' @param writeArgs `list` of additional arguments to be passed to |
34 | 34 | ##' [utils::write.table()] |
35 | 35 | ##' @param \dots Additional arguments when passing a `lavaan` object to the |
36 | | -##' `summary` or [miPowerFit()] function. |
| 36 | +##' `summary` or [epcEquivFit()] function. |
37 | 37 | ##' |
38 | 38 | ##' @return The resulting output will be saved into a clipboard or a file. If |
39 | 39 | ##' using the `clipboard` function, users may paste it in the other |
|
60 | 60 | ##' # pass additional arguments to summary() method for class?lavaan |
61 | 61 | ##' clipboard(fit, rsquare = TRUE, standardized = TRUE, fit.measures = TRUE) |
62 | 62 | ##' |
63 | | -##' # Copy modification indices and fit stats from the miPowerFit() function |
64 | | -##' clipboard(fit, "mifit") |
| 63 | +##' # Copy the EPC equivalence testing results from the epcEquivFit() function |
| 64 | +##' clipboard(fit, "epceqfit") |
65 | 65 | ##' |
66 | 66 | ##' # Copy the parameter estimates |
67 | 67 | ##' clipboard(fit, "coef") |
|
78 | 78 | ##' # Save the summary of the lavaan object |
79 | 79 | ##' saveFile(fit, "out.txt") |
80 | 80 | ##' |
81 | | -##' # Save modification indices and fit stats from the miPowerFit() function |
82 | | -##' saveFile(fit, "out.txt", "mifit") |
| 81 | +##' # Save the EPC equivalence testing results from the epcEquivFit() function |
| 82 | +##' saveFile(fit, "out.txt", "epceqfit") |
83 | 83 | ##' |
84 | 84 | ##' # Save the parameter estimates |
85 | 85 | ##' saveFile(fit, "out.txt", "coef") |
@@ -162,13 +162,13 @@ saveFileLavaan <- function(object, file, what = "summary", tableFormat = FALSE, |
162 | 162 | writeArgs$x <- paste(utils::capture.output(summary(object, ...)), |
163 | 163 | collapse = "\n") |
164 | 164 | } |
165 | | - } else if (what == "mifit") { |
| 165 | + } else if (what %in% c("epceqfit", "mifit")) { # "mifit" retained for backward compatibility |
166 | 166 | if (tableFormat) { |
167 | | - writeArgs$x <- miPowerFit(object, ...) |
| 167 | + writeArgs$x <- epcEquivFit(object, ...) |
168 | 168 | if (is.null(writeArgs$row.names)) writeArgs$row.names <- FALSE |
169 | 169 | if (is.null(writeArgs$col.names)) writeArgs$col.names <- TRUE |
170 | 170 | } else { |
171 | | - writeArgs$x <- paste(utils::capture.output(miPowerFit(object, ...)), |
| 171 | + writeArgs$x <- paste(utils::capture.output(epcEquivFit(object, ...)), |
172 | 172 | collapse = "\n") |
173 | 173 | } |
174 | 174 | } else { |
|
0 commit comments