1

I use r in Jupyter Notebook. I was re-running old confirmatory factor analysis (CFA) code and recently I have no longer been able to see accurately see the summary() output in it's normal format. Instead it is in the variable "$variable_name" format. How do I make the summary output appear in its normal format?

This does not occur in rStudio. My r, Jupyter Notebook, and computer software are all up-to-date. The issue occurs with or without me adding "lavaan::" to the beginning of the function. I have also tried reverting to older lavaan versions.

Any help is greatly appreciated.

Below is example code.

visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9

HS.model <- ' visual  =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed   =~ x7 + x8 + x9 '

fit <- cfa(HS.model, data = HolzingerSwineford1939)

summary(fit, fit.measures = TRUE) 


Output:

$header
$lavaan.version
'0.6-12'
$sam.approach
FALSE
$optim.method
'nlminb'
$optim.iterations
67
$optim.converged
TRUE
$optim
$estimator
'ML'
$estimator.args
$optim.method
'nlminb'
$npar
127
$eq.constraints
FALSE
$nrow.ceq.jac
0
$nrow.cin.jac
0
$nrow.con.jac
0
$con.jac.rank
0
$data
...
Gold
  • 11
  • 2
  • `lavaan`'s `summary()` is not meant to be used like this. It simply prints (in a nicer-looking default way) information that can be obtained elsewhere. For instance, you can obtain the nice-looking output from `paramterEstimates(fit, output = "pretty")` and `fitMeasures(fit, output = "pretty")`. the `summary()` method creates an internal object to simultaneously print the many sources of information at once, but it's structure is subject to change, so it is wise not rely on it. – Terrence Aug 09 '22 at 08:37

1 Answers1

0

Try to add a summary(): print(summary(fit, fit.measures = TRUE) ) This kind of error can happen on apple silicon mac

dwcore
  • 1