0
$\begingroup$

I have a dataset of individual farms and I want to model the probability for a farm to select a certain type of irrigation (options: none, surface, sprinkler, drip, other).

As independent variables I have individual farm characteristics, such as soil quality and farmer experience. I read that it is also possible to include alternative-specific variables in the model (i.e. characteristics of the irrigation types). Does it make sense to include these if they do not vary over individuals? For example, the variable 'water efficiency' contributes to the irrigation decision, but is not different per individual.

In case it is useful to include these variables, which R package is suitable for this? From my understanding, the nnet package does not distinguish between different types of variables. Also, the mlogit makes the distinction but gives the error system is computationally singular because I have quadratic variables inside the model (at least, I think that this is the reason).

$\endgroup$
1
  • $\begingroup$ Do you mean that, given a particular water efficiency, the farm will always select a particular type of irrigation, or that the water efficiency is literally the same for every farm? $\endgroup$ – Dave 18 hours ago
0
$\begingroup$

There are many examples of situations where a multinomial logit model does not have alternative-specific data.

Some can be found at this wiki (look at the "Background" section for examples).

The nnet::multinom function should work for the data you describe here. In fact, it's pretty easy to provide an example where the data do not have alternative specific options and, in addition, have a quadratic variable.

Consider, for example, this model:

> nnet::multinom(factor(gear) ~ mpg + I(mpg^2) + am, data = mtcars)
# weights:  15 (8 variable)
initial  value 35.155593 
iter  10 value 13.933729
iter  20 value 13.592700
iter  30 value 13.587010
iter  40 value 13.560196
iter  50 value 13.559085
final  value 13.558772 
converged
Call:
nnet::multinom(formula = factor(gear) ~ mpg + I(mpg^2) + am, 
    data = mtcars)

Coefficients:
  (Intercept)        mpg     I(mpg^2)       am
4  -12.150010  0.6351021 -0.002961077  9.16672
5   -5.864022 -0.5569170  0.017969588 18.29501

Residual Deviance: 27.11754 
AIC: 43.11754 
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.