Dear all stata users,
I have data from a stated choice experiment with 162 individuals who answered from 5 sets of situations each.
Each set of situation requires from individuals to choose between a contract A, a contract B or the reference contract.
In each contract, there are 3 attributes : price, duration and loss. The level of attributes vary across contract.
I have conducted mixlogit regressions. To do so, I have used the User-written command mixlogit to fit mixed logit models (Hole, 2007). I have used ssc install mixlogit- to install -mixlogit; next I have computed the marginal effects using the mixlpred command.
I have read that it is possible to bootstrap the marginal effect in order to get the standard error.
I have read the help about the bootstrap command but I don't achieve to implement it after the mixlpred command.
TO compute the marginal effect, I have this command :
mixlogit decision asc level_price , group(id_occas) rand(dureeQ dureeQ2 perteQ) id(id) nrep(100)
mixlpred prep_base
preserve
quietly replace dureeQ=dureeQ+1 if decision==1
mixlpred prep_inc
generate diff=prep_inc - prep_base if decision==1
sum diff if decision==1
restore
With this command I get the mean of the marginal effect. How can I bootstrap it ?
I know that a usual bootstrap command is like this :
bootstrap (I don't know what to enter here),cluster(id) idcluster(newid) group(id_occas) reps(10): mixlogit decision asc level_price, group(id_occas) id(newid) rand(dureeQ dureeQ2 perteQ)
If someone can help me, I will greatly appreciate
Thank you
I have data from a stated choice experiment with 162 individuals who answered from 5 sets of situations each.
Each set of situation requires from individuals to choose between a contract A, a contract B or the reference contract.
In each contract, there are 3 attributes : price, duration and loss. The level of attributes vary across contract.
I have conducted mixlogit regressions. To do so, I have used the User-written command mixlogit to fit mixed logit models (Hole, 2007). I have used ssc install mixlogit- to install -mixlogit; next I have computed the marginal effects using the mixlpred command.
I have read that it is possible to bootstrap the marginal effect in order to get the standard error.
I have read the help about the bootstrap command but I don't achieve to implement it after the mixlpred command.
TO compute the marginal effect, I have this command :
mixlogit decision asc level_price , group(id_occas) rand(dureeQ dureeQ2 perteQ) id(id) nrep(100)
mixlpred prep_base
preserve
quietly replace dureeQ=dureeQ+1 if decision==1
mixlpred prep_inc
generate diff=prep_inc - prep_base if decision==1
sum diff if decision==1
restore
With this command I get the mean of the marginal effect. How can I bootstrap it ?
I know that a usual bootstrap command is like this :
bootstrap (I don't know what to enter here),cluster(id) idcluster(newid) group(id_occas) reps(10): mixlogit decision asc level_price, group(id_occas) id(newid) rand(dureeQ dureeQ2 perteQ)
If someone can help me, I will greatly appreciate
Thank you
Comment