lavTestLRT() Function: Is Rounding possible?

17 views
Skip to first unread message

Isa

unread,
Jan 31, 2019, 1:19:29 AM1/31/19
to lavaan

Dear Lavaan Group

 

I would like to ask a question about the lavTestLRT() function: Is it possible to somehow round its output to a preferred number of digits?

To me, it seems like the function is randomly rounding its output (chi-squares, chi-square differences and corresponding p-values) to different numbers of digits for different model comparisons, for example:

 

lavTestLRT(config_sex, weak_sex, method="satorra.2000")

Scaled Chi Square Difference Test (method = "satorra.2000")

 

           Df AIC BIC  Chisq Chisq diff Df diff Pr(>Chisq) 

config_sex  2         3.2798                               

weak_sex    5         9.2581     7.1379       3    0.06763 .

 

lavTestLRT(config_partet, weak_partet, method="satorra.2000")

Scaled Chi Square Difference Test (method = "satorra.2000")

 

              Df AIC BIC  Chisq Chisq diff Df diff Pr(>Chisq)
config_partet  2         4.4641                              
weak_partet    5         7.1380      4.011       3     0.2603

 

 

I would like to be able to control this issue. I tried to wrap the command into the round() function, but it did not work:

round(lavTestLRT(…), digits = 2)

 

Any considerations? Thanks!

Best wishes, Isabel

Reply all
Reply to author
Forward
0 new messages