You are here

summary() of fitted mxModel object returns error

running the attached file & data, the model fits satisfactorily, but summary says:

> ACENonScSLCoraSumm <- summary(ACENonScSLCoraFit)
Error in observedStatisticsHelper(model, expectations[[i]], datalist,  : 
  trying to get slot "type" from an object of a basic class ("NULL") with no slots
AttachmentSize
Binary Data sexlimSummaryBug.R10.14 KB
File DASS_Data_Dummy_1.csv55.53 KB
Reporter: 
Created: 
Wed, 11/27/2013 - 18:34
Updated: 
Wed, 05/07/2014 - 10:36

Comments

I can't reproduce this error. My summary works fine and is attached. Does it still occur for you or is it fixed?

I still get the error with fresh build of 3426:

> ACENonScSLCoraFit
MxModel 'ACENonScSLCora'
type : default
$matrices :
$algebras : 'modelfit'
$constraints :
$intervals :
$latentVars : none
$manifestVars : none
$data : NULL
$submodels : 'ACE'
$expectation : NULL
$fitfunction : MxFitFunctionAlgebra
$compute : NULL
$independent : FALSE
$options :
$output : TRUE
> summary(ACENonScSLCoraFit)
Error in observedStatisticsHelper(model, expectations[[i]], datalist, :
trying to get slot "type" from an object of a basic class ("NULL") with no slots

I was able to reproduce the error with the Beta and R 3.0. I failed to reproduce it with the Beta or trunk on R 2.14. From the error message, I think I have a fix but can't currently test it on R 3.0 where I actually get the error.

The potential fix is checked in. Try r3428. Let me know if it works!

Yay it works! Well done Mike (AdminHunter). I note also we get a report on the compute plan now:

compute plan:
   MxComputeSequence 'compute' 
   $freeSet : '.' 
   steps[[ 1 ]] : 
     MxComputeGradientDescent 'compute' 
     $freeSet : '.' 
     $engine : 'CSOLNP' 
     $fitfunction : '21' 
     $verbose : 0 
   steps[[ 2 ]] : 
     MxComputeNumericDeriv 'compute' 
     $freeSet : '.' 
     $fitfunction : 21 
     $parallel : TRUE 
     $stepSize : 1e-04 
     $iterations : 4 
     $verbose : 0 
   steps[[ 3 ]] : 
     MxComputeStandardError 'compute' 
     $freeSet : '.' 
   steps[[ 4 ]] : 
     MxComputeReportDeriv 'compute' 
     $freeSet : '.' 

If we are going to be as verbose as this, perhaps the $fitfunction should be in terms of the actual function, not the code for it? Also, the number of function evaluations in each step would, IMO, be more useful to return than the number of iterations.

I'm glad this worked!

The compute plan is a separate issue, but it's printing definitely needs to be prettied up and tweaked.