Hello Statausers,
I am encountering a "no free constraints" error while attempting to run a generalized ordered logit model using the gologit2 command. My model includes a significant number of dummy variables for each country (over 60 countries) and several other covariates. Additionally, the dataset comprises more than 2,000,000 observations, which I suspect is contributing to reaching the maximum constraint limit in Stata (1,999 constraints).
Below is a snippet of the code:
Here's a snippet of my code for reference:
Does anyone have experience handling this constraint issue or suggestions on how to bypass or mitigate this problem in such large-scale models? Any tips or alternative approaches that could help avoid hitting the constraint limit would be highly appreciated. Thank you in advance for your advice and insights!
I am encountering a "no free constraints" error while attempting to run a generalized ordered logit model using the gologit2 command. My model includes a significant number of dummy variables for each country (over 60 countries) and several other covariates. Additionally, the dataset comprises more than 2,000,000 observations, which I suspect is contributing to reaching the maximum constraint limit in Stata (1,999 constraints).
Below is a snippet of the code:
Here's a snippet of my code for reference:
Code:
global countries = "Algeria Argentina.........[list of countries].... United_Kingdom " global reference = "United_States" global covariates = "leisure group family couple nights domestic" * define dummies foreach c in $countries_all { gen `c' = 0 replace `c' = 1 if guest_country_name == "`c'" } *Run generalized ordered probit (or logit) regression gologit2 score $countries $covariates i.unique_booking_id, npl($countries ) link(logit) gologit2 score $countries $covariates i.unique_booking_id, npl($countries) link(probit) difficult
Comment