R version 4.5.0 alpha (2025-03-23 r88038 ucrt) 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. > # tests for recover.data and lsm.basis > > require("lsmeans") Loading required package: lsmeans Loading required package: emmeans Welcome to emmeans. Caution: You lose important information if you filter this package's results. See '? untidy' The 'lsmeans' package is now basically a front end for 'emmeans'. Users are encouraged to switch the rest of the way. See help('transition') for more information, including how to convert old 'lsmeans' objects and scripts to work with 'emmeans'. > > fiber.lm <- lm(strength ~ machine + diameter, data = fiber) > > rd <- recover.data(fiber.lm) > > lsm.basis(fiber.lm, trms = attr(rd, "terms"), + xlev = levels(rd$machine), grid = head(rd)) $X (Intercept) machineB machineC diameter 1 1 0 0 20 2 1 0 0 25 3 1 0 0 24 4 1 0 0 25 5 1 0 0 32 6 1 1 0 22 $bhat [1] 17.3595092 1.0368098 -1.5840491 0.9539877 $nbasis [,1] [1,] NA $V (Intercept) machineB machineC diameter (Intercept) 8.7688080 -0.24661297 -1.81994128 -0.32777673 machineB -0.2466130 1.02599320 0.46721191 -0.01040561 machineC -1.8199413 0.46721191 1.22578092 0.05202805 diameter -0.3277767 -0.01040561 0.05202805 0.01300701 $dffun function (k, dfargs) dfargs$df $dfargs $dfargs$df [1] 11 $misc list() $model.matrix (Intercept) machineB machineC diameter 1 -3.872983 -1.290994 -1.2909944 -93.467998 2 0.000000 1.825742 -0.9128709 5.112077 3 0.000000 0.000000 1.5811388 -6.324555 4 0.000000 0.000000 0.0000000 -13.985707 attr(,"assign") [1] 0 1 1 2 > > proc.time() user system elapsed 0.29 0.09 0.37