Dear StataList users,
I am trying to run a model of farmers' time to adoption of an innovation using Stata v.15.1. For this, I have considered using a split-population (cure) duration model through the Stata command STRSMIX. The problem is that I am being prevented to run the model due to getting the following message:
The model does have various independent variables that come in categories. These include access to irrigation (1/0); location - for 2 provinces (1/0); education level (study) (3/2/1); off-farm income (1/0); subsistence farming (1/0); and belonging to a certain social group (4/3/2/1).
My syntax looks as follows:
stset t_end, failure(event==1)
strsmix animalintensity cultivatedland i.irrigation ownrentratio i.locationdum machineindex experiencen fsworkage i.estudios3 lifequality i.offfarmincome i.subsistfarmer i.socclass4, dist(weibull) link(loglog) bhazard(rate0)
I wonder what could be the problem here, or if instead I should resort to model commands such as CUREREGR, which does allow me to use factor-variables, but is apparently limited when it comes to making predictions.
Many thanks, Jesus P.
I am trying to run a model of farmers' time to adoption of an innovation using Stata v.15.1. For this, I have considered using a split-population (cure) duration model through the Stata command STRSMIX. The problem is that I am being prevented to run the model due to getting the following message:
factor-variable and time-series operators not allowed
r(101);
r(101);
My syntax looks as follows:
stset t_end, failure(event==1)
strsmix animalintensity cultivatedland i.irrigation ownrentratio i.locationdum machineindex experiencen fsworkage i.estudios3 lifequality i.offfarmincome i.subsistfarmer i.socclass4, dist(weibull) link(loglog) bhazard(rate0)
Many thanks, Jesus P.
Comment