GilchristLab/cubfits — pull request #3 by ozway (2014-12-12 19:39:16+00:00)
Title: Changes to NSE: Account for position and a2 in plotCUB, account for a2=4 in the probability of seeing a codon, removed unnecessary logMu flip, simplified scaling of terms during normalization in mlogit calculation (See comment for details)

- Changes to plotCUB to properly plot the bias caused by the NSE model. Specifically, we need to account for position. For now, I take the average position of the amino acid (within each gene), though later we should probably account for position in a more intricate way
- This included adding a new function prop.model.nse.r, so I also renamed predict.roc to prediction to avoid confusion
- in my.logdmultinomCodOne.r, I also accounted for the a2 term, which was previously ignored. I've assumed it to be 4 here, but added commented out code that permits using a2 and (a1-a2) as terms that can be set in the configuration file
- also in my.lodgmultinomCodOne.r, I removed an unnecessary flip of the logMu term which was causing instability during the early parts of the run
- added the ability to reset the covariance matrix in my.cubfits.r
- Changed the scaling in the mlogit calculation to automatically scale down by the maximum. This avoids problems generated by outrageously large proposed phi values
- Later, also condensed the scaling in the mlogit calculation to lead to a potential speedup