Dear all,
I am trying to estimate a skewed-logistic (or Type 1 logistic) binary choice model. This is essentially similar to the one Stata's scobit command does. However, the reason i want to code this model using Stata's ml command will soon be evident.
Based on Stata's manual rscobit.pdf , the log-likelihood function for skewed logit can be constructed simply by using a "skewed-logit" density for error terms instead of using "normal" or "logit" density in case of simple probit or logit model respectively.
The skewed logit CDF is (Wikipedia source):

Stata fits this model as (from rscobit.pdf):

Having said all this, I am using the below code, but i get an error of "unvalid syntax" each time i run ml check on the program.
When i run ml check, i get this:
model not defined
And if i omit running ml check, and run ml model and ml maximize command, i get:
unknown function ()
Can anyone please help me correcting any silly mistake I may be doing?
Ultimately, I am want to estimate a ordered skewed logit model where simple ordered logit model can be derived by forcing alpha == 1, and ordered skewed logit can be estimated by calculating the alpha parameter in CDF. Of course, a binary choice model is the first step to doing this, so am trying to replicate results of scobit.
Thank you!
I am trying to estimate a skewed-logistic (or Type 1 logistic) binary choice model. This is essentially similar to the one Stata's scobit command does. However, the reason i want to code this model using Stata's ml command will soon be evident.
Based on Stata's manual rscobit.pdf , the log-likelihood function for skewed logit can be constructed simply by using a "skewed-logit" density for error terms instead of using "normal" or "logit" density in case of simple probit or logit model respectively.
The skewed logit CDF is (Wikipedia source):
Stata fits this model as (from rscobit.pdf):
Having said all this, I am using the below code, but i get an error of "unvalid syntax" each time i run ml check on the program.
Code:
capture program drop abc program define abc version 14 args lnf xb alpha local f "(1 - 1/(1+exp(`xb'))^(-`alpha'))" quietly replace `lnf' = ln( `f'(`xb')) if $ML_y1==1 /// f is the CDF of skewed #logit i assume??? quietly replace `lnf' = ln(1 - `f'(`xb')) if $ML_y1==0 end ml check ml model lf abc (foreign = mpg rep78 turn) ml maximize, difficult tolerance(1e-6) ltolerance(1e-7)
When i run ml check, i get this:
model not defined
And if i omit running ml check, and run ml model and ml maximize command, i get:
unknown function ()
Can anyone please help me correcting any silly mistake I may be doing?
Ultimately, I am want to estimate a ordered skewed logit model where simple ordered logit model can be derived by forcing alpha == 1, and ordered skewed logit can be estimated by calculating the alpha parameter in CDF. Of course, a binary choice model is the first step to doing this, so am trying to replicate results of scobit.
Thank you!
Comment