statistics - Strange big number of variables in multinom() function in R -


when run multinom() function in r, number of variables in result big while have few predictor variables in formula. can explain me why happening , how can resolve it? (mv_daily takes 0 , 1, icu_loc takes 0,1,2 in data.)

i tried 3 predictor variables , number of variables in result increased 1230! program takes each distinct value of predictor variable different variable in results , gives different coefficient.

newdata2 <- read.csv("~/desktop/input_multinom_reg_march9_csv.csv") library(nnet) test <- multinom(state_tomorrow ~ mv_daily + icu_loc, newdata2,maxit=400,maxnwts=2000) 

results:

 call:  multinom(formula = state_tomorrow ~ mv_day2 + icu_loc, data = newdata2,   maxit = 400, maxnwts = 2000)  coefficients: (intercept)    mv_daily    icu_loc f     3.6303751 -1.1223394 -0.3681095 h     1.2178084 -1.3153864  0.3721295 ind   0.4628305 -2.1366738 -1.2530020 pr    2.2952981 -1.3085620 -0.4032178 rrt   0.1000952 -0.6432881  0.7659957  # weights:  24 (15 variable) initial  value 18682.675986  iter  10 value 12929.391832 iter  20 value 12341.441938 final  value 12284.346914 

data this:

id  state_tomorrow  day  mv_daily  icu_loc 1     f              1      0         1 1     rrt            2      1         1 2     pr             4      1         0 2     pr             5      1         2 

when estimating multinomial models, 1 should expect separate parameter estimate each factor level.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -