ctsem icon indicating copy to clipboard operation
ctsem copied to clipboard

Remove hard coding of ID column

Open SteveBronder opened this issue 6 years ago • 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

SteveBronder avatar Nov 16 '19 23:11 SteveBronder

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! :)

cdriveraus avatar Nov 22 '19 13:11 cdriveraus

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

SteveBronder avatar Nov 22 '19 15:11 SteveBronder