You are here

CIs: updating mxCI in a model

3 posts / 0 new
Last post
tbates's picture
Offline
Joined: 07/31/2009 - 14:25
CIs: updating mxCI in a model

hi,
I have a model with existing CIs

fit1a
...
@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]")))
  fit1b
mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
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
Offline
Joined: 07/31/2009 - 14:25
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...
tim

PS: This works:

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

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

t