I am trying to run a logistic regression with the data structure as follows (The original data has 10 columns and 296 rows in the format as shown in the example):
Food d.bri d.cau d.bre d.pea FA FC Delay Agg Rej
F1 1 0 0 0 5.00 3.00 2.00 3.00 0.00
F2 0 1 0 0 4.00 4.00 3.00 5.00 0.00
F3 0 0 1 0 3.00 5.00 5.00 7.00 0.00
F4 0 0 0 1 2.00 2.00 4.00 7.00 0.00
F1 1 0 0 0 5.00 5.00 5.00 7.00 0.00
F3 0 0 1 0 4.00 4.00 4.00 7.00 0.00
F2 0 1 0 0 3.00 3.00 5.00 7.00 0.00
F4 0 0 0 1 2.00 2.00 5.00 7.00 0.00
Transformation of the data has been done with
l.data = mlogit.data(DATA, choice = 'Food', shape = 'wide')
With the following multinomial code, I get the result as expected.
FC_F1 = mlogit(Food ~ 1 | FC, data = l.data, reflevel = 'F1')
However, on trying to run a conditional model, I get the following error
Lapack routine dgesv: system is exactly singular: U[4,4] = 0
The code I am using is
c.logit_F1 = mlogit(Food ~ Agg+Delay|FC, data = l.data, reflevel = 'F1')
I am unsure as to what is causing the problem.
Please help.