Please see my sample data below:
dad <- data.frame(type = c("new", "new", "old", "new", "old", "new", "old", "old", "new", "new"),
outcome = c(68,76,57,67,89,98,99,120,99,67),
loan1=c(98000 ,56668,67000,87999,87945, 89768, 65738, 87547, 78937, 20000),
loan2 =c(56768,45679, 23453, 87673, 56749, 45783, 67836, 54673, 45379, 78483),
house=c("semi", "detached", "town", "semi", "town", "town", "semi", "detached", "semi", "town"))
I am trying to run separate multivariate linear regression models for each house and would like to correct for multiple testing by adjusting the p-values with Bonferroni correction. In my actual dataset I am running 7 backward stepwise selection models (initially starting with the same independent variables) to come to the final multivariate regression models. Every model has the same outcome as well. I am wondering if there is a way to get the adjusted p-value with the below code at all? Any help would be appreciated, thank you!
#Example
full <- lm(outcome ~loan1+loan2,data = subset(dad, house=="semi"))
summary(full)
tab_model(full)