4

I would like to add some constraints to a multinomial logistic regression model using mlogit in R. For example only look for negative values during coefficient estimation. But apparently the model doesn't have such capabilities. I was wondering if there is any way to add constraints or boundaries to mlogit or any other packages which can be used for multinomial logistic regression.

Here is the code:

Proc_MDC3 <- function(x){

fm <- mFormula(decision ~  term_f1yc + term_f2yc + eff_rate2 + term_special2 + peak -1  )
fit <- mlogit(fm, x)
Out2<-fit$coefficients
return( Out2)
}

Coeff4<-data.frame(do.call("rbind", by(MDC3, MDC3$SEG, Proc_MDC3)))

I only want negative values for eff_rate2 coefficients however this code gives me both negative and positive values.

I appreciate your help in advance.

dan1st
  • 12,568
  • 8
  • 34
  • 67
Frank
  • 41
  • 2

0 Answers0