tabmodality

5 views
Skip to first unread message

transfe...@googlemail.com

unread,
Jul 30, 2008, 2:31:48 PM7/30/08
to mixmod
hi, sorry that my question is very simple, but I could not figure out
what you have to assign for the command "tabModality". I first thought
it was the mode for a variable, but this would not match with the
examples given in the documentation.

Florent Langrognet

unread,
Aug 4, 2008, 5:01:29 AM8/4/08
to mix...@googlegroups.com
"tabModality" is used with qualitative data.
In this case, each variable could take a finite number of values (or
'modalities' or 'response levels')
For example, if a variable dexribes the sex, the number of modalities
is 2 (male or female).
So, if tabModality is [2 3 4] : the first variable could take 2
values, the second 3 values and the third 4 values

> >
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Dennis Lorch

unread,
Aug 13, 2008, 9:45:35 AM8/13/08
to mix...@googlegroups.com
This was what I have thought too, but if you look at your example in mixmode m-file line 36ff it says:
% Example : ( In directory MIXMOD/)
%   data = load('DATA/birds.dat');
%   tabModality = [2;5;6;3;5;4];
If you would use the number of values each variable takes this would be [2;4;5;1;4;3]. But it does not work with this vector, only the one given in the code.
The birds data is in the appendix.

Also if I use for 100 objects with 10 bernoulli random variables (0/1 values) the tabmodality vector [2;2;2;2;2;2;2;2;2;2] I get:
MIXMOD ERROR (80) :
wrong value in data set : use 1,2...nbModality
Mixmod executable generate error : change options or report the bug



2008/8/4 Florent Langrognet <florent.l...@univ-fcomte.fr>
birds.dat

florent.l...@univ-fcomte.fr

unread,
Sep 17, 2008, 5:43:36 AM9/17/08
to mixmod


On 13 août, 15:45, "Dennis Lorch" <transfer.dlo...@googlemail.com>
wrote:
> This was what I have thought too, but if you look at your example in mixmode
> m-file line 36ff it says:
> % Example : ( In directory MIXMOD/)
> %   data = load('DATA/birds.dat');
> %   tabModality = [2;5;6;3;5;4];

tabModality[i] is the number of values that "could" take the variable
i.
For example, if this variable is the sex, tabModality for this
variable is 2 even if there is no man in the observed population.

> If you would use the number of values each variable takes this would be
> [2;4;5;1;4;3]. But it does not work with this vector, only the one given in
> the code.

because :
- tabModality[i]=1 is forbidden (in this case, the variable can take
only the value '1')
Even if, there is no '2' and '3' in the population, 3 values are
possible for the 4th variable
If a variable could take only one value, this variable must be remove
from the population
- for the 5th variable, no '1' is observed.
If '1' is a possible value but not observed, we must have
tabModality[5]=4
else we hae tabModality[5]=4 BUT all values must be in [1;4] (or here
values is in [2;5])


> The birds data is in the appendix.
>
> Also if I use for 100 objects with 10 bernoulli random variables (0/1
> values) the tabmodality vector [2;2;2;2;2;2;2;2;2;2] I get:
> MIXMOD ERROR (80) :

All values of the ith variable must be in [1;tabModality[i]]
si, values must be 1 or 2 (and not 0 or 1)

Florent Langrognet

> wrong value in data set : use 1,2...nbModality
> Mixmod executable generate error : change options or report the bug
>
> 2008/8/4 Florent Langrognet <florent.langrog...@univ-fcomte.fr>
>
>
>
> > Quoting "transfer.dlo...@googlemail.com" <transfer.dlo...@googlemail.com>:
>
> > > hi, sorry that my question is very simple, but I could not figure out
> > > what you have to assign for the command "tabModality". I first thought
> > > it was the mode for a variable, but this would not match with the
> > > examples given in the documentation.
>
> > "tabModality" is used with qualitative data.
> > In this case, each variable could take a finite number of values (or
> > 'modalities' or 'response levels')
> > For example, if a variable dexribes the sex, the number of modalities
> > is 2 (male or female).
> > So, if tabModality is [2 3 4] : the first variable could take 2
> > values, the second 3 values and the third 4 values
>
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
>
>
>
>  birds.dat
> 7KAfficherTélécharger
Reply all
Reply to author
Forward
0 new messages