@@ -320,7 +320,13 @@ standardize_info.default <- function(model,
320320# ' @keywords internal
321321.std_info_response_smart <- function (model , info , data , model_matrix , types , robust = FALSE , w = NULL , ... ) {
322322 if (info $ is_linear ) {
323- response <- insight :: get_response(model )
323+ if (inherits(model , c(" gls" , " lme" ))) {
324+ response <- insight :: get_response(model )
325+ } else if (inherits(model , " fixef" )) {
326+ response <- model.matrix(model , type = " lhs" )
327+ } else {
328+ response <- stats :: model.frame(model )[[1 ]]
329+ }
324330
325331 means <- deviations <- rep(NA_real_ , length = length(names(model_matrix )))
326332 for (i in seq_along(names(model_matrix ))) {
@@ -361,7 +367,13 @@ standardize_info.default <- function(model,
361367
362368# ' @keywords internal
363369.std_info_response_basic <- function (model , info , params , robust = FALSE , w = NULL , ... ) {
364- response <- insight :: get_response(model )
370+ if (inherits(model , c(" gls" , " lme" ))) {
371+ response <- insight :: get_response(model )
372+ } else if (inherits(model , " fixef" )) {
373+ response <- model.matrix(model , type = " lhs" )
374+ } else {
375+ response <- stats :: model.frame(model )[[1 ]]
376+ }
365377
366378 if (info $ is_linear ) {
367379 if (robust ) {
0 commit comments