cdriveraus/ctsem

Remove hard coding of ID column

Opened this issue · 2 comments

In cFit it looks like you are hardcoding

    idcol='id'
    obsTpoints=max(unlist(lapply(unique(dat[,idcol]),function(x) 
      length(dat[dat[,idcol]==x, idcol]) )))

But the user specifies that in the model function so I think you can just make it

 idcol <- ctmodelobj$id

Thanks, this was changed for the benefit of the newer estimation approach using ctStanFit instead of ctFit, which treats id more decently. I'm not devoting much maintenenance energy to the older openmx based approach and am worried that the test coverage to pick up a problem here may not be adequate, so I'm not resolving yet, but, noted, and I will try address it at some point! :)

lol oh whoops! It may be good to just throw a @deprecated tag on that func then