R Under development (unstable) (2025-10-18 r88943 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > library("MASS") > options(digits = 4) > > mp <- polr(Sat ~ Infl, weights = Freq, data = housing) > > library("mlt") Loading required package: basefun Loading required package: variables > > s <- as.basis(~ Infl, data = housing, remove_intercept = TRUE) > r <- as.basis(housing$Sat) > #r <- as.basis(~ Sat, data = housing, remove_intercept = TRUE, > # contrasts.arg = list(Sat = function(n) > # contr.treatment(n, base = 3)), > # ui = diff(diag(2)), ci = 0) > > m <- ctm(r, shift = s, todist = "Logi") > > mod <- mlt(m, data = housing, weights = housing$Freq) > > logLik(mp) 'log Lik.' -1772 (df=4) > logLik(mod) 'log Lik.' -1772 (df=4) > > coef(mp) InflMedium InflHigh 0.5636 1.2487 > mp$zeta Low|Medium Medium|High -0.2014 0.9485 > ### PR#17616 > unname(coef(mod)) [1] -0.2014 0.9485 -0.5636 -1.2487 > > sqrt(diag(vcov(mp))) Re-fitting to get Hessian InflMedium InflHigh Low|Medium Medium|High 0.10357 0.12479 0.07663 0.08024 > unname(sqrt(diag(vcov(mod)))) [1] 0.07663 0.08024 0.10357 0.12479 > > mp <- polr(Sat ~ Infl, weights = Freq, data = housing, method = "loglog") > > s <- as.basis(~ Infl, data = housing, remove_intercept = TRUE) > r <- as.basis(housing$Sat) > m <- ctm(r, shift = s, todist = "MaxExtrVal") > > mod <- mlt(m, data = housing, weights = housing$Freq) > > logLik(mp) 'log Lik.' -1776 (df=4) > logLik(mod) 'log Lik.' -1776 (df=4) > > coef(mp) InflMedium InflHigh 0.3851 0.7838 > mp$zeta Low|Medium Medium|High 0.2426 1.0315 > unname(coef(mod)) [1] 0.2426 1.0315 -0.3851 -0.7838 > > sqrt(diag(vcov(mp))) Re-fitting to get Hessian InflMedium InflHigh Low|Medium Medium|High 0.07219 0.07954 0.05454 0.06091 > unname(sqrt(diag(vcov(mod)))) [1] 0.05454 0.06091 0.07219 0.07954 > > mp <- polr(Sat ~ Infl, weights = Freq, data = housing, method = "cloglog") > > s <- as.basis(~ Infl, data = housing, remove_intercept = TRUE) > r <- as.basis(housing$Sat) > m <- ctm(r, shift = s, todist = "MinExtrVal") > > mod <- mlt(m, data = housing, weights = housing$Freq) > > logLik(mp) 'log Lik.' -1773 (df=4) > logLik(mod) 'log Lik.' -1773 (df=4) > > coef(mp) InflMedium InflHigh 0.3663 0.8792 > mp$zeta Low|Medium Medium|High -0.5679 0.2655 > unname(coef(mod)) [1] -0.5679 0.2655 -0.3663 -0.8792 > > sqrt(diag(vcov(mp))) Re-fitting to get Hessian InflMedium InflHigh Low|Medium Medium|High 0.06980 0.09157 0.05441 0.04894 > unname(sqrt(diag(vcov(mod)))) [1] 0.05441 0.04894 0.06980 0.09157 > > mp <- polr(Sat ~ Infl, weights = Freq, data = housing, method = "probit") > > s <- as.basis(~ Infl, data = housing, remove_intercept = TRUE) > r <- as.basis(housing$Sat) > m <- ctm(r, shift = s, todist = "Normal") > > mod <- mlt(m, data = housing, weights = housing$Freq) > > logLik(mp) 'log Lik.' -1772 (df=4) > logLik(mod) 'log Lik.' -1772 (df=4) > > coef(mp) InflMedium InflHigh 0.3466 0.7609 > mp$zeta Low|Medium Medium|High -0.1247 0.5834 > unname(coef(mod)) [1] -0.1247 0.5834 -0.3466 -0.7609 > > sqrt(diag(vcov(mp))) Re-fitting to get Hessian InflMedium InflHigh Low|Medium Medium|High 0.06360 0.07529 0.04741 0.04867 > unname(sqrt(diag(vcov(mod)))) [1] 0.04741 0.04867 0.06360 0.07529 > > proc.time() user system elapsed 1.34 0.26 1.59