Print the content of
an lrtp-class object.
Arguments
- x
An
lrtp-class object.- digits
Integer. The number of decimal places to print. Default is 3.
- lrtp_only
Logical. If
TRUE, the default, only parameters with LRT p-values will be printed.- wald_stats
Logical. If
TRUE, the usual Wald statistics (e.g., z statistics, p-values, CIs) are printed.FALSEby default, assuming that users prefer using LRT statistics when usinglrtp().- output
The format of the printout. If
"text", then the style in thesummary()of thelavaan-class object is used. If"data.frame"or"table", then the data frame format oflavaan::parameterEstimates()is used.- ...
Optional arguments. Not used.
Details
The print method for the
output of lrtp().
Additional diagnostic information will be printed if one or more likelihood tests encounter some errors or warnings.
Author
Shu Fai Cheung https://orcid.org/0000-0002-9871-9448
Examples
library(lavaan)
data(data_sem16)
mod <-
"
f1 =~ x1 + x2 + x3
f2 =~ x4 + x5 + x6
"
fit <- sem(mod, data_sem16)
out <- lrtp(fit)
out
#>
#> Parameter Estimates:
#>
#> Standard errors Standard
#> Information Expected
#> Information saturated (h1) model Structured
#>
#> Covariances:
#> Estimate Std.Err Chisq LRTp
#> f1 ~~
#> f2 0.057 0.028 10.646 0.001
#>
print(out, lrtp_only = FALSE)
#>
#> Parameter Estimates:
#>
#> Standard errors Standard
#> Information Expected
#> Information saturated (h1) model Structured
#>
#> Latent Variables:
#> Estimate Std.Err Chisq LRTp
#> f1 =~
#> x1 1.000 NA NA
#> x2 0.963 0.252 NA NA
#> x3 1.054 0.284 NA NA
#> f2 =~
#> x4 1.000 NA NA
#> x5 1.771 0.740 NA NA
#> x6 2.368 1.060 NA NA
#>
#> Covariances:
#> Estimate Std.Err Chisq LRTp
#> f1 ~~
#> f2 0.057 0.028 10.646 0.001
#>
#> Variances:
#> Estimate Std.Err Chisq LRTp
#> .x1 1.020 0.111 NA NA
#> .x2 1.048 0.109 NA NA
#> .x3 0.709 0.100 NA NA
#> .x4 1.154 0.096 NA NA
#> .x5 0.972 0.114 NA NA
#> .x6 0.826 0.162 NA NA
#> f1 0.276 0.100 NA NA
#> f2 0.067 0.048 NA NA
#>
