Dear all,
I am learning how to estimate Choice models in Stata 16. I have the following data example extracted from a cross sectional dataset of a 123 Survey.
I want to explain sector of employment choice (variable : SECTAT). When I comset the data , I get the following error message.
all choice sets have only one alternative
r(2000);
code used : cmset id SECTACT
#
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input byte SECTACT float wage byte female float(maristatus age years_edu formal exper) byte FORIN
1 52127.18 1 2 31 17 1 5 1
3 169000 0 2 44 11 1 17 1
1 600000 0 2 37 16 1 5 1
2 378407.3 0 6 59 17 1 31 1
4 300000 1 1 25 2 2 2 2
end
#
I am wondering if there is a way to reshape the dataset so as to be able to comset it.
Thank you for your help.
Jean
Related Posts with Choice Models
Tabout and missing dataDear all, I often use tabout to describe my data but I am now struggling with the presentation of mi…
Variables do not uniquely identify the observations in the master dataHi, I am trying to merge individual and household data. In the user manual, it has been mentioned t…
Age, gender and BMI matched controls in STATAHello everyone, I am working on a study with 471 Normal Glucose Tolerance(non-diabetic) and 153 (Ty…
cumulative distribution function vs probability density functionHi everyone, According to my lecture slides you can compute the Marginal Effects for continuous X f…
Adding new rows for each group setHello all, I am working a matched case-control study (matched on age and sex). In the below example…
Subscribe to:
Post Comments (Atom)
0 Response to Choice Models
Post a Comment