CIs: updating mxCI in a model

Posted on
Picture of user. tbates Joined: 07/31/2009

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

Replied on Thu, 06/30/2011 - 09:05
Picture of user. mspiegel Joined: Jul 31, 2009

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.

Replied on Thu, 06/30/2011 - 09:46
Picture of user. tbates Joined: Jul 31, 2009

In reply to by mspiegel

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