I'm trying to fit a generalized linear model in R, but am quite new to regression, and struggling to work out how to have predictors nested within categorical variables.
An example of my data:
Response Predictor Category 1 1.22 A 5 5.67 A 3 4.52 B 3 7.23 B 9 2.75 C 4 1.11 C
I want to test for an effect of the Predictor on the Response, within each Category. I have been able to test within each Category by sub-setting the data into each Category, but then I get lots of different test results. I thought there is probably a way to do an overall test, but I can't figure out what formula I'd use.