I think it would help to start with a shared-in-common example from the gmnl help page:
library(gmnl)
#> Loading required package: maxLik
#> Loading required package: miscTools
#>
#> Please cite the 'maxLik' package as:
#> Henningsen, Arne and Toomet, Ott (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443-458. DOI 10.1007/s00180-010-0217-1.
#>
#> If you have questions, suggestions, or comments regarding the 'maxLik' package, please use a forum or 'tracker' at maxLik's R-Forge site:
#> https://r-forge.r-project.org/projects/maxlik/
#> Loading required package: Formula
data("TravelMode", package = "AER")
library(mlogit)
#> Loading required package: zoo
#>
#> Attaching package: 'zoo'
#> The following objects are masked from 'package:base':
#>
#> as.Date, as.Date.numeric
#> Loading required package: lmtest
TM <- mlogit.data(TravelMode, choice = "choice", shape = "long",
alt.levels = c("air", "train", "bus", "car"), chid.var = "individual")
## Not run:
## S-MNL model, ASCs not scaled
smnl <- gmnl(choice ~ wait + vcost + travel + gcost| 1, data = TM,
model = "smnl", R = 100,
notscale = c(1, 1, 1, rep(0, 4)))
#>
#> The following variables are not scaled:
#> [1] "train:(intercept)" "bus:(intercept)" "car:(intercept)"
#> Estimating SMNL model
summary(smnl)
#>
#> Model estimated on: Tue Oct 29 11:01:49 2019
#>
#> Call:
#> gmnl(formula = choice ~ wait + vcost + travel + gcost | 1, data = TM,
#> model = "smnl", R = 100, notscale = c(1, 1, 1, rep(0, 4)),
#> method = "bfgs")
#>
#> Frequencies of categories:
#>
#> air train bus car
#> 0.27619 0.30000 0.14286 0.28095
#>
#> The estimation took: 0h:0m:5s
#>
#> Coefficients:
#> Estimate Std. Error z-value Pr(>|z|)
#> train:(intercept) -1.1613676 0.5883254 -1.9740 0.0483792 *
#> bus:(intercept) -1.9137960 0.7029972 -2.7223 0.0064822 **
#> car:(intercept) -7.3090849 1.2810533 -5.7055 1.160e-08 ***
#> wait -0.1391785 0.0208491 -6.6755 2.463e-11 ***
#> vcost -0.1255688 0.0342655 -3.6646 0.0002477 ***
#> travel -0.0184355 0.0042045 -4.3847 1.162e-05 ***
#> gcost 0.0992449 0.0285916 3.4711 0.0005183 ***
#> tau 0.4645904 0.1229279 3.7794 0.0001572 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Optimization of log-likelihood by BFGS maximization
#> Log Likelihood: -178.16
#> Number of observations: 210
#> Number of iterations: 61
#> Exit of MLE: successful convergence
#> Simulation based on 100 draws
Created on 2019-10-29 by the reprex package (v0.3.0)
and to compare the loglikelihood result of -178.16 against what you would get in Strata using the lc model argument,
a string indicating which model is estimated. The options are "mnl" for the Multinomial Logit Model, "mixl" for the Mixed Logit Model, "smnl" for the Scaled Multinomial Logit Model, "gmnl" for the Generalized Multinomial Logit Model, "lc" for the Latent Class Multinomial Logit Model, and "mm" for the Mixed-Mixed Multinomial Logit Model.
with the same number of classes, Q.
If you get identical results in R and Strata then your disconnect can probably be solved by lining up corresponding models and tuning parameters.