I struggle writing hypothesis because I get very much confused by reference groups in the context of regression models.
For my example I'm using the
mtcars dataset. The predictors are
cyl(number of cylinders), and
gear(number of gears), and the outcome variable is
mpg (miles per gallon).
Say all your friends think you should buy a 6 cylinder car, but before you make up your mind you want to know how 6 cylinder cars perform miles-per-gallon-wise compared to 4 cylinder cars because you think there might be a difference.
Would this be a fair null hypothesis (since 4 cylinder cars is the reference group)?: There is no difference between 6 cylinder car miles-per-gallon performance and 4 cylinder car miles-per-gallon performance.
Would this be a fair model interpretation?: 6 cylinder vehicles travel fewer miles per gallon (p=0.010, β -4.00, CI -6.95 - -1.04) as compared to 4 cylinder vehicles when adjusting for all other predictors, thus rejecting the null hypothesis.
Sorry for troubling, and thanks in advance for any feedback!
# Data data(mtcars) mtcars$cyl <- as.factor(as.character(mtcars$cyl)) mtcars$gear <- as.factor(as.character(mtcars$gear)) # Model mtcars.lm <- lm(mpg ~ wt + cyl + gear, data = mtcars) # Model output library(sjPlot) tab_model(mtcars.lm)