[R] weights in multinom

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jun 27 13:21:24 CEST 2006


See the references for ?multinom and ?nnet: this is covered in my 1996 
book.

On Tue, 27 Jun 2006, Jol, Arne wrote:

> Best R Help,
>
> I like to estimate a Multinomial Logit Model with 10 Classes. The
> problem is that the number of observations differs a lot over the 10
> classes:
>
> Class | num. Observations
> A | 373
> B | 631
> C | 171
> D | 700
> E | 87
> F | 249
> G | 138
> H | 133
> I | 162
> J | 407
> Total: 3051
>
> Where my data looks like:
>
> x1	x2	x3	x4	Class
> 1	1,02	2	1	A
> 2	7,2	1	5	B
> 3	4,2	1	4	H
> 1	4,1	1	8	F
> 2	2,4	3	7	D
> 1	1,2	0	4	J
> 2	0,9	1	2	G
> 4	4	3	0	C
> .	.	.	.	.
>
> My model looks like:
> estmodel <- multinom(choice ~ x1 + x2 + x3 + x4, data = trainset)
>
> When I estimate the model and use the resulting model for prediction of
> 'new' observations the model has a bias towards the Classes with a large
> number of observations (A,B,D,J), the other classes are never predicted
> by the model.
>
> I thougth that the option "weights" of the multinom function could be
> usefull but I am not sure how to use this in the above case.
>
> Is there someone with experience regarding such a weigthing approach in
> multinom? If someone could help me with suggestions it would be great!
>
> Nice day,
> Arne
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list