R Under development (unstable) (2025-08-24 r88696 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. > ## Goodman (1979), scores not reported but present in LEM examples > # as "GOO91_1G" (where scores reported here come from) > # No symmetric RC scores seem to be reported in a published paper > > library(logmult) Loading required package: gnm Attaching package: 'logmult' The following object is masked from 'package:gnm': se > data(occupationalStatus) > > # We use a simpler (collapsed) table > occupationalStatus[5,]<-colSums(occupationalStatus[5:6,]) > occupationalStatus[,5]<-rowSums(occupationalStatus[,5:6]) > occupationalStatus <- occupationalStatus[-6,-6] > > model <- rc(occupationalStatus, diagonal=TRUE, symmetric=TRUE, weighting="none", start=NA) Running base model to find starting values... Running real model... Initialising Running main iterations........... Done > > stopifnot(round(model$assoc$phi[1,1], d=3) == 6.10) > stopifnot(isTRUE(all.equal(round(c(model$assoc$row), d=3), + c(0.532, 0.438, 0.206, -0.031, + -0.216, -0.426, -0.503)))) > > model <- rc(occupationalStatus, diagonal=TRUE, symmetric=TRUE, weighting="uniform", start=NA) Running base model to find starting values... Running real model... Initialising Running main iterations........... Done > > stopifnot(round(model$assoc$phi[1,1], d=3) == 0.871) > stopifnot(isTRUE(all.equal(round(c(model$assoc$row), d=3), + c(1.409, 1.159, 0.544, -0.082, + -0.571, -1.127, -1.332)))) > > # Marginal weighted scores from ass2 in LEM are weird: we need > # to run cor(3) on the fitted table to get correct values, which is not > # possible for symmetric scores > > proc.time() user system elapsed 0.85 0.14 0.98