我在制定模型时遇到问题,其中至少一个变量要独立于类进行估计,因此所有类的系数相同。怎么可能做到这一点?我正在使用 R 包 gmnl。
install.packages("gmnl")
library(gmnl)
library(mlogit)
#browseURL("https://cran.r-project.org/web/packages/poLCA/index.html")
## Examples using the Fishing data set from the AER package
data("Electricity", package = "mlogit")
Electr <- mlogit.data(Electricity, id.var = "id", choice = "choice",
varying = 3:26, shape = "wide", sep = "")
Elec.lc <- gmnl(choice ~ pf + cl + loc + wk + tod + seas| 0 | 0 | 0 | 1,
data = Electr,
subset = 1:3000,
model = 'lc',
panel = TRUE,
Q = 2)
summary(Elec.lc)
您将如何独立于类对变量 pf、cl、loc、wk、tod 或 seas 之一进行建模?谢谢!