File: summary.regsem.R

package info (click to toggle)
r-cran-regsem 1.6.2+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 496 kB
  • sloc: cpp: 263; ansic: 15; makefile: 2
file content (39 lines) | stat: -rw-r--r-- 1,050 bytes parent folder | download
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
#' Summary results from regsem.
#'
#' @param object An object from regsem.
#' @param ... Other arguments.
#' @method summary regsem
#' @export


summary.regsem <- function(object,...){
  fits = fit_indices(object,CV=FALSE)

  if(any(is.null(object$mediation))==FALSE){
    TAB <- cbind(convergence = object$convergence,
                 df = object$df,
                 fit=object$fit,
                 rmsea = fits$fit["rmsea"],
                 BIC = fits$fit["BIC"])

    ret <- list(call=object$call,
                estimates = object$coefficients,
                returnVals=TAB,
                mediation=object$mediation)
  }else{
    TAB <- cbind(convergence = object$convergence,
                 df = object$df,
                 fit=object$fit,
                 rmsea = fits$fit["rmsea"],
                 BIC = fits$fit["BIC"])

    ret <- list(call=object$call,
                estimates = object$coefficients,
                returnVals=TAB)
  }



  class(ret) <- "summary.regsem"
  print(ret)
}