Rohwer2 <- subset(Rohwer, subset=group==2)
rownames(Rohwer2)<- 1:nrow(Rohwer2)
Rohwer.mod <- lm(cbind(SAT, PPVT, Raven) ~ n+s+ns+na+ss, data=Rohwer2)
Rohwer.mod
influence(Rohwer.mod)
# extract the most influential cases
influence(Rohwer.mod) |>
as.data.frame() |>
dplyr::arrange(dplyr::desc(CookD)) |>
head()
# Sake data
Sake.mod <- lm(cbind(taste,smell) ~ ., data=Sake)
influence(Sake.mod) |>
as.data.frame() |>
dplyr::arrange(dplyr::desc(CookD)) |> head()
Run the code above in your browser using DataLab