Some of my political science friends believe that this paper intends to insult political science or sounds condescending at least. I want to emphasize that my work is a serious academic study that aims to improve the current statistical method. I have no intention to be condescending, nor am I mocking or insulting political science at all.
Some of my political science friends criticize me that I show off too much by using Matlab as the programming tool. They suggest I should use Stata or R, since very few people in politial science use Matlab. My response is that this work can apply to any research that uses the Truncated Regression Model, and hence, Matlab qualifies as a powerful, flexible, and also one of the commonly-used programming languages across all the disciplines. This choice is not meant to be showing off, and in fact, using Matlab to program is very popular among econometricians. Given that Matlab is more powerful and handy than Stata and R, it is a more propriate tool for this work.
I am only an amatuer programmer at best. I only try to write some code that can carry out my statistical thinking. Therefore, I do not possess the programming expertise to make my code look elegant. I welcome anyone who can improve my code.