You are here

Error in omxAssignFirstParameters / omxSetParameters... 'labels' argument must not contain duplicate values

8 posts / 0 new
Last post
CharlesD's picture
Offline
Joined: 04/30/2013 - 11:05
Error in omxAssignFirstParameters / omxSetParameters... 'labels' argument must not contain duplicate values

This seems to be occurring when I try and constrain values across different matrices by label, then use omxAssignFirstParameters to set starting values - omxSetParameters gives the " 'labels' must not contain duplicate values" error. When I use the same label within the same matrix there is no problem. When browsing into the error, I see that indeed, the labels object within omxSetParameters contains duplicates only when they are specified from different matrices.

jpritikin's picture
Offline
Joined: 05/24/2012 - 00:35
version, code?

This should be easy to fix.

Which version of OpenMx are you using? Is this subversion trunk or 2.0 release?

Do you have code that you can share to easily reproduce this problem?

ana.martinovici's picture
Offline
Joined: 12/08/2014 - 08:49
code + data, same labels problem

Hi,

I have the same problem (among other problems). I have attached the code and data here: http://openmx.psyc.virginia.edu/thread/3940

Have a nice day,

Ana

jpritikin's picture
Offline
Joined: 05/24/2012 - 00:35
fixed

Yeah, the problem is fixed and will be corrected in the next release.

As a workaround, you can filter the result by unique names.

CharlesD's picture
Offline
Joined: 04/30/2013 - 11:05
Sorry, I should get better at

Sorry, I should get better at the bug report thing :)
Using the recent release, 2.0.0-0, on 64 bit windows pc's, the following code will show the failure:

test<-matrix(rnorm(100,0,1),ncol=2)
colnames(test)<-c('v1','v2')
testm<-mxModel(type='RAM',
mxData(test,type='raw'),
mxMatrix(name='A',ncol=2,nrow=2),
mxMatrix(name='S',ncol=2,nrow=2,labels=c('freematrix1[1,1]',NA,NA,'freematrix2[1,1]')),
mxMatrix(name='freematrix1',values=3,free=T,nrow=1,ncol=1,labels='freeparam1'),
mxMatrix(name='freematrix2',values=2,free=T,nrow=1,ncol=1,labels='freeparam1'),
mxMatrix(name='M',ncol=2,nrow=1),
mxMatrix(name='F',type='Diag',,values=1,ncol=2,nrow=2,dimnames=list(c('v1','v2'),c('v1','v2'))),
mxExpectationRAM(M='M',dimnames=c('v1','v2')),
mxFitFunctionML()
)
testm<-omxAssignFirstParameters(testm)
fit<-mxRun(testm)
summary(fit)

jpritikin's picture
Offline
Joined: 05/24/2012 - 00:35
fixed

Wow, I can't believe we could have a bug like that. Oh well, SVN 4070

mhunter's picture
Offline
Joined: 07/31/2009 - 15:26
Add test

Add this test to models/passing/startingValues.R please. Prevent future issues.

CharlesD's picture
Offline
Joined: 04/30/2013 - 11:05
Cheers guys :)

Cheers guys :)