CIs: updating mxCI in a model

2 replies [Last post]
tbates's picture
Joined: 07/31/2009

I have a model with existing CIs

@intervals : 'top.a_std', 'top.c_std', and 'top.e_std' 

I want to delete those, and run with just 1 request, so I tried
fit1b= mxModel(fit1a,mxCI(c("top.e_std[1,2]")))
but this seems to add the CIs onto the end of the list (rather than stamp on the old list)

Is that a bug, or is this the approved method?

  fit1b <- fit1a
  fit1b@intervals= list()
  fit1b= mxModel(fit1b, mxCI(c("top.e_std[1,2]","top.e_std[1,1]")))

mspiegel's picture
Joined: 07/31/2009
Try this to delete the

Try this to delete the current intervals:

fit1b <- mxModel(fit1a, mxCI(c('top.a_std', 'top.c_std', 
    'top.e_std')), remove = TRUE)

And then you can add the new intervals as usual.

tbates's picture
Joined: 07/31/2009
why aren't intervals like matrices? or are they...

Thanks Dr Mike!
I guess as I write this, I can see why this behavior is different for intervals than for matrices (where "adding" a matrix named "a" stomps on any existing matrix called "a". In the case of intervals, they are unnamed...

PS: This works:

   fit1b <- mxModel(fit1a, fit1a@intervals, remove = TRUE)

and doesn't require knowing what intervals exist already...