I generated 2000 latent variable a which is defined as a = b + 3c + d where d ~ N[0,3] and c ~ uniform [0, 1]. I should choose a variable "b" so that I can generate nearly 30% of "a" to be negative as it is follows:
https://www.statalist.org/forums/for...le#post1669759
In the dataset, this generated variable y include negative values. And the values in the variable y is not ordered from the smallest value to the highest or vice versa.
Now, my question is that by using this generated variable y and x , I want to apply the truncated maximum likelihood regression.
I guess, since this generated variable y include negative values, I first insert 0 instead of negative value of the variable y. And then, I run Tobit regression estimation. (This is what I understand.)
How can I write Stata code for this regression estimation.
Thank you.
https://www.statalist.org/forums/for...le#post1669759
In the dataset, this generated variable y include negative values. And the values in the variable y is not ordered from the smallest value to the highest or vice versa.
Now, my question is that by using this generated variable y and x , I want to apply the truncated maximum likelihood regression.
I guess, since this generated variable y include negative values, I first insert 0 instead of negative value of the variable y. And then, I run Tobit regression estimation. (This is what I understand.)
How can I write Stata code for this regression estimation.
Thank you.
