I am fitting a logit model on R using mlogit package. All the parameters of the dummy variables (var1, var2, var3) are normally distributed. How can I put a constraint on one variable (var1) to make its parameter zero-mean? The current code returns a non-zero mean for var1. Thanks!
model <- mlogit(outcome ~ var1 + var2 + var3 | 0 ,
data=data,
rpar = c(var1 = "n",
var2 = "n",
var3 = "n"),
correlation = FALSE,
R = 100,
halton = NA)
I know it is relatively easy in STATA to put constraints on parameters. for my model, my code in STATA is:
constraint 1 _b[var1]=0
mixlogit choice var1 var2 var3, group(qid) id(id) constraint(1)
I just want to know how to do the same thing in R. Thanks!