Hi,
I'm using the function "mlogit" from the package "mlogit" in order to make a
multinomial model, with random and nested effect*. But, currently, even a basic
model as
> mlogit(c ~ lma + poids , MC, shape = "long", alt.var = "N")
Erreur dans drop(.Call("La_dgesv", a, as.matrix(b), tol, PACKAGE = "base")) :
sous-programme Lapack dgesv : le système est exactement singulier
which is the same thing than
Error in drop(.Call("La_dgesv", a, as.matrix(b), tol, PACKAGE = "base")) :
"Lapack routine dgesv: system is exactly singular"
I didn't find any explanations on the web ...
my data look like this
> head(MC)
male pop lma poids ventre dos date mom c N
1 1 2 4.9 3.03 4 3 1 1 no SS_cache
2 1 2 4.9 3.03 4 3 1 1 no explo
3 1 2 4.9 3.03 4 3 1 1 no thermo
4 1 2 4.9 3.03 4 3 1 1 no immo
5 1 2 4.9 3.03 4 3 1 1 no stress
6 1 2 4.9 3.03 4 3 1 2 yes SS_cache
somes data of the Examples (in ?mlogit) look like mine
> head(TravelMode)
individual mode choice wait vcost travel gcost income size avincome time
1 1 air no 69 59 100 70 3.5 1 35 2.816667
2 1 train no 34 31 372 71 3.5 1 0 6.766667
3 1 bus no 35 25 417 70 3.5 1 0 7.533333
4 1 car yes 0 10 180 30 3.5 1 0 3.000000
5 2 air no 64 58 68 68 3.0 2 30 2.200000
6 2 train no 44 31 354 84 3.0 2 0 6.633333
timeair
1 2.816667
2 0.000000
3 0.000000
4 0.000000
5 2.200000
6 0.000000
and
> mlogit(choice ~ time + timeair , TravelMode, shape = "long", alt.var = "mode")
Call:
mlogit(formula = choice ~ time + timeair, data = TravelMode, shape =
"long", alt.var = "mode", method = "nr", print.level = 0)
Coefficients:
alttrain altbus altcar time timeair
-3.6776 -4.2339 -4.5232 -0.5963 -2.7048
work prefectly
so, I don't understant any thing, ...
Is anybody understand why this function didn't work on my data ?
MANY THANKS
hugo mathé hubertEmail : [email protected]
PS: * if anybody know how to consider interaction between 2 nested factors, I'm
interested ...
(it is "a:b in (A:B)" if a is nested in A and b nested in B ?)
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.